How to get the session_id access in SRM8.x/VR8x Explore REST APIs
search cancel

How to get the session_id access in SRM8.x/VR8x Explore REST APIs

book

Article ID: 341847

calendar_today

Updated On:

Products

VMware Live Recovery

Issue/Introduction

How to get the session_id to use in REST API commands in SRM8.x/VR8.x


Symptoms:

SRM8.x/VR8x Explore REST APIs


Environment

VMware vSphere Replication 8.x
VMware Site Recovery Manager 8.x

Resolution

* Launch the SRM/VR UI - https://srm/ and Select Explore REST API

 

image.png

 

 

* Go to API Categories/authentication POST method and Execute it with relevant credentials.  

-     For configure APIs ( admin/password)

-      For srm/vr APIS ([email protected]/password)

 

image.png

 

* Note the session_id returned from the Execute response output. This id is then used to authenticate the other REST API calls.

 

image.png

 

* Enter the returned session_id in the top window . Session ID (response from POST /session)

 

image.png

 

 

 

* Now you can try using the other GET POST REST API call

eg:  Appliance GET – List appliance information

 

image.png

 

 

image.png

 

* You can view the metadata and format of the response output

* It also constructs the syntax of the CURL cmd for sue in scripting REST API call.

 


Additional Information

List of Site Recovery Manager REST APIs https://docs.vmware.com/en/Site-Recovery-Manager/8.6/com.vmware.srm.admin.doc/GUID-6A42A4D9-8116-4535-94C6-088D8BEA4E49.html

Using the Site Recovery Manager REST API Gateway https://docs.vmware.com/en/Site-Recovery-Manager/8.6/com.vmware.srm.admin.doc/GUID-E7F5DEA2-A84E-444C-A0AB-A992DB9AC5DA.html

How to use the REST APIs to run a recovery plan https://docs.vmware.com/en/Site-Recovery-Manager/8.6/com.vmware.srm.admin.doc/GUID-661AC1D1-D5A1-4BFB-8C56-6E45931D9871.html