Help Center/ ModelArts/ API Reference/ Authorization Management/ Verifying Agency Permissions
Updated on 2026-11-12 GMT+08:00

Verifying Agency Permissions

Function

This API is used to check whether the current user has the permission to use the specified agency. Only ModelArts agencies are supported. This parameter is determined by the iam:agencies:pass authentication of PDP5.

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

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 Policies 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

POST /v2/{project_id}/atelier/agency/verify

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition: Project ID. For details, see Obtaining a Project ID and Name.

Constraints: N/A

Range: N/A

Default Value: N/A

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

agency_name

Yes

String

Definition

Authorization content.

  • When the authorization type is agency, this field is the agency name.

  • When the authorization type is access key, this field is the access key ID (AK).

Range: The value can contain at most 64 characters.

Response Parameters

Status code: 200

Table 3 Response header parameters

Parameter

Type

Description

X-request-id

String

This field is the request ID number for task tracking. Format is request_uuid-timestamp-hostname.

Table 4 Response body parameters

Parameter

Type

Description

is_authorized

Boolean

Whether you have the permission to use the agency. true indicates that you have the permission, and false indicates that you do not have the permission.

agency_name

String

Definition

Authorization content.

  • When the authorization type is agency, this field is the agency name.

  • When the authorization type is access key, this field is the access key ID (AK).

Range: The value can contain at most 64 characters.

Status code: 400

Table 5 Response header parameters

Parameter

Type

Description

X-request-id

String

This field is the request ID number for task tracking. Format is request_uuid-timestamp-hostname.

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Requests

{
  "agency_name" : "modelarts_agency"
}

Example Responses

Status code: 200

{
  "is_authorized" : true,
  "agency_name" : "modelarts_agency"
}

Status Codes

Status Code

Description

200

Agency verified.

400

Error response

Error Codes

See Error Codes.