Nutanix REST API

  • 30 January 2014
  • 2 replies
Nutanix REST API
Badge +3
  • Nutanix Employee
  • 3 replies
Note: This article refers to an old version of the Nutanix software. You can find the latest documentation about the REST API on the Nutanix support portal.

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 Explorer

Nutanix 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.
  1. Connect to the Nutanix web console.
  2. 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]
  3. Show/Hide: Expand or reduce the detail shown for the object
  4. List Operations: Show all operations which can be run on this object
  5. Expand Operations: Show the detailed view of the operations which can be run on this object
  6. Raw: Display the JSON definition of the API for that object

  • Click GET on the first line to show the details for this API call. The explorer displays the parameters which can be passed when this action is used.

  • Click Try it out! to test the API call when used with your cluster.

    The test will display the request URL required for scripting, as well as sample responses expected from the API call.

  • This topic has been closed for comments

    2 replies

    Badge +7
    Shameless plug, but I've stood up a site dedicated to providing PrismAPI examples (primarily in Objc).

    Currently available lessons include:

    • Lesson 1 - Load Web Content in iOS AppCustom
    • Lesson 2 - Exploring the Nutanix PrismAPICustom
    • Lesson 3 - Authenticating to the Nutanix PrismAPICustom
    • Lesson 4 - Retrieving Information from the Nutanix PrismAPICustom
    • Lesson 5 - Analyzing Data Retrieved via the Nutanix PrismAPICustom
    • Lesson 6 - Creating a Container via the Nutanix PrismAPICustom
    • Lesson 7 - Telework Concept: Deploy vDesktops if Snow is in the Forecast
    • Lesson 8 - An Intro to Estimote Beacons (How NearTheX was built)