Updated on 2026-07-24 GMT+08:00

Obtain Training Quotas

Function

This API is used to obtain the training resource quota of a user in ModelArts.

This API is used when you need to know the available training resource quota. Before using this API, ensure that you have logged in and have the permission to view the quota. The response body contains the number of created training jobs and the number of remaining training jobs that can be created. If you do not have the required permission or the quota information is empty, the API will return an error message or an empty list.

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 permission required for calling this API.

URI

GET /v2/{project_id}/training-quotas

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

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

user_id

No

String

Definition: User ID.

Constraints: N/A

Range: N/A

Default Value: N/A

resource

No

String

Definition: Resource type of the quota.

Constraints: The supported parameter is job-num, which indicates job quotas.

Range: N/A

Default Value: N/A

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

quotas

Array of TrainingQuotaResponse objects

Definition: Quota group of a training job.

Table 4 TrainingQuotaResponse

Parameter

Type

Description

resource

String

Definition: Resource type of quotas. The value can be job-num, which indicates job quotas.

Range: N/A

quota

Integer

Definition: Number of quotas.

Range: N/A

used

Integer

Definition: Number of used quotas.

Range: N/A

Example Requests

GET https://{endpoint}/v2/{project_id}/training-quotas?user_id=fa412c98-6d94-42a2-891a-99cd1da93916&resource=job-num

Example Responses

Status code: 200

Training job quota response body

{
  "quotas" : [ {
    "resource" : "job-num",
    "quota" : 10000,
    "used" : 25
  } ]
}

Status Codes

Status Code

Description

200

Training job quota response body

Error Codes

See Error Codes.