This knowledge base article outlines the necessary steps to get started with Site Recovery Manager REST APIs.
While executing the SRM REST API call, follow the below steps :
1. Create a session ID, using the POST API method under the authentication tab.
2. Enter the session ID in the "session ID" field located above the API Categories.
This will be used in subsequent API calls.
3. Retrive the pairing ID: Use the GET API method under the pairing tab. (Take note of the Pairing ID and the Source SRM ID, as this information will be needed for any future API calls)
Note: In the response of "GET pairing", you will encounter an error message " Failed to retrieve information about server with guid <guid> : Session is not authenticated". This is an expected behaviour as the session for remote SRM server is not created. This is observed in environments where vCenters are standalone. The error is not seen in vCenters using Enhanced Linked Mode.
4. Under the pairing tab, use the POST API method to create a session with the remote SRM server using the Pairing ID generated in Step 3.
5. After creating the session with the remote SRM server, you should now be able to retrieve the complete details of the remote site (SRM and vCenter). Additionally, you will now be able to make any necessary API calls.
6. Example : We can retrieve the folder mappings using the pairing ID and SRM ID.
For more information regarding the SRM API calls refer the document: Using the Site Recovery Manager REST API Gateway