Querying the Host Cluster Permission Matrix
Function
This API is used to query the permission matrix of a host cluster by ID.
Calling Method
For details, see Calling APIs.
URI
GET /v2/host-groups/{group_id}/permissions
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| group_id | Yes | String | Host cluster ID |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | User token. It can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| [items] | Array of DevUcClusterPermission objects | Host cluster permission matrix |
| Parameter | Type | Description |
|---|---|---|
| region | String | Region information |
| role_id | String | Role ID |
| devuc_role_id_list | Array of strings | Role ID list |
| name | String | Role name |
| group_id | String | Host cluster ID |
| can_view | Boolean | Whether you have the view permission |
| can_edit | Boolean | Whether you have the edit permission |
| can_delete | Boolean | Whether you have the delete permission |
| can_add_host | Boolean | Whether you have the permission to add hosts |
| can_manage | Boolean | Whether you can manage permissions |
| can_copy | Boolean | Whether you have the clone permission |
| create_time | String | Creation time |
| update_time | String | Modification time |
| role_type | String | Role type. project-customized: Custom roles. template-project-customized: System-defined roles. template-customized-inst: System roles. cluster-creator: Cluster creator. project_admin: Project creator. |
Example Requests
https://{endpoint}/v2/host-groups/2a8c2da888c04a5eaff10d0787c90ea4/permissions Example Responses
Status code: 200
OK: The request is successful.
[ {
"region" : "region",
"name" : "Host cluster creator",
"role_id" : "0",
"devuc_role_id_list" : null,
"group_id" : "2a8c2da888c04a5eaff10d0787c90ea4",
"can_view" : true,
"can_edit" : true,
"can_delete" : true,
"can_add_host" : true,
"can_manage" : true,
"can_copy" : true,
"create_time" : "2024-05-31 14:32:59.0",
"update_time" : "2024-05-31 14:32:59.0",
"role_type" : "cluster-creator"
}, {
"region" : "region",
"name" : "Project admin",
"role_id" : "a2e65d2647574f8491cac659a0249d24",
"devuc_role_id_list" : null,
"group_id" : "2a8c2da888c04a5eaff10d0787c90ea4",
"can_view" : true,
"can_edit" : true,
"can_delete" : true,
"can_add_host" : true,
"can_manage" : true,
"can_copy" : true,
"create_time" : "2024-05-31 14:32:59.0",
"update_time" : "2024-05-31 14:32:59.0",
"role_type" : "project"
} ] Status Codes
| Status Code | Description |
|---|---|
| 200 | OK: The request is successful. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.