Querying the Member List of a Privilege Set
Function
This API is used to query the member list of a privilege set.
Calling Method
For details, see Calling APIs.
URI
GET /v1/{project_id}/security/permission-sets/{permission_set_id}/members
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. For details about how to obtain the project ID, see Project ID and Account ID. |
| permission_set_id | Yes | String | Permission set ID. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| limit | No | Integer | Number of items displayed on each page |
| offset | No | Integer | Offset, which is the position where the query starts. The value must be greater than or equal to 0. |
| member_name | No | String | Member name. |
| member_type | No | String | Member type, which is USER, USER_GROUP, WORKSPACE_ROLE. |
| order_by | No | String | Sorting parameter. The options are CREATE_TIME and MEMBER_NAME. |
| order_by_asc | No | Boolean | Indicates whether to sort data in ascending order. This parameter is valid only when the sorting parameter is specified. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| workspace | Yes | String | Workspace ID. For details about how to obtain the workspace ID, see Instance ID and Workspace ID. |
| X-Auth-Token | Yes | String | IAM token, which is obtained by calling the IAM API for obtaining a user token (value of X-Subject-Token in the response header). This parameter is mandatory for token authentication. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| total | Integer | Specifies the total number of events. |
| permission_set_members | Array of PermissionSetMember objects | Member list. |
| Parameter | Type | Description |
|---|---|---|
| id | String | id. |
| permission_set_id | String | Permission set ID. |
| project_id | String | Project ID. |
| instance_id | String | Instance ID. |
| member_type | String | Member type, which can be user, user group, workspace role (discarded), or cluster role. The value is USER, USER_GROUP, WORKSPACE_ROLE, CLUSTER_ROLE. |
| member_id | String | Member ID. |
| member_name | String | Member name. |
| member_status | String | Member status. The value can be NORMAL or UNFINISHED. |
| workspace | String | Workspace (required only for workspace roles). |
| cluster_type | String | Cluster type (required only for cluster roles), which can be MRS, DLI, or GaussDB(DWS). |
| cluster_id | String | Cluster ID (required only for cluster roles). |
| cluster_name | String | Cluster name (required only for cluster roles). |
| create_time | Long | Time when the bandwidth was specified. |
| create_user | String | Creator. |
| deadline | Long | Expiration time. |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. |
| error_msg | String | Error message. |
Example Requests
/v1/0833a5737480d53b2f25c010dc1a7b88/security/permission-sets/members
Example Responses
Status code: 200
OK
{
"permission_set_members" : [ {
"cluster_id" : null,
"cluster_name" : null,
"cluster_type" : null,
"create_time" : 1698204793000,
"create_user" : "ei_dayu_test_01",
"deadline" : null,
"id" : "d9ff4b06db43e3d4f81de1e60077a480",
"instance_id" : "dd97167b873d4a79b2aad54d4370a3bc",
"member_id" : "b43927a45a514e93ba70524b28923500",
"member_name" : "common_user",
"member_status" : "NORMAL",
"member_type" : "USER",
"permission_set_id" : "fea96c90024711b8bf8d6886407b814b",
"project_id" : "0833a5737480d53b2f25c010dc1a7b88",
"workspace" : null
} ],
"total" : 1
} Status Codes
| Status Code | Description |
|---|---|
| 200 | OK |
| 400 | Bad Request |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.