VMware VSHIELD MANAGER 4.1.0 UPDATE 1 - API Manual do Utilizador Página 11

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 90
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 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).
Vista de página 10
1 2 ... 6 7 8 9 10 11 12 13 14 15 16 ... 89 90

Comentários a estes Manuais

Sem comentários