Representational state transfer ( REST ) Application Programming Interface (API) 3.0 is based on an intentful API philosophy. According to the intentful API philosophy the machine should handle the programming instead of the user enabling the datacenter administrator able to focus on the other task
There are three publicly available Nutanix APIs. Note that while you may see API v0.8 listed in the REST API Explorer in Nutanix Prism, it is strongly recommended to use v3 APIs wherever possible.
-
v1 (Prism Element only)
-
v2.0 (Prism Element only)
-
v3 (Prism Central only)
cURL Command Analysis
As an extra step, let’s take the v3 API request above and look at what each part of the command is doing. If you are familiar with using cURL to make API requests, this will look very familiar.
-
curl -X POST – Run cURL and specify that we will be making an HTTP POST request (as opposed to HTTP GET)
-
https://tprism_central_virtual_ip]:9440/api/nutanix/v3/vms/list – Specify the complete request URL
-
-H ‘Accept: application/json’ – Specify the content types the client is able to understand
REST API Explorer can be accessed form Prism element or Prism Central
-
Log into Prism Central. click on user profile and select rest api explorer
-
Find the line for the object you want to explore and click Expand Operations
For further details and details on each version of API please follow this links