Updated on 2025-12-15 GMT+08:00

Querying Agency Permission Details

Function

This API is used to query agency permission details.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, no identity policy-based permissions are required for calling this API.

URI

GET /v5/{project_id}/agency/{agency_name}

Table 1 Path parameters

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

Table 2 Request header 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:

  • en-us
  • zh-cn

Response Parameters

Status code: 200

Table 3 Response body parameters

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.

Table 4 AgencyRole

Parameter

Type

Description

name

String

Policy name.

description

String

Policy description.

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 500

Table 6 Response body parameters

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.