- API Reference
- Authorization Management
- Viewing an Authorization List
Viewing an Authorization List¶
Function¶
This API is used to view an authorization list.
URI¶
GET /v2/{project_id}/authorizations
Parameter | Mandatory | Type | Description |
---|---|---|---|
project_id | Yes | String | Project ID. For details, see Obtaining a Project ID and Name. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
sort_by | No | String | Sorting field. Options:
|
order | No | String | Sorting method. Options:
|
limit | No | Integer | Maximum number of records returned on each page. Default value: 1000 The value range ranges from 1 to 1000. |
offset | No | Integer | Start page for pagination display. The default value is 0. |
Request Parameters¶
None
Response Parameters¶
Status code: 200
Parameter | Type | Description |
---|---|---|
total_count | Number | Authorization information. |
auth | Array of AuthorizationResponse objects | Authorization information list. |
Parameter | Type | Description |
---|---|---|
user_id | String | User ID. For details about how to obtain a user ID, see Obtaining a User ID. If user_id is set to all, all IAM users are authorized. If some IAM users have been authorized, the authorization setting will be updated. This parameter is mandatory only if the authorization method is set to Agency. |
type | String | Authorization type. Agency is recommended. Options:
|
content | String | Authorization content.
|
secret_key | String | Secret Access Key (SK). This field is required only when Authorization Method is set to AK/SK. |
user_name | String | Username. If user_id is set to all-users, all users will be displayed. |
create_time | Long | Timestamp when a training job was created |
Example Requests¶
View an authorization list.
GET https://{endpoint}/v2/{project_id}/authorizations
Example Responses¶
Status code: 200
OK
{
"total_count" : 1,
"auth" : [ {
"user_id" : "****d80fb058844ae8b82aa66d9fe****",
"user_name" : "iam-user01",
"type" : "agency",
"content" : "modelarts_agency",
"create_time" : 15657747821288
} ]
}
Status Codes¶
Status Code | Description |
---|---|
200 | OK |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
Error Codes¶
See Error Codes.