
vShield API Programming Guide
32 VMware, Inc.
MS_RPC_TCP
MS_RPC_UDP
NBNS_BROADCAST
NBDG_BROADCAST
OnlyTCPandUDPsupportcommaseparatedportnumbersanddashseparatedportranges.Otherprotocols
supportasingleportnumberonly.
Onsuccess,thiscallreturnsastringidentifierforthenewlycreatedapplication,forinstanceApplication-1.
Thelocationheaderinthereplycontainstherelativepathofthe
createdApplicationandcanbeusedfor
furtherGET,PUT,andDELETEcalls.
Get Details of an Application
Youcanretrievedetailsabouttheapplicationspecifiedby<application-id>asreturnedbythecallshown
inExample 2‐47.
Example 2-48. Retrieve details about an application
Request:
GET https://<vsm-ip>/api/2.0/services/application/<application-id>
Anon‐existentapplicationIDresultsina404NotFounderror.
Modify Application Details
Youcanmodifythename,description,applicationProtocol,orportvalueofanapplication.
Example 2-49. Modify application
Request:
POST https://<vsm-ip>/api/2.0/services/application/<application-id>
RequestBody:
<application>
<objectId>Application-1</objectId>
<type>
<typeName>Application</typeName>
</type>
<description>Some description</description>
<name>TestApplication</name>
<revision>2</revision>
<objectTypeName>Application</objectTypeName>
<element>
<applicationProtocol>TCP</applicationProtocol>
<value>10,29-30,45</value>
</element>
</application>
ThecallreturnsXMLdescribingthemodifiedapplication.
Delete Application from Scope
Youcandeleteanapplicationbyspecifyingits<application-id>.Theforce=flagindicatesifthedelete
shouldbeforcedorunforced.Forforceddeletes,theobjectisdeletedirrespectiveofitsuseinotherplacessuch
asfirewallrules,whichinvalidatesotherconfigurationsreferringtothedeletedobject.Forunforced
deletes,
theobjectisdeletedonlyifitisnotbeingusedbyanyotherconfiguration.Thedefaultisunforced(false).
Comentários a estes Manuais