Get Management Node Roles

GET/zstack/v1/zsv/nodes/roles

Headers

Authorization: OAuth the-session-uuid

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/zsv/nodes/roles

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
systemTags (Optional)ListquerySystem tags 4.10.7
userTags (Optional)ListqueryUser tags 4.10.7

API Response

Response Example

{
  "inventories": [
    {
      "uuid": "ff000842a4673ab39dad7a3990df5300",
      "resourceType": "ManagementNodeVO",
      "roles": [
        {
          "uuid": "ff000842a4673ab39dad7a3990df5300",
          "resourceType": "ManagementNodeVO",
          "role": "management"
        },
        {
          "uuid": "ff0192fa70113da886101145c084bd00",
          "resourceType": "HostVO",
          "role": "compute"
        }
      ]
    }
  ]
}
NameTypeDescriptionStarting Version
successbooleanWhether the request succeeded4.10.7
inventoriesListFor details, see inventories4.10.7
errorErrorCodeThe error code. If not null, the operation has failed. This field is null when the operation succeeds. For details, see error4.10.7

inventories

NameTypeDescriptionStarting Version
uuidStringThe UUID of the Management Node. Uniquely identifies the resource.4.10.7
computebooleanWhether the node is a Compute Node4.10.7

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

SDK Examples

Java SDK

GetNodeRolesAction action = new GetNodeRolesAction();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetNodeRolesAction.Result res = action.call();

Python SDK

GetNodeRolesAction action = GetNodeRolesAction()
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetNodeRolesAction.Result res = action.call()