Help Center/ ModelArts/ API Reference/ Development Environment Management/ Querying the Switch and Quota of a Specified Feature of the Current User
Updated on 2025-11-19 GMT+08:00

Querying the Switch and Quota of a Specified Feature of the Current User

Function

This API is used to query the switch status and quota information of a specified feature of the current user. This API is used when you need to know whether a specific feature is enabled, check the quota limit, or monitor the used resources. Before using this API, ensure that you have logged in and have the query permission, and the specified feature must exist. After this API is called, the system returns the details, such as whether the feature is enabled, total quota, and used resources. If you do not have the required permission, the feature does not exist, or the system is abnormal, 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/{project_id}/authoring/features/{feature}

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: The value can contain 1 to 64 characters. Letters, digits, and hyphens (-) are allowed.

Range: N/A

Default Value: N/A

feature

Yes

String

Definition: Feature name.

Constraints: N/A

Range

  • NOTEBOOK: notebook instance explicitly created by you.

Default Value: NOTEBOOK

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

create_at

Long

Definition: UTC time when the instance is created, accurate to millisecond.

Range: N/A

enabled

Boolean

Definition: Feature switch.

Range: Boolean

  • true: enable

  • false: disabled.

id

String

Definition: Feature ID.

Range: N/A

name

String

Definition: Feature name.

Range:

  • NOTEBOOK: notebook instance explicitly created by you.

quota

Integer

Definition: Feature quota.

Range: N/A

used

Integer

Definition: Feature quota used.

Range: N/A

update_at

Long

Definition: Time (UTC) when the instance was last updated, accurate to millisecond.

Range: N/A

user_id

String

Definition: User ID.

Range: N/A

Status code: 401

Table 3 Response body parameters

Parameter

Type

Description

error_code

String

  • Definition: ModelArts error code.

Range: N/A

error_msg

String

Definition: Error message.

Range: N/A

Status code: 403

Table 4 Response body parameters

Parameter

Type

Description

error_code

String

  • Definition: ModelArts error code.

Range: N/A

error_msg

String

Definition: Error message.

Range: N/A

Status code: 404

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

  • Definition: ModelArts error code.

Range: N/A

error_msg

String

Definition: Error message.

Range: N/A

Example Requests

None

Example Responses

Status code: 200

Request succeeded.

{
  "create_at" : 1597119549430,
  "enabled" : true,
  "id" : "432hkjk3424kh432nb432km543m423m32",
  "name" : "NOTEBOOK",
  "quota" : 1000,
  "update_at" : 1735818559236,
  "used" : 300,
  "user_id" : "43278947598432457983257243532"
}

Status Codes

Status Code

Description

200

Request succeeded.

401

Unauthorized.

403

Forbidden.

404

Not found.

Error Codes

See Error Codes.