Getting status of a node

Prev Next

To get the status of an node, make the following GET request:

curl -X GET \
  -H 'X-API-KEY:<your_api_key>' \
  -H "Content-type:application/json" \
  'https://<your_company>.manage.iotium.io/api/v1/node/<your_node_id>' \
  | jq '{node_state:.node_state, version:.status.node.info.version.software_version, IP: .status.node.addresses}'

The response includes the node status, version, and its public and private IP addresses:

{
  "node_state": "ALIVE",
  "version": "1564.1.6",
  "IP": [
    {
      "type": "InternalIP",
      "address": "<your_inode_private_ip>"
    },
    {
      "type": "ExternalIP",
      "address": "<your_inode_public_ip>"
    },
  ]
}

Note that the above GET request provides all the details about the specified node. You can filter for specific information that you need. For example, here is the same GET request with a different filter to get all the interfaces available on the node:

curl -X GET \
  -H 'X-API-KEY:<your_api_key>' \
  -H "Content-type:application/json" \
  'https://<your_company>.manage.iotium.io/api/v1/node/<your_node_id>' \
  | jq '.status.node.interfaces | .[].name'

With this filter, the response lists the names of all the node interfaces:

"p4p1"
"p4p2"
"wwp0s20u4u1i12"
"br-mgmt"
"ttyS0"
"ttyS1"
"ttyS2"
"ttyS3"