Home > Blogs > VMware Developer Blog > Tag Archives: vsphere api

Tag Archives: vsphere api

Getting Started with vSphere’s API Explorer

Every time I talk to users, there’s always one consistent theme: learning to use vSphere’s APIs is difficult. With the new release of vSphere 6.5, we’ve taken aim at improving that experience with the API Explorer. The API Explorer allows users to connect to the API endpoint and then browse and interact with available REST based APIs and their calls. This includes available parameters, expected responses, what response status codes may mean, and much more. If you’ve happened to use the Managed Object Browser, or MOB, think of that… but on steroids!

Accessing the API Explorer

Accessing the API Explorer is incredibly easy. It’s available on any API endpoint whether that be a vCenter server (appliance or Windows based) or external PSC appliance. Browse to: https://vcenter.fqdn/apiexplorer

API Explorer Main Screen

First Look

After having loaded the API Explorer’s interface, it’s time to start looking around and seeing what’s available. There are two items that should jump out immediately, the login option and the “Select API” dropdown.

If you want to really interact with the API itself, you should log in. The login prompt accepts SSO based credentials, similar to what would be used to log into the vSphere client itself.

The “Select API” dropdown box allows the selection of available API. The APIs available on the endpoint are dependent upon the role the endpoint has.
Example: an External PSC appliance won’t have the same APIs and calls available to it as does the vCenter Server appliance.

Common APIs:

  • Appliance – handles calls to the underlying VMware appliance
  • CIS – Common Infrastructure Services, handles calls involving tagging
  • Content – handles calls involves the Content Library
  • vAPI – vSphere API, handles calls regarding the API endpoint
  • vCenter – handles calls to involving the vCenter

Browsing the API Explorer

Let’s take a look around the API Explorer now that we have our bearings.

With the vcenter API selected, expand the “GET /vcenter/cluster” operation.

API Explorer - Cluster Operations

On the above screen, we can see the path to make the call and the method. However, the API Explorer also gives some other information such as the expected response class, parameters and potential response messages. Clicking on those items expands and collapses additional information. Here’s some examples:

API Explorer Example - Response Class

API Explorer Example – Response Class

API Explorer Example - Cluster Filter Parameters

API Explorer Example – Cluster Filter Parameters

API Explorer Example - Response Messages

API Explorer Example – Response Messages

My favorite part is right below those areas, the “Try It Out!” button. Clicking on that button performs the operation directly within the browser. It then provides a bunch of information such as an example cURL statement, the request’s URL, as well as the request’s body, status code, and headers.

API Explorer Example - Try It Out

Conclusion

The API Explorer is a great way to orient to and discover vSphere’s REST based APIs. Not only does it provide lots of information and additional context around the API calls, it even helps users start making those calls.

What’s New with Developer and Automation Interfaces for vSphere 6.5?

VMworld Europe 2016 wrapped up last week and there’s been a lot of new and exciting products and features announced. One of the more exciting things that have been announced have been around the automation and development space.

As seen from the keynote in Barcelona (see about 35 minutes in), VMware is taking the developer and automation specialists seriously. In the new vSphere 6.5 release we are providing simplified and modern API interfaces and giving customers their choice of access with language bindings and automation tools to a fresh new modern set of APIs.

What’s New

VMware vCenter has received some new extensions to its REST based API. In vSphere 6.0, this API set provides the ability to manage the Content Library and Tagging but now also includes the ability to manage and configure the vCenter Server Appliance (VCSA) based functionality and basic VM management.

REST API Documentation

VCSA API

The VCSA’s new and simplified REST based API will consistently be able to manage things like how to access the appliance, managing user accounts, checking on the health of the appliance or even the services of the appliance itself, networking configurations like firewall rules or proxy settings, being able to provide a file based backup or restore of appliance and even managing system settings like NTP or just checking the uptime or version.
 

Virtual Machine API

