Querying Agency Permission Details
Function
This API is used to querying agency permission details.
URI
GET /v5/{project_id}/agency/{agency_name}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID of a tenant in a region. For details about how to obtain the project ID, see Obtaining a Project ID. |
agency_name |
Yes |
String |
Agency name. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token obtained from IAM. It is a response to the IAM API for obtaining a user token. After a request is processed, the value of X-Subject-Token in the header is the token value. |
X-Language |
No |
String |
Request language type. The default value is en-us. Values:
|
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
is_existed |
Boolean |
Whether an agency exists. |
name |
String |
Agency name. |
roles |
Array of AgencyRole objects |
Policy information bound to the agency. |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Policy name. |
description |
String |
Policy description. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Example Request
Querying agency permission details
https://{endpoint}/v5/054e292c9880d4992f02c0196d3ea468/agency/DRS_AGENTCY
Example Response
Status code: 200
Success.
{ "is_existed" : true, "name" : "DRS_AGENTCY", "roles" : [ { "name" : "DRS FullAccess", "description": "policy description 1" }, { "name" : "Tenant Administrator", "description": "policy description 2" } ] }
Status Code
Status Code |
Description |
---|---|
200 |
Success. |
400 |
Client error. |
500 |
Server error. |
Error Code
For details, see Error Code.
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