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

Tag Archives: vsphere

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!

vSphere 2015 Beta Is Here

VMware is pleased to announce the vSphere 2015 Public Beta program, which represents one small leap for VMware and one giant leap for cloud computing. The new beta, which for the first time is open for everyone to join, includes updates to several limited access SDKs and APIs, along with their associated programs, certifications and documentation—all available on VMware Developer Center.

Join the vSphere Beta Community

Beta participation is vital for us to reach our Day 0 goals together. Early feedback will insure we have enough time to address your issues and concerns in the General Availability release of our SDK and certification plugins. Although this Beta Program has no established end date, and you can provide comments throughout the program, we strong encourage everyone to participate and provide feedback in the first 4-6 weeks of the program (which started June 30, 2014).

Download Gated SDKs for vSphere 2015 Beta

Authorized partner developers who are participating in eligible Developer Center programs can now find SDKs, certification plugins, and associated documentation for vSphere 2015 Beta on VMware Developer Center portal. Early feedback will insure we have enough time to address your issues and concerns in the General Availability release of our SDK and certification plugins.

The Beta release is not to be used for production development or certification purposes. Official certification will start with the Release Candidate (RC) build.

Not sure where to start? Download the vSphere Beta Program Ground Rules or read the Master Software Best Test Agreement before you join the vSphere Beta program. For all issues, and any assistance, please access your Developer Center Partner Network (DCPN) account or contact your VMware program manager for additional help.

VMware Scripting – SDK Developer Support available for vSphere SDK 4.1

Folks,

Happy to let everyone know that VMware now provides vSphere 4.1 Scripting and SDK support for your organization. This service has been available for our TAP members and now we have brought it to market for all.

This program will help your organization when using the SDKs and CLIs and ensure you are going down the right path. There are two levels of services Standard and Premium. Support is sold per seat with unlimited use per year. 

Your organization can purchase offering directly through VMware, Channel Partner or for your convenience online. 

The Program covers a wide range of SDKs and CLIs including vSphere PowerCLI 4.1. To see a complete list of SDKs supported visit http://vmware.com/go/sdksupport

Service can also be purchased online

Regards,

Pablo Roesch

vSphere SDK Product Marketing

Download SDK/CLI_Support_PDF

Official VMware vSphere PowerCLI Training: vSphere Automation

Folks,

Just wanted to highlight our latest vSphere PowerCLI Training course. This is a new and exciting course targeted at folks interested in automating routine tasks when managing large vSphere environments. And as everyone knows if you can automate a task you can save precious time which will allow you to focus on more strategic projects (or just get home early for once)

A big thanks to the folks in the VMware Training Organization for helping put this together and of course to Carter for contributing to the content. On that note I should also mention that we have found a new PM for PowerCLI ..(You heard it here first) His name will be revealed very soon so please stand by.

Enjoy our newly released vSphere 4.1 SDKs and CLIs

Best Regards,

Pablo Roesch

Technical Marketing Manager

SNMP MIB 1.0.1 Released

Folks – Its been hard to find these but we plan to make these a bit easier to get to as soon as they are released.

Check out the SNMP MIB Section within the vSphere Web Services / Management Community http://communities.vmware.com/community/developer/forums/managementapi#SNMP-MIB

thanks for your patience

Pablo Roesch

2010 VMware SDK / API Predictions – by Pablo Roesch

Folks,

It is hard to believe the New Year is already in its second week. I have been a little quiet these past few weeks as it has been hard to recover from my holiday break. I might have spent too much time in an undisclosed remote beach in Central America.

 

Here are my Top 5 Predictions for 2010.

 

#1. VMware Developer Community Sample Code site will be easier to use. As you know uploading and sharing code on our community is not ideal. Nava has been writing a plug in to improve the way the code is displayed and shared. It’s still a work in progress and will be released into the wild soon.

 

#2. VMware Global Support Services will provide SDK Developer / Scripting Support for our end user customers. Right now SDK Developer Support is only available for TAP members, (Select Level and above) We have been working with our friends in GSS and hope to have some good news for our customers this year. It has been long overdue.

 

#3. William (Lamw) will be the winner of some hard cold cash if no one else submits a script in our Script-O-Mania contest. The Script-O-Mania contest was launched before the break and William was our first and only contestants. Odds of winning are on his side.

 

#4. Project Onyx will take over our minds and force its will on the SDK / API marketing team. Project Onyx was developed by our PowerCLI development team with the goal to make developing, scripting using our APIs a little bit easier. This is very much a grass roots project and has gained an immense amount of popularity from our administrators and developers out there.

 

#5. I will find an iPhone app that will not only help me find my way home when lost, but will also open my garage door.   This is more of a fun prediction. I lost my remote controlled garage door opener during VMworld Developer Day and I am waiting for someone to create a really useful application that will open my automatic garage door opener.