Help Center> CodeArts Deploy> API Reference> APIs> Managing Host Cluster Permissions> Querying the Host Cluster Permission Matrix
Updated on 2024-07-05 GMT+08:00

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

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

group_id

Yes

String

Host cluster ID

Minimum: 32

Maximum: 32

Request Parameters

Table 2 Request header 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.

Minimum: 0

Maximum: 20000

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

[items]

Array of DevUcClusterPermission objects

Host cluster permission matrix

Table 4 DevUcClusterPermission

Parameter

Type

Description

region

String

Region information

role_id

String

Role ID

Minimum: 1

Maximum: 40

devuc_role_id_list

Array of strings

Role ID list

Minimum: 32

Maximum: 32

name

String

Role name

Minimum: 2

Maximum: 64

group_id

String

Host cluster ID

Minimum: 32

Maximum: 32

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.

Minimum: 0

Maximum: 128

Enumeration values:

  • project-customized

  • template-project-customized

  • template-customized-inst

  • cluster-creator

  • project_admin

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.