Listing Authorization Records
Function
This API is used to list authorization records.
URI
GET /v1/{project_id}/authorization/cooperate-authorization/rules
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For how to obtain the project ID, see Obtaining a Project ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
auth_level |
No |
String |
Level of the authorization entity.
|
filter_authed |
No |
Boolean |
Whether to filter authorized entities. The default value is true, indicating that only authorized users and user groups are displayed. Reserved field. |
resource_id |
Yes |
String |
Resource ID |
resource_type |
Yes |
String |
Explanation Enumerated value of the resource type, which is used to specify the type of the authorized object. For example, datasource indicates that the type of the authorized object is a data source. Constraints N/A Value range The enumerated values are:
Default value N/A |
auth_name |
No |
String |
Authorization entity name. |
limit |
No |
Integer |
Number of records displayed on each page. |
offset |
No |
Integer |
Offset. |
sort_dir |
No |
String |
asc: ascending order; desc: descending order. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Workspace-Id |
Yes |
String |
Workspace ID. For how to obtain it, see Obtaining a Workspace ID. |
X-Auth-Token |
Yes |
String |
User token. Obtain a user token by calling IAM's API. X-Subject-Token in the response header is the desired user token. For how to obtain a token, see Authentication. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
page_data |
Array of objects |
Pagination list content. For parameter types, see CooperateAuthorizationRuleVO. |
count |
Integer |
Total number of records. |
Parameter |
Type |
Description |
---|---|---|
auth_id |
String |
Authorization entity ID. |
auth_level |
String |
Authorization entity level. The options include:
|
auth_name |
String |
Authorization entity name. |
authed |
Boolean |
Whether it is authorized. |
authority |
String |
Permissions. The options include:
|
create_date |
Long |
Creation time. |
create_user |
String |
Creator ID. |
create_user_name |
String |
Creator name. |
id |
String |
ID of an authorization record, which has no actual meaning. |
is_owner |
Boolean |
Whether the user is the resource owner. |
resource_id |
String |
Resource ID. |
resource_type |
String |
Explanation Enumerated value of the resource type, which is used to specify the type of the authorized object. For example, datasource indicates that the type of the authorized object is a data source. Constraints N/A Value range The enumerated values are:
Default value N/A |
sort |
Integer |
Sorting field, which has no actual meaning. |
update_date |
Long |
Modification time. |
update_user |
String |
Modifier ID. |
update_user_name |
String |
Modifier name. |
Example Request
List authorization records.
GET https://{endpoint}/v1/xxxx3ab4dac4055888643b331axxxx/authorization/cooperate-authorization/rules?resource_type=dataset&resource_id=f8e5406b-8662-4adb-a028-a55c76ae1166&auth_level=user&filer_authed=false&limit=20&offset=0&sort_dir=asc
Example Response
Status code: 200
OK.
{ "page_data" : [ { "create_date" : 1690593374608, "create_user" : "xxxxxf45cea249a2aa648a20e46xxxxx", "create_user_name" : "xxxxxx", "update_date" : 1690593374608, "update_user" : "558def45cea249a2aa648a20e46xxxxx", "update_user_name" : "xxxxx", "id" : "73281a3b-a828-494a-bb0d-e88c688a5e81", "resource_type" : "dashboard", "resource_id" : "e3158b30-30bc-495a-b0d8-59e66e1xxxxx", "auth_level" : "user", "auth_id" : "xxxxf45cea249a2aa648a20e46xxxx", "auth_name" : "xxxxxx", "is_owner" : true, "authed" : true, "sort" : 4, "authority" : "edit" }, { "create_date" : 1690593374608, "create_user" : "xxxxxf45cea249a2aa648a20e46xxxxx", "create_user_name" : "xxxxxx", "update_date" : 1690593374608, "update_user" : "558def45cea249a2aa648a20e46xxxxx", "update_user_name" : "xxxxx", "id" : "73281a3b-a828-494a-bb0d-e88c688a5e81", "resource_type" : "dashboard", "resource_id" : "e3158b30-30bc-495a-b0d8-59e66e1xxxxx", "auth_level" : "user", "auth_id" : "xxxxf45cea249a2aa648a20e46xxxx", "auth_name" : "xxxxxx", "is_owner" : true, "authed" : true, "sort" : 4, "authority" : "edit,export" } ], "count" : 2147483647 }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
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.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot