Starting a Session

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 for either of the following:

The Windows machine where the Zerto Cloud Manager is installed.
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 API

Description: Start a session with user with credentials.

REST Operation: POST

URL: v1/session/add

 

Returns:

When starting a session successfully, you will receive:

Status: 200
Header: “x-zerto-session”. This is the session identifier. The session identifier is used in the client code with every API call for the duration of the session
STATUS HEADER
200 x-zerto-session

Body: none.

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.

For additional information, see Starting and Ending a Session.

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.