Node status requests
Method | Path | Description |
---|---|---|
GET | /v1/nodes/status | Get the status of all nodes |
GET | /v1/nodes/{uid}/status | Get a node’s status |
Get all node statuses
GET /v1/nodes/status
Gets the status of all nodes. Includes each node’s hostname and role in the cluster:
Primary nodes return
"role": "master"
Replica nodes return
"role": "slave"
Required permissions
Permission name |
---|
view_node_info |
Request
Example HTTP request
GET /nodes/status
Request headers
Key | Value | Description |
---|---|---|
Host | cnm.cluster.fqdn | Domain name |
Accept | application/json | Accepted media type |
Response
For each node in the cluster, returns a JSON object that contains the node’s hostname and role.
Example JSON body
{
"1": {
"hostname": "3d99db1fdf4b",
"role": "master"
},
"2": {
"hostname": "fc7a3d332458",
"role": "slave"
},
"3": {
"hostname": "b87cc06c830f",
"role": "slave"
}
}
Status codes
Code | Description |
---|---|
200 OK | No error |
Get node status
GET /v1/nodes/{int: uid}/status
Gets the status of a node. Includes the node’s hostname and role in the cluster:
Primary nodes return
"role": "master"
Replica nodes return
"role": "slave"
Required permissions
Permission name |
---|
view_node_info |
Request
Example HTTP request
GET /nodes/1/status
Request headers
Key | Value | Description |
---|---|---|
Host | cnm.cluster.fqdn | Domain name |
Accept | application/json | Accepted media type |
URL parameters
Field | Type | Description |
---|---|---|
uid | integer | The node’s unique ID. |
Response
Returns a JSON object that contains the node’s hostname and role.
Example JSON body
{
"hostname": "3d99db1fdf4b",
"role": "master"
}
Status codes
Code | Description |
---|---|
200 OK | No error |
404 Not Found | Node UID does not exist |