Updated on 2024-01-15 GMT+08:00

Querying Quota Information About an Account

Function

This API is used to query quota information about an account.

URI

GET /v1/{project_id}/dbss/audit/quota

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

No

String

Project ID

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

audit_quota

Long

Remaining instance quota.

cpu

Long

Remaining CPU quota.

project_id

String

Project ID.

ram

Long

Remaining memory quota.

Status code: 400

Table 4 Response body parameters

Parameter

Type

Description

error

Object

Error message.

Table 5 ErrorDetail

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error information.

Status code: 403

Table 6 Response body parameters

Parameter

Type

Description

error

Object

Error message.

Table 7 ErrorDetail

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error information.

Status code: 500

Table 8 Response body parameters

Parameter

Type

Description

error

Object

Error message.

Table 9 ErrorDetail

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error information.

Example Requests

/v1/{project_id}/dbss/audit/quota

Example Responses

Status code: 200

Success

{
  "projectId" : "0250cb8a80c24c0b9f20f557cb159aad",
  "cpu" : 796,
  "ram" : 1622016,
  "audit_quota" : 1
}

Status code: 400

Client error.

{
  "error" : {
    "error_code" : "DBSS.XXXX",
    "error_msg" : "XXX"
  }
}

Status Codes

Status Code

Description

200

Success

400

Client error.

403

Authentication failed.

500

Server error.

Error Codes

See Error Codes.