vSphere Restful API - ji-it/CloudTides GitHub Wiki
Prerequisites
In order to try out the vSphere RESTful API, make sure the following are available:
- Accessible vSphere from local machine
- Access to vSphere account with elevated privileges for deploying and destroying VMs
- Postman API Client. Download here
Setting up Postman Client
- Install Postman for local OS based by following instructions on official Postman Site
- Sign in with an account or skip the sign in to use the app.
- Create an environment by clicking the eye icon and then "Add". Set up as the environment as shown below.
- Set up the environment name and the variable: initial value pairs as shown in the image.
- Environment Name - Use any name suitable for you. eg. vCenter
Keys
- vc: ipaddress of vcenter
- user: vCenter SSO login username
- password: vCenter SSO login password
- Add the environment and select it at the No environment option on Postman
- Download the collection attached here and import into Postman using the
Import
button and dragging the.json
file.
Before Use
-
Expand the resources for Deploy VM, or Destroy VM
-
Make sure the login request is sent to the following endpoint
https://{{vc}}/rest/com/vmware/cis/session
usingBasic Auth
type of authorization. Fill in the username and password as shown in the image below. -
Click on Update Request button
-
Perform the actions using RESTful API Test Cases