In a Nutanix cluster, PRISM is the management gateway for components and administrators to configure and monitor the cluster. This includes NCLI (command-line), the HTML5 UI (administrative interface) and REST API support for the entire management framework, providing customers a choice of building orchestration applications.
Nutanix engineering made sure all features and functions are exposed via REST, enabling programmatic access to datacenter services within mainstream enterprises. Nutanix has so much focus in being a programmatic platform that even the PRISM UI fully utilizes REST calls to communicate with cluster services.
The current list of features and services that can be fully managed by programmatic access is long and include the following:
- Http proxies
- Protection Domains (Disaster Recovery)
- Remote Sites
- Storage Pools
Why is programmatic access important?
Programmatic interfaces allow administrators to create automation workflows using scripting languages or workflow engines like vCenter Orchestrator, vCAC, Puppet, Chef, BMC and others. However, it is equally important for applications, as it allows them to drive VM centric policies, such as security, availability, reliability and performance.
You will soon start see a range of applications being responsible for determining infrastructure requirements and automatically setting up their service levels, such as replication for disaster recovery, scheduled snapshots for reliability, replication factor for availability, deduplication and compression, and others. As matter of fact these are all properties available today in the Nutanix platform, but there’s much more to come in future releases.
This is the ultimate goal for a true Software-Defined Storage solution and the Software-Defined Datacenter, enabling a powerful application ecosystem that make automated decisions about the use of infrastructure resources in a simple, efficient and easy manner.
Over the next few articles I will demonstrate how each of these API calls can be used for powerful datacenter automation using a REST Client and PowerShell. My colleague Jason Langone (@langonej) also started a series of articles to explain how use Objective-C for Nutanix. (Nutanix PrismAPI for Devs).
One the most frustrating things I’ve come across when dealing with APIs is that they are commonly a single entity or service responsible for the interaction with infrastructure resources and components, creating single point of failure or choke for the entire automation workflow. In some cases the problem can be mitigated throwing-in additional technology, such as replication, load balancing etc. Nutanix has been built from the ground up using web scale properties.
“web scale” describes the tendency of modern architectures to grow at (far-)greater-than-linear rates. Systems that claim to be “web scale” are able to handle rapid growth efficiently and not have bottlenecks that require rearchitecting at critical moments.
In this sense, any Nutanix node may be the API endpoint for automation workflows, eliminating single point of failures.
Nutanix engineers realized they needed to provide a simple tool to allow administrators to navigate the APIs. So, they created the REST API Explorer Live! that is available directly on the Nutanix UI.
Upon accessing the tool administrators can easily select a REST method and see the operations available for that method. However, they can also execute that method via the REST API Explorer Live! if they want to. A good use case for the REST API Explorer Live! is to test out calls and responses prior to codifying them so that you know they are going to work and you are sure of the expected response that will be returned.
Nutanix PRISM will always output response using standard JSON format.
(Click on the image to enlarge)
(Click on the image to enlarge)
If you are a current Nutanix customer you may download the complete API Reference Guide (API_Reference-NOS_v3_5) from the support website.
This article was first published by Andre Leibovici (@andreleibovici) at myvirtualcloud.net.