Updated on 2023-07-05 GMT+08:00

Querying All Permissions of an Agency

Function

This API is provided for the administrator to query all permissions that have been assigned to an agency.

The API can be called using both the global endpoint and region-specific endpoints. For IAM endpoints, see Regions and Endpoints.

URI

GET /v3.0/OS-INHERIT/domains/{domain_id}/agencies/{agency_id}/roles/inherited_to_projects

Table 1 URI parameters

Parameter

Mandatory

Type

Description

agency_id

Yes

String

Agency ID. For details about how to obtain the agency ID, see Obtaining Account, IAM User, Group, Project, Region, and Agency Information.

domain_id

Yes

String

Account ID of the delegating party. For details about how to obtain the account ID, see Obtaining Account, IAM User, Group, Project, Region, and Agency Information.

Request Parameters

Table 2 Parameters in the request header

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Access token issued to a user to bear its identity and permissions.

For details about the permissions required by the token, see Actions.

Response Parameters

Table 3 Parameters in the response body

Parameter

Type

Description

roles

Array of objects

Permission information.

links

object

Resource link information.

Table 4 roles

Parameter

Type

Description

id

String

Permission ID.

links

object

Permission resource link.

name

String

Permission name.

Table 5 links

Parameter

Type

Description

self

String

Resource link.

Example Request

Request for querying all permissions of an agency

GET https://iam.myhuaweicloud.com/v3.0/OS-INHERIT/domains/{domain_id}/agencies/{agency_id}/roles/inherited_to_projects

Example Response

Status code: 200

The request is successful.

{ 
  "roles" : [ 
      { 
          "name" : "system_all_154", 
          "links" : { 
                       "self" : "https://internal.iam.ctcclouddev.com/v3/roles/04570dfe267c45a3940e1ae9de868..." 
                      }, 
          "id" : "04570dfe267c45a3940e1ae9de868..." 
        }, 
      { 
          "name" : "test1_admin", 
          "links" : { 
                        "self" : "https://internal.iam.ctcclouddev.com/v3/roles/1bf20f1adba94747a6e02e1be3810..." 
                       }, 
          "id" : "1bf20f1adba94747a6e02e1be3810..." 
        }
      ], 
  "links" : { 
          "self" : "https://internal.iam.ctcclouddev.com/v3.0/OSHERIT/domains/05b09b4723001dc90f27c0008f8b1.../agencies/08c6652e86801d234f01c00078308.../roles/inherited_to_projects" 
              } 
}

Status Codes

Status Code

Description

200

The request is successful.

401

Authentication failed.

403

Access denied.

404

The requested resource cannot be found.

500

Internal server error.

Error Codes

For details, see Error Codes.