Outlining a Client for the JSON
ProtocolLast Updated December 16, 2024
A client to work with the JSON protocol generally contains the following parts, at
minimum.
- The basic elements of the URL, including the address of the vCenter Server instance, the service endpoint specifier, and the version specifier.
- The credentials with which you authenticate your client session.
- Code to GET managed object properties, such as theServiceInstancecontent, which contains managed object references to singletons, including theSessionManager.
- Code to POST requests that invoke methods on managed objects, such asLoginByToken.
- A request to fetch theServiceInstancecontent and extract theSessionManagermanaged object reference.
- A request to authenticate the client session withSessionManager.
- A request to end the client session.
Following sections use fragments of Python
code to show how you can build these parts of the request.