
vShield API Programming Guide
26 VMware, Inc.
Add Application to a Scope
Youcancreateanewapplicationonthespecifiedscope.
Example 2-37. Add an application to a scope
Request:
POST https://<vsm-ip>/api/2.0/services/application/scope/<moref>
RequestBody:
<application>
<objectId/>
<type>
<typeName/>
</type>
<description>Some description</description>
<name>TestApplication1</name>
<revision>0</revision>
<objectTypeName/>
<element>
<applicationProtocol>UDP</applicationProtocol>
<value>9,22-31,44</value>
</element>
</application>
ForapplicationProtocol,possiblevaluesare:
TCP
UDP
ORACLE_TNS
FTP
SUN_RPC_TCP
SUN_RPC_UDP
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‐37.
Example 2-38. Retrieve details about an application
Request:
GET https://<vsm-ip>/api/2.0/services/application/<application-id>
Anon‐existentapplicationIDresultsina404NotFounderror.
Comentários a estes Manuais