Using the APIs
All APIs are exposed over HTTPS.
All the Zerto Cloud Manager RESTful APIs require a session running with basic authorization. The username and password authorization used must be a valid username and password either for the Windows machine where the Zerto Virtual Manager is installed or for the hypervisor manager, VMware vCenter Server or Microsoft SCVMM, accessed by the Zerto Cloud Manager. In both cases the Zerto Cloud Manager is the Zerto Cloud Manager where the APIs will run.
When passing a URL in a browser, you require a security certificate. In Microsoft Internet Explorer you have to be in Compatibility mode.
To test the APIs, Zerto recommends using cURL or a REST client, such as the following:
■ For Google Chrome: Postman, from http://www.getpostman.com/.
■ For Microsoft Internet Explorer and Mozilla FireFox: RESTClient, from http://www.restclient.org.
Starting a Session
Using the username and password either for the Windows machine where the Zerto Cloud Manager is installed or for the hypervisor manager, VMware vCenter Server or Microsoft SCVMM, accessed by the Zerto Cloud Manager, you can establish a session with the following URL and the HTTP POST request:
https://zcm_ip:port/v1/session/add |
A session identifier, x-zerto-session, is returned as part of the response header and the session is established. The session identifier is used in the client code with every API call for the duration of the session.
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.
Ending a Session
End a session with the following URL and the HTTP DELETE request:
https://zcm_ip:port/v1/session |
Note: If a session is dormant for thirty minutes, the session is automatically terminated.