The Nutanix REST API allows you to create scripts which run system administration commands against the Nutanix cluster. The API allows the use of HTTP requests to get information about the cluster as well as make changes to the configuration. Output from the commands are returned in JSON format.
A complete list of REST API functions and parameters is available in the REST API Explorer section of the Nutanix web console.
Accessing the REST API ExplorerNutanix provides a utility with the web console to help you get started with the REST API. The Explorer displays the parameters and format for the API calls which can be included in scripts. Sample API calls can be made to show the type of output you should expect to receive.
- Connect to the Nutanix web console.
- Click the user icon in the upper-right corner of the web console and select REST API Explorer. The REST API Explorer displays a list of the cluster objects which can be managed by the API. Each line has four options:[list]
- Show/Hide: Expand or reduce the detail shown for the object
- List Operations: Show all operations which can be run on this object
- Expand Operations: Show the detailed view of the operations which can be run on this object
- Raw: Display the JSON definition of the API for that object