VMware VSHIELD MANAGER 4.1.0 UPDATE 1 - API Manuel d'utilisateur Page 11

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 90
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 10
VMware, Inc. 11
Chapter 1 Overview of VMware vShield
Using the vShield REST API
RESTAPIusesHTTPrequests(whichareoftenexecutedbyascriptorotherhigherlevellanguage)asaway
ofmakingwhatareessentiallyidempotentremoteprocedurecallsthatcreate,modify,ordeletetheobjects
definedbytheAPI.ThisRESTAPI(andothers)isdefinedbyacollectionof
XMLdocumentsthatrepresent
theobjectsonwhichtheAPIoperates.Theoperationsthemselves(HTTPrequests)aregenerictoallHTTP
clients.
TowriteaRESTfulclient,youneedtounderstandonlytheHTTPprotocolandthesemanticsofstandard
HTMLmarkup.TousethevShieldAPIeffectivelyinsucha
client,youneedtoknowthreethings:
thesetofobjectsthattheAPIsupports,andwhattheyrepresent(WhatisavDC?Howdoesitrelatetoan
Org?)
howtheAPIrepresentstheseobjects(WhatdoestheXMLschemaforthevShieldEdgefirewallruleset
looklike?Whatdotheindividualelementsandattributesrepresent?)
howtheclientreferstoanobjectonwhichitwantstooperate
Toanswerthesequestions,youneedtounderstandthevShieldAPIresourceschemas.Theseschemasdefine
anumberofXMLtypes,manyofwhichareextendedbyothertypes.TheXMLelementsdefinedinthese
schemas,alongwith
theirattributesandcompositionrules(minimumandmaximumnumberofelementsor
attributes,forexample,ortheprescribedhierarchywithwhichelementscanbenested)representthedata
structuresofvShieldobjects.Aclientcan“read”anobjectbymakinganHTTPGETrequesttotheobject’s
resourceURL.Aclient
can“write”(createormodify)anobjectwithanHTTPPUTorPOSTrequestthat
includesaneworchangedXMLbodydocumentfortheobject.Andaclientcanusuallydeleteanobjectwith
anHTTPDELETErequest.
Inthisdocument,wepresentexamplerequestsandresponses,andalsoprovide
referenceinformationonthe
XMLschemasthatdefinetherequestandresponsebodies.
RESTful Workflow Patterns
AllRESTfulworkflowsfallintoapatternthatincludesonlytwofundamentaloperations:
MakeanHTTPrequest(typicallyGET,PUT,POST,orDELETE).Thetargetofthisrequestiseithera
wellknownURL(suchasthevShieldManager)oralinkobtainedfromtheresponsetoaprevious
request.(Forexample,aGETrequesttoanOrgURLreturnslinkstovDCobjects
containedbytheOrg.)
Examinetheresponse,whichcanbeanXMLdocumentoranHTTPresponsecode.Iftheresponseisan
XMLdocument,itmaycontainlinksorotherinformationaboutthestateofanobject.Iftheresponseis
anHTTPresponsecode,itindicateswhethertherequestsucceededorfailed,and
maybeaccompanied
byaURLthatpointstoalocationfromwhichadditionalinformationcanberetrieved.
Thesetwooperationscanrepeat,inthisorder,foraslongasnecessary.
I
MPORTANTAllvShieldRESTrequestsrequireauthorization.Youcanusethefollowingbasicauthorization:
Authorization: Basic YWRtaW46ZGVmYXVsdA==
YWRtaW46ZGVmYXVsdA==representstheBase64encodingofthevShieldManagerdefaultlogincredentials
(admin:default).
Vue de la page 10
1 2 ... 6 7 8 9 10 11 12 13 14 15 16 ... 89 90

Commentaires sur ces manuels

Pas de commentaire