Additional functionality has been added for handling the management of VMs, using the range of interfaces (including REST) you will be able to read information, create, update and even delete VMs, as well as setting their power state and working with the hardware. Some example hardware tasks would be connecting the CD-ROM, updating the RAM allotment, adding a network adapter, removing a hard disk, and so forth.

All of this not just available via the developer and automation tooling but also simplified to make sure they are easily discoverable and the use of strong defaults means you only specify the information that is needed, a simple example of this means that to create a VM is now as easy as 12 lines of JSON and a single API call.

Discover the APIs with the new API Explorer

What’s the best way to learn about these awesome new APIs? How about checking out the API Explorer that lives on the vCenter. It’s available on the vCenter server at the following URL: http://*vCenter URL*/apiexplorer Once connected, the API Explorer will display information about the numerous endpoints available in order to easily understand the API models. The API Explorer also allows users to expand each API call and check out the required fields, understand the request body, see the available filter information, as well as a list of response messages. One of my favorite capabilities, the ability to click a button and trying out the calls live!

vSphere API Explorer

Process Improvements

Process Improvements for Developer and Automation Interfaces
Due to how the above APIs are defined, we also have the ability to greatly improve our turnaround time on providing resources! This process allows us to provide a number of developer and automation based tool integrations out of the box.

The SDK with new improved, simplified samples will include Java, .NET, Python, Ruby, and Perl.

This also allows our automation tools to be provided on day 0 as well. The associated PowerCLI cmdlets, Datacenter CLI commands (new in 6.5), vRealize Orchestrator workflows, and so forth are all part of the process. Lastly, and probably the best part, the documentation is created as well. The documentation will be fully featured and much easier to understand!

Summary

vSphere 6.5 brings all the features and improvements from above and many more. One thing is certain though, the future is bright when it comes to VMware’s developer and automation interfaces. This blog post shows a summary of a lot of new features that each deserve their own blog posts, watch this blog over the next couple of months as there will be several more blog posts diving further into each of these areas!

Demystifying the PropertyCollector – VMworld Tech Exchange

 

Folks,

Just wanted to highlight a very important session for anyone that has ever wrestled with the Property Collector.

This session is ideal for any developer or administrator that needs to customize the Property Collector to do the following. 

·     Retrieve the names of all the hosts in the inventory.

·     Monitor for changes to the power state of all VMs in the inventory.

·     Keep track of the host that each VM is running on

This is an advanced session, and will be a great opportunity to learn the ins and outs of the Property Collector and the new changes for vSphere 4.1. This is also a great chance to meet the Balaji and the rest of the team.

Looking forward to seeing  you there, hurry and register today.

 

PropertyCollector

 

VMworld Tech Exchange – Check out your Messenger Bag

Folks,

Sneak peek into your Technology Exchange Messenger Bag – we hope you like it. This messenger bag will work well with your SF City look. The bag will also work very well with your iPad (if you happen to win the raffle)

Hope to see you there. Please note this bag was not designed to carry more than 4 – 18oz cans of your favorite frosty beverages.

Hope to see you there. Register today.


VMworld-Tech-Exchange-Bag

VMworld Tech Exchange – Why you need to attend the vSphere APIs for Performance Monitoring Session

Folks,

This is one of most popular sessions as Ravi and Balaji explain how to use Performance Metrics and more important how to pull the right data using the vSphere APIs. Ravi and Balaji go into real world scenarios, provide some best practices. 

Who should attend ?

This is a must attend session for anyone managing a large vSphere environment. Ravi and Balaji have tailored the talk to appeal to both Developers and Administrators.

Hope to see you there. 

vSphere APIs for Performance Monitoring

ID: PPC-04
Level: Advanced
Building
on the initial knowledge of vSphere APIs, learn about the features
available to developers via vSphere Web Services APIs to collect
performance statistics. We will also discuss the best practices in
collecting performance data when using these APIs. This presentation is a
must-attend for any developer that retrieves performance information
from the vSphere platform in any large environment. While the content is
advanced, developers new to the platform will find it useful as well.
Speaker: Balaji Parimi, Ravi Soundararajan

 
PowerShell

