VMware has just publicly announced its latest update to its virtualisation platform, vSphere version 6.5. One of the most interesting new features for me is the introduction of a vSphere vCenter Rest API. It's a feature that is very welcome with RESTful API's being so standard now.

The new vCenter REST API is much more modern, developer friendly and far simpler to use than the old vSphere API. It has been designed with automation and DevOps in mind. I will give you an overview of the new API and then take you through some examples of how to use the VMware vCenter REST API in a series of articles.

The VMware vCenter REST API doesn't currently allow you to do everything the VMware vSphere API can do, but VMware plan to add more features in the future. For example you can't currently create/delete/update a VM Folder. In this release there is a focus on the VM lifecycle features.

VCSA REST API

VMware has added a REST API to the VMware vCenter Server Virtual Appliance (vCSA). This opens up opportunities to automated the configuration of the appliance and also query the status and health of the appliance.

There is now a Rest API for managing the VMware vCenter Server Virtual Appliance (vCSA). This allows you manage:

  • Appliance Access (DCUI/Shell/SSH)
  • Appliance User accounts
  • Query appliance Health data (Load, Mem, Database, Storage)
  • Monitoring of services and statistics
  • Configure and test Networking aspects including:
    • Hostname
    • DNS Domains/Servers
    • Network Interfaces
    • Firewall Rules
    • Proxy Settings
    • Routes
  • Perform Backup/Recovery of the appliance
  • Configure System settings:
    • List and resize storage
    • NTP/Timesync settings
    • View system version
    • View system uptime
    • SNMP Settings
    • Shutdown and reboot
    • Update

vCenter REST API for managing VMware vSphere

The main RESTful API for vCenter is currently focused on VM lifecycle features but will expand in future releases:

  • Cluster - Get/List
  • Datacenter - Create/Delete/Get/List
  • Datastore - Get/List
  • Folder - List
  • Host - Connect/Create/Delete/Disconnect/List
  • Resource Pool - Get/List

Inventory Operations to allow you to find datastores and networks. - Datastore - Find - Network - Find - Network - List

vCenter ISO mounting - Mount - Unmount

OVF management Services to capture and deploy Open Virtualization Format (OVF) packages to and from the content library.

  • Export Flag
  • Import Flag
  • Library item - Create/Deploy/Filter

Virtual Machines

  • VM - Create/Delete/Get/List
  • Power - Get/Start/Stop/Suspend/Reset
  • Hardware - Get/Update/Upgrade
    • Boot - Get/Update
      • Device - Get/Set
      • Disk - Get/Set
    • CD-ROM - Connect/Create/Delete/Disconnect/Get/List/Update
    • CPU - Get/Update
    • Disk - Create/Get/List/Delete/Update
    • Ethernet - Connect/Create/Delete/Disconnect/Get/List/Update
    • Floppy - Connect/Create/Delete/Disconnect/Get/List/Update
    • Memory - Get/Update
    • Parallel - Connect/Create/Delete/Disconnect/Get/List/Update
    • Serial - Connect/Create/Delete/Disconnect/Get/List/Update
    • Adapter
      • Sata - Create/Get/List/Delete
      • SCSI - Create/Get/List/Delete/Update

CIS REST API

The CIS REST API allows you to carry out operations on tags in vCenter. You can create/delete/get/list/update tags.

In the next article I will show you how to get started with new vCenter REST API.



Comments

comments powered by Disqus