This API is used to view an authorization list.
GET /v2/{project_id}/authorizations
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain a project ID, see Obtaining a Project ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
sort_by |
No |
String |
Sorting field. Options:
Default: user_name |
order |
No |
String |
Sorting method. Options:
Default: asc |
limit |
No |
Integer |
Maximum number of records returned on each page. Default value: 1000 The value ranges from 1 to 1000. |
offset |
No |
Integer |
Start page of the paging list. The default value is 0. |
None
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 type is set to agency. |
type |
String |
Authorization type. Agency is recommended. Options:
Default: agency |
content |
String |
Authorization content.
|
secret_key |
String |
Secret Access Key (SK). This field is required only when Authorization Method is set to AK/SK. |
create_time |
Long |
Timestamp when the quality job was created. |
View an authorization list.
GET https://{endpoint}/v2/{project_id}/authorizations
Status code: 200
OK
{ "total_count" : 1, "auth" : [ { "user_id" : "****d80fb058844ae8b82aa66d9fe****", "user_name" : "iam-user01", "type" : "agency", "content" : "modelarts_agency", "create_time" : 15657747821288 } ] }
Status Code |
Description |
---|---|
200 |
OK |
400 |
Bad Request |
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not Found |
See Error Codes.