|
Data
The administration node dictionary contains the following fields:
| ▪ | status
The current status of the administration node: |
| ▪ | running: The node is enabled and running. |
| ▪ | disabled: The node is disabled. |
| ▪ | degraded: The node is enabled but unreachable for the cluster. |
| ▪ | product
The product version of the administrion node. |
| ▪ | nodeid
The node ID (IPv4 or IPv6 address). |
| ▪ | system
Information about the host system’s operating system and version number. |
Expand /Collapse All Subsections
Request:
Method:
|
GET
|
URL:
|
/cluster/admins/
|
Arguments:
|
–
|
Response:
Return code
|
Arguments
|
Meaning
|
200
|
[ {admin1}, {admin2}, ...
{adminN} ]
|
list containing all administration nodes successfully returned
|
401
|
–
|
no login
|
403
|
–
|
not enough rights
|
500
|
–
|
internal server error
|
Example:
The following request retrieves a list of all administration servers within the cluster. In this case, there are two administration servers.
$ curl -u admin:admin -H 'Content-Type: application/json' http://127.0.0.1:8087/api/af/2.0/cluster/admins
{
"__name": "admins",
"__path": "/api/af/2.0/cluster/admins/",
"__subnodes": [
"127.0.0.1:8083",
"10.0.0.42:8083"
],
"nodes": {
"10.0.0.42:8083": {
"nodeid": "10.0.0.42:8083",
"product": null,
"status": "disabled",
"system": null,
"version": null
},
"127.0.0.1:8083": {
"nodeid": "127.0.0.1:8083",
"product": "development 0.0",
"status": "running",
"system": "Darwin-x86_64-11.4.0",
"version": "d2ae91164fc61f950297889a73dd7b61"
}
}
}
|
Request:
Method:
|
GET
|
URL:
|
/cluster/admins/NODEID
|
Arguments:
|
–
|
Response:
Return code
|
Arguments
|
Meaning
|
200
|
{ nodedata }
|
dictionary containing the data of the administration data successfully returned
|
401
|
–
|
no login
|
403
|
–
|
not enough rights
|
404
|
–
|
administration node not found
|
500
|
–
|
internal server error
|
Example:
The following request retrieves the data of the administration server with the node ID “127.0.0.1:8083”.
$ curl -u admin:admin -H 'Content-Type: application/json' http://127.0.0.1:8087/api/af/2.0/cluster/admins/127.0.0.1:8083
{
"__name": "127.0.0.1:8083",
"__path": "/api/af/2.0/cluster/admins/127.0.0.1:8083/",
"__subnodes": [],
"nodeid": "127.0.0.1:8083",
"product": "development 0.0",
"status": "running",
"system": "Darwin-x86_64-11.4.0",
"version": "d2ae91164fc61f950297889a73dd7b61"
}
|
Request:
Method:
|
POST
|
URL:
|
/cluster/admins
|
Arguments:
|
{ nodeid: NODEID }
|
You can only set the status to enabled or disabled, but you can’t set it to degraded.
Response:
Return code
|
Arguments
|
Meaning
|
200
|
–
|
administration node successfully added
|
401
|
–
|
no login
|
403
|
–
|
not enough rights
|
409
|
–
|
node already exists or malformed node ID
|
500
|
–
|
internal server error
|
Example:
The following request adds a new administration server to the cluster. The node ID of this new server is “10.0.0.42:8083” and its status is “disabled”.
$ curl -u admin:admin -H 'Content-Type: application/json' --data '{"nodeid":"10.0.0.42:8083", "status":"disabled"}' http://127.0.0.1:8087/api/af/2.0/cluster/admins
{
"__name": "10.0.0.42:8083",
"__path": "/api/af/2.0/cluster/admins/10.0.0.42:8083/",
"__subnodes": [],
"nodeid": "10.0.0.42:8083",
"product": null,
"status": "disabled",
"system": null,
"version": null
}
|
Request:
Method:
|
POST
|
URL:
|
/cluster/admins/NODEID
|
Arguments:
|
{ nodedata }
|
You can only set the status to enabled or disabled, but you can’t set it to degraded.
Response:
Return code
|
Arguments
|
Meaning
|
200
|
–
|
administration node successfully changed
|
401
|
–
|
no login
|
403
|
–
|
not enough rights
|
404
|
–
|
administration node not found
|
409
|
–
|
malformed node data
|
500
|
–
|
internal server error
|
|
Request:
Method:
|
DELETE
|
URL:
|
/cluster/admins/NODEID
|
Arguments:
|
–
|
Response:
Return code
|
Arguments
|
Meaning
|
200
|
–
|
administration node successfully deleted
|
401
|
–
|
no login
|
403
|
–
|
not enough rights
|
404
|
–
|
administration node not found
|
500
|
–
|
internal server error
|
Example:
The following request deletes the administration server with the node ID “10.0.0.42:8083” from the cluster.
$ curl -X DELETE -u admin:admin -H 'Content-Type: application/json' http://127.0.0.1:8087/api/af/2.0/cluster/admins/10.0.0.42:8083
{}
|
See also
REST Interface
Cluster Management
Decider Cluster REST Interface
Cluster Settings REST Interface
|