VMware vSphere

 View Only
  • 1.  REST APIs for ESXi?

    Posted May 17, 2019 01:22 PM


    I am trying to be able to utilize VMware's REST APIs.

    I followed theses videos on utilizing the ZIP file for Postman use:



    That reference this GitHub - vmware/vsphere-automation-sdk-rest: REST (Postman and JavaScript) samples and API reference documentation for v…  for downloading the REST APIs.

    I tried putting in our credentials into the Postman > Manage Environments for the {{vc}}, {{user}}, and {{password}}, but when I go to send the request on Postman as a POST to this URL - https://{{vc}}/rest/com/vmware/cis/session, the response is a 400 Bad Request and it is blank. But these are the right credentials to log into our server(s). So I am unsure why this is the case.

    Is this because these APIs are vCenter specific?

    Is there a difference between vCenter, vSphere, and ESXi? Because we have a VMware vSphere 6 Hypervisor servers with VMs. I would assume that ESXi was underneath the realm of vSphere so I would be able to utilize them. Or when I tried https://{{vc}}/rest/vcenter/datacenter -- should /vcenter be changed to /vsphere instead? Or even /esxi?

    I just want to be able to see if I can access and manage or even just use the REST APIs/SDKs than doing things along the ESXi interface.

    Please let me know if this is applicable.


  • 2.  RE: REST APIs for ESXi?

    Posted May 17, 2019 01:24 PM

    They are just for vcenter, you may be able to do some esx specific stuff with just powercli scripts.

  • 3.  RE: REST APIs for ESXi?

    Posted May 22, 2019 06:41 PM

    Where am I able to find this information or be able to obtain the scripts in order to administer/manage some things with ESXi via APIs??

  • 4.  RE: REST APIs for ESXi?

  • 5.  RE: REST APIs for ESXi?

    Posted May 17, 2019 01:25 PM

    There are no REST APIs for ESXi. vSphere is a product budling of vCenter plus ESXi. Both vCenter and ESXi are separate products. REST APIs only work against vCenter Server.