All about ESX Device Drivers Session at Technology Exchange for Developers

Folks

Just wanted to call out a first ever public session on ESX Device Drivers ! This session is ideal for anyone building ESX drivers or just curious about what goes on deep underneath the covers of the ESX platform.

Hope to see you soon, register early as spots are filling fast. 

http://www.vmworld.com/community/conferences/techexchange

Session Title: Device Driver Infrastructure in ESX – Overview and Tools for Successful Driver Creation

Speaker: Mang Kwan Ma

Title: Staff Engineer – Ecosystem Engineering


Mang.kwan.ma

Session ID: PPC-08
Level: Advanced
vSphere
has an emulated Linux device driver environment to support a wide
variety of network and storage adapters. This talk is intended to
provide a detailed overview of the vSphere device driver infrastructure
to developers who are interested in porting their Linux device drivers
to the vSphere platform. The talk also touches upon the best practices
for porting device drivers, device management, a development tool
(VMware Workbench), testing and certification.
Speaker: Mang Kwan Ma

VMUG Portland Trip Report – vSphere APIs for Performance Monitoring Lab

Folks,

Just wanted to share with you my experience participating in the 1st ever Portland VMUG Performance Lab. This was a 1 day event in the great City of Portland Oregon (go Timbers)

The local VMUG leaders Bill H. and Dominic R. put together a super lab for their users. The Lab was focused on understanding the vSphere Performance metrics and more important showing people how to pull meaningful data using the vSphere APIs.

The lab was delivered by the Ravi S. and Balaji P. aka "The vSphere API Performance Duo". Ravi is the expert in vCenter Performance Engineering and Balaji has been known to bend the vSphere APIs to his will. I think the two together can maybe solve global warming, or at least be able to help your organization understand how to harness the power of the vSphere APIs.

The session has been recorded and will be posted for all to enjoy. If you are interested in harnessing the power of the vSphere APIs in order to pull real performance data – join us at our upcoming Technology Exchange for Developers @VMworld 2010.

As a side note I wanted to call out an interesting aspect of how the event was put together in terms of audience participation. I think it was interesting and it seemed like it did the trick.

The model that Bill, and Dominic put together was designed for partial participation and fluid question and answer. I think this model worked out great as it allowed for people who really want access to the keyboard (hands on kind of guys) as well as folks who just want to ask questions. This also works for folks that just want to sit back and absorb the talk. This is a good model to think about moving for future events.

Thanks again to the great folks from the Portland VMUG for inviting us, this was a great event and hopefully it was useful to our attendees. VMUG Leaders let us know if this sounds interesting to you !

P8040882
Last minute changes to Lab environment done by Ravi and Balaji…

P8040884
VMUG users getting ready for the show, we had two sessions, one morning and one in the afternoon.

P8040881
Could not have pulled this off if it wasnt for the VMUG Sponsors. 

Bill and Dominic introduce the lab – (I really need to get a real video camera)

Developer Days @ VMworld 2010

Folks,

We are happy to announce that we will be having our Developer Day @VMworld 2010. We are still working details and content but wanted to make sure this was on your radar. Event will run in parallel with VMworld at Moscone Center, there will be a moderate additional fee for event. Event can also be purchased as a standalone. More details to follow.

We plan on having two tracks, plus a track dedicated to the VMware Road Maps for TAP Members.

1st Track will be dedicated to all things vSphere APIs (Private Cloud APIs), we have some exciting developments in this area but that is all I am going to say.

2nd Track will be dedicated to our Application Developers, Cloud Developers. We plan to have great session from SpringSource, Gemfire, Zimbra, RabbitMQ and the vCloud APIs.

But enough text from me, hear what Ravi S. has to say. Hope to see you there.

Regards,

Pablo Roesch