
vShield API Programming Guide
14 VMware, Inc.
Example 1-2. Determine the API version of a vShield App
GET https://<vsm-ip>/api/versions/app/<datacenter-id>
<versions>
<version version="2.0">
<module version="2.0" baseUri="/api/2.0/app" id="datacenter-21" name="app"/>
</version>
</versions>
Example 1-3. Determine the API version of a vShield Edge
GET https://<vsm-ip>/api/versions/edge/dvportgroup-63
<versions>
<version version="2.0">
<module version="2.0" baseUri="/api/2.0/networks" id="dvportgroup-63" name="edge"/>
</version>
</versions>
TheAPIversionforvShieldAppisgovernedbythestateofthedatacenterinrelationtoavShieldcomponent.
IfthedatacenterstateisinbackwardCompatiblemode,thenitsupportsonlyversion1.0RESTcalls.Ifthe
datacenterstateisinregularmode,thenitsupportsonly2.0RESTcalls.
TheseAPIversionsaremutually
exclusive–onlyoneRESTAPIversionissupportedatatime.
Table 1‐1listscompatibilitybetweendifferentversionsoftheRESTAPI,vShieldManager,andthevShield
virtualappliances:vShieldApp,vShieldEndpoint,andvShieldEdge.
Multitenancy
InvShield5.0,thevShieldAppfirewallconfigurationsupportsmultitenancy.AsingleIPaddresscanshow
upinmultipleplacesinthenetwork(differentIPaddressnamespaces)associatedwithdifferentvirtual
machines.Only2.0RESTAPIssupportmultitenancy.Inbackwardcompatibilitymode,vShield5.0supports
theoldAPIsanddoesnot
enforceruleswithawarenessofmultitenancy.
Ifyouhavewrittenprogramsusing1.0RESTAPIs,youshouldreconsiderwhethertheirdesignworksas
intendedinthemultitenancyscenario.Ifnot,changeyourprogramstousetheAPI2.0calls.
An Introduction to REST API for vShield Users
REST,anacronymforRepresentationalStateTransfer,isatermthathasbeenwidelyemployedtodescribean
architecturalstylecharacteristicofprogramsthatrelyontheinherentpropertiesofhypermediatocreateand
modifythestateofanobjectthatisaccessibleataURL.
Table 1-1. REST API Compatibility Matrix
REST API Version vShield Manager Version vShield Appliance Version Supported?
1.0 1.0 1.0 Yes
1.0 2.0 1.0 Yes,however,clientcannot
configureanynewfeaturesin
vShieldManager2.0
1.0 2.0 2.0BackwardMode
1
1. IfthevShieldEdgeisinBackwardMode,thevShieldManagerdoesnotacceptREST2.0callsforvShieldEdgeconfiguration.
YoumustswitchthevShieldEdgetoNormalMode.AfteravShieldEdgehasbeenswitchedtoNormalMode,youcannot
changetoBackwardMode.
Yes,however,clientcannot
configureanynewfeaturesin
vShieldManager2.0
2.0 2.0 1.0 No
2.0 2.0 2.0BackwardMode No
2.0 2.0 2.0 Yes
Komentáře k této Příručce