Get Management Node Roles
Headers
Authorization: OAuth the-session-uuidCurl Example
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/zsv/nodes/rolesParameter List
| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| systemTags (Optional) | List | query | System tags | 4.10.7 | |
| userTags (Optional) | List | query | User 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"
}
]
}
]
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| success | boolean | Whether the request succeeded | 4.10.7 |
| inventories | List | For details, see inventories | 4.10.7 |
| error | ErrorCode | The error code. If not null, the operation has failed. This field is null when the operation succeeds. For details, see error | 4.10.7 |
inventories
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The UUID of the Management Node. Uniquely identifies the resource. | 4.10.7 |
| compute | boolean | Whether the node is a Compute Node | 4.10.7 |
error
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | The error code number. A globally unique identifier for the error, for example, SYS.1000, HOST.1001. | 0.6 |
| description | String | A brief description of the error. | 0.6 |
| details | String | The detailed error information. | 0.6 |
| elaboration | String | A reserved field. Default is null. | 0.6 |
| opaque | LinkedHashMap | A reserved field. Default is null. | 0.6 |
| cause | ErrorCode | The 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()