Updated on 2025-10-22 GMT+08:00

Creating an Agency

Function

This API is used to create an agency.

URI

POST /v1/{project_id}/cae/agencies

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. See Obtaining a Project ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

  • Obtain the token. For details, see "Obtaining a User Token" in Identity and Access Management API Reference (https://support.huaweicloud.com/intl/en-us/api-iam/iam_30_0001.html).

  • The value of X-Subject-Token in the response header is the token value.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

api_version

Yes

String

API version. Fixed value: v1.

kind

Yes

String

API type. Fixed value: Agency.

metadata

Yes

metadata object

Request data.

Table 4 metadata

Parameter

Mandatory

Type

Description

name

Yes

String

Agency name. Fixed value: cae_trust.

roles

No

Array of strings

List of existing agency permissions.

missing_roles

No

Array of strings

List of missing agency permissions.

Response Parameters

Status code: 204

Request succeeded.

None

Example Requests

Create agency cae_trust.

POST https://{endpoint}/v1/{project_id}/cae/agencies

{
  "api_version" : "v1",
  "kind" : "Agency",
  "metadata" : {
    "name" : "cae_trust"
  }
}

Example Responses

None

Status Codes

Status Code

Description

204

Request succeeded.

Error Codes

See Error Codes.