Help Center/ ModelArts/ API Reference/ Workspace Management/ Querying the Authorization Mode
Updated on 2025-11-19 GMT+08:00

Querying the Authorization Mode

Function

This API is used to obtain the authorization mode and permission configuration information of a specified resource or function. This API is used when system administrators can use this API to view the access permission settings of resources. Developers can use this API to verify whether authorization policies are correctly configured. Security auditors can use this API to check whether authorization configurations comply with security specifications. Before using this API, ensure that you have the query permission and the authorization mode of the target resource or function has been configured. After the API is called, the API returns details about the authorization mode, including the authorization mode type, rules, and permission scope. If you do not have the permission to access this API or the authorization mode of the target resource is not configured, the API will return an error message.

Debugging

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

URI

GET /v1/auth-mode

Request Parameters

Table 1 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition: User token. It can be obtained by calling the IAM API. The token is the value of X-Subject-Token in the response header.

Constraints: N/A

Range: N/A

Default Value: N/A

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

domain_id

String

Definition: Account domain ID.

Range: N/A

mode

String

Definition: Authorization mode.

Range

  • strict: strict mode

  • loose: non-strict mode

Example Requests

None

Example Responses

Status code: 200

The authorization mode is queried.

{
  "domain_id" : "06024304b180d5090fbac00141b6cae0",
  "mode" : "loose"
}

Status Codes

Status Code

Description

200

The authorization mode is queried.

Error Codes

See Error Codes.