Viewing an Authorization List
Function
This API is used to view an authorization list.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
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. Enums:
|
order |
No |
String |
Sorting order. Enums:
|
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, see Obtaining a Username and 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.
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