Query Management Node

GET/zstack/v1/management-nodes
GET/zstack/v1/management-nodes/{uuid}

Headers

Authorization: OAuth the-session-uuid

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth f5db0d0f90104a79b02c8f1c34dfc13b" \
-X GET http://localhost:8080/zstack/v1/management-nodes?q=uuid=2c0761c3720f4d2c93435f1b8edb1297
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 5ffa91907f3c4d0392d7daa73b1a0627" \
-X GET http://localhost:8080/zstack/v1/management-nodes/bc27558979364d7c9b34a7317965e0be

Queryable Fields

Run the CLI command-line tool, type QueryManagementNode and press the Tab key to view all queryable fields and cross-table queryable resource names.

API Response

Response Example

{
  "inventories": [
    {
      "uuid": "188b2c6376c34d3687c5a7a19685ffa6",
      "hostName": "127.0.0.1",
      "joinDate": "May 11, 2017 1:22:44 PM",
      "heartBeat": "May 11, 2017 1:22:44 PM"
    }
  ]
}
NameTypeDescriptionStarting Version
errorErrorCodeThe error code. If not null, the operation has failed. This field is null when the operation succeeds. For details, see error0.6
inventoriesListFor details, see inventories0.6

error

NameTypeDescriptionStarting Version
codeStringThe error code number. A globally unique identifier for the error, for example, SYS.1000, HOST.1001.0.6
descriptionStringA brief description of the error.0.6
detailsStringThe detailed error information.0.6
elaborationStringA reserved field. Default is null.0.6
opaqueLinkedHashMapA reserved field. Default is null.0.6
causeErrorCodeThe root error. The source error that caused the current error. If there is no root error, this field is null.0.6

inventories

NameTypeDescriptionStarting Version
uuidStringThe UUID of the resource. Uniquely identifies the resource.0.6
hostNameStringThe host name0.6
joinDateTimestampThe join time0.6
heartBeatTimestampThe heartbeat time0.6

SDK Examples

Java SDK

ueryManagementNodeAction action = new QueryManagementNodeAction();
action.conditions = asList("uuid=7c2075262bb44872b6ceaef5ee94b089");
action.sessionId = "293267e661d8400ca3808ff5f445a6e8";
QueryManagementNodeAction.Result res = action.call();

Python SDK

QueryManagementNodeAction action = QueryManagementNodeAction()
action.conditions = ["uuid=3bcbd030e10746eeba9f8ea938f2647a"]
action.sessionId = "21526cb97ac541b6b27192b4c671ec08"
QueryManagementNodeAction.Result res = action.call()