Login in vCloud Director using REST API Client - POSTMAN - VirtualSingh

VirtualSingh

VirtualSingh

Thursday, 16 November 2017

Login in vCloud Director using REST API Client - POSTMAN

  • Nowadays most of the virtualization products support REST-API.  
  • I first learned to interact using rest-api is with RavelloSystems(a cloud platform by Oracle)
  • The best client I have come across for it is POSTMAN client available for windows, mac & Linux. I have installed it on my MacBook & windows 10 machine. 
  • So this time I wanted to interact with vCloud Director 8.2 & 9.0 using REST-API
  • After a long day meeting and looking for how to log in successfully in vCD using postman client, somehow I figured it late night
  • So the basic options that we use in it are GET, PUT, POST & DELETE.
  • So if you have worked on HTML it makes it easy to understand the output.
  • As VMware has already started in vCenter 6.5 - REST API explorer.

Steps to login in vCD using POSTMAN

  • URL for vCD i.e
    https://IP or FQDN/api/sessions
  • Authentication- Basic (As per snapshot no. 1)
        Username- administrator@system   :- If you are a system administrator.
        I found it difficult for the username which took me this much time. So this user can be a LDAP integrated user or Active Directory.
        Password-  As per your directory
  • Once authorized with Status:200 OK .  In the AUTHORIZATION tab as highlighted, we have HEADERS tab where we will recieve a x-vcloud-authorization: token.
  • Instead of using your credentials for authentication, we can use the custom header (As per snapshot no. 2 & 3).
  • Now we are ready to work on this REST-API for interaction using postman client.















3 comments: