Code Samples
The APIs can be consumed by applications implemented in different technologies in a stateless manner.
Data returned is formatted either as JSON or as XML as set by the consumer. By default, data that is returned for the v1 APIs is formatted as JSON.
Code must include the necessary authentication to run, including the username and password fields that are used by the Zerto Virtual Manager to access the vCenter Server and establishing a session.
The following code samples are described in this section:
Starting an API session for any of the following code samples requires authentication. The following basic authentication methods are available:
Windows-based authentication (default) – The username and password are authenticated by Windows on the host on which the Zerto Virtual Manager or Zerto Cloud Appliance is installed.
Hypervisor manager authentication – The username and password are authenticated by the VMware vCenter Server or Microsoft SCVMM to which the Zerto Virtual Manager is connected.