Querying Workspace Resource Permission Policies
Function
Querying Workspace Resource Permission Policies
Calling Method
For details, see Calling APIs.
URI
GET /v1/{project_id}/security/permission-resource
|
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. |
|
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. |
|
policy_name |
No |
String |
Policy name. |
|
resource_name |
No |
String |
Name of an authorized resource |
|
member_name |
No |
String |
Member name. |
|
order_by |
No |
String |
Sorting parameter. The options are NAME and UPDATE_TIME. |
|
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 |
Number of workspace resource permission policies |
|
policies |
Array of PermissionResourcePolicy objects |
Workspace resource permission policies |
|
Parameter |
Type |
Description |
|---|---|---|
|
policy_id |
String |
Policy ID. |
|
policy_name |
String |
Policy name |
|
resources |
Array of ResourcePolicyItem objects |
Resources |
|
members |
Array of MemberPolicyItem objects |
Member list. |
|
create_time |
Long |
Creation time. |
|
create_user |
String |
Creating a User |
|
update_time |
Long |
Released On |
|
Parameter |
Type |
Description |
|---|---|---|
|
resource_id |
String |
Resource ID. |
|
resource_name |
String |
Resource name |
|
resource_type |
String |
Resource type. The value can be DATA_CONNECTION or AGENCY. |
|
Parameter |
Type |
Description |
|---|---|---|
|
member_id |
String |
Member ID |
|
member_name |
String |
Member name |
|
member_type |
String |
Member type. The value can be USER, USER_GROUP, or WORKSPACE_ROLE. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error message. |
Example Requests
v1/0833a5737480d53b2f25c010dc1a7b88/security/permission-resource?offset=0&limit=100&policy_name=TEST_POLICY_NAME
{
"limit" : 20,
"offset" : 0
}
Example Responses
Status code: 200
OK
{
"policies" : [ {
"create_time" : 1698202688000,
"create_user" : "ei_dayu_test_01",
"policy_id" : "fea96c90024711b8bf8d6886407b814b",
"policy_name" : "test_permission_resource",
"update_time" : 1698202688000,
"members" : [ {
"member_id" : "fea96c90024711b8bf8d6886407b814b",
"member_name" : "common_user",
"member_type" : "USER"
}, {
"member_id" : "0833a5736980d53b0f22c0102ffcbfc0",
"member_name" : "ei_dayu_test_usergroup_01",
"member_type" : "USER_GROUP"
} ],
"resources" : [ {
"resource_id" : "7c8a2d85d917492bb3195377cd9c36be",
"resource_name" : "hive",
"resource_type" : "DATA_CONNECTION"
} ]
} ],
"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.