API

Welcome to the Nutanix NEXT community. To get started please read our short welcome post. Thanks!

cancel
Showing results for 
Search instead for 
Did you mean: 

Where can we find Status Values in API V2

Trailblazer

Where can we find Status Values in API V2

How do we find all possible status values in the API?

We are building an API based app that tracks component status. Is there a way for us to find this data on our own?

When we drill down into the docs we just see items like 'state (string, optional),'

 

For example:

v2/clusters:entities/[*]/operation_mode (What are possible values and meaning of those values?)

v2/clusters:entities/[*]/health_status (same question)

 

This is just a small sample of the data we're looking for. How can we find a more detailed description of these?

4 REPLIES
Nutanix Employee

Re: Where can we find Status Values in API V2

 

Did you try http://developer.nutanix.com/reference/v2/ ?

 

That has a little more of an explanation. Let us know  if what you need isn't covered there.

 

thanks

Trailblazer

Re: Where can we find Status Values in API V2

The Status values and meanings are not listed.

 

If those values are defined in souce code please direct us there. Our other option is to systematically break our cluster to see the effects, but that is not a good option as we only have a single-host cluster.

 

Thank you,

Nutanix Employee

Re: Where can we find Status Values in API V2

@pcari

 

You can refer the below guide.

 

http://download.nutanix.com/documentation/v51/API-Ref-AOS-v51.pdf

 

You can find the "Status Codes" section in page 25

Trailblazer

Re: Where can we find Status Values in API V2

We are not referring to HTTP status. We're speaking about status of individual API data targets.

For example if you look at v2/disks and grab entities[i], there is a disk_status value.

 

We need to know all possible values of entities[0].disk_status, and what those values correlate to in plain english.

The API explorer tool simply states that its value is a string.

 

Also, other examples:

* {v2/hostss}.entities[i].state

* {v2/hostss}.entities[i].hypervisor_state

* {v2/hostss}.entities[i].metadata_store_status
* {v2/hostss}.entities[i].failover_cluster_node_state

Its clear that the developers who wrote the API know the values and meanings of all these, but its not clear to external users/developers.

 

These are not the only ones, I'm just providing examples. Bascially any property output by the API which has "state" or "status" in it, needs to be clarified. The alternative is for developers to attempt a systematic failure of their cluster which is not reliable.