Querying Quotas
Function
This API is used to query a resource quota and the used amount. The current resource refers to alarm rules only.
URI
GET /V1.0/{project_id}/quotas
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Definition Project ID. It is used to specify the project that an asset belongs to. You can query the assets of a project by project ID. You can obtain the project ID from the API or console. For details, see Obtaining a Project ID. Constraints N/A Range 1 to 64 characters Default Value N/A |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
Content-Type |
No |
String |
Definition MIME type of the request body. Constraints N/A Range 1 to 64 characters Default Value The default value is application/json; charset=UTF-8. For APIs used to upload objects or images, the MIME type varies with the flow type. |
|
X-Auth-Token |
No |
String |
Definition User token. Constraints N/A Range 1 to 16,384 characters Default Value N/A |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
quotas |
QuotasResp object |
Definition: Quota list. |
|
Parameter |
Type |
Description |
|---|---|---|
|
resources |
Array of ResourceQuotasResp objects |
Definition: Resource quota list. |
|
Parameter |
Type |
Description |
|---|---|---|
|
type |
String |
Definition: Quota type. Range: The value can be:
|
|
used |
Long |
Definition: Used amount of the quota. Range: N/A |
|
unit |
String |
Definition: Unit. Range: 0 to 32 characters |
|
quota |
Long |
Definition: Total quotas. Range: N/A |
|
min |
Long |
Definition: Minimum value. Range: N/A |
|
max |
Long |
Definition: Maximum value. Range: N/A |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
- |
String |
Request error. |
Status code: 401
|
Parameter |
Type |
Description |
|---|---|---|
|
- |
String |
The authentication information is not provided or is incorrect. |
Status code: 403
|
Parameter |
Type |
Description |
|---|---|---|
|
- |
String |
Access to the requested page is forbidden. |
Status code: 408
|
Parameter |
Type |
Description |
|---|---|---|
|
- |
String |
The request timed out. |
Status code: 429
|
Parameter |
Type |
Description |
|---|---|---|
|
- |
String |
Too many requests. |
Status code: 500
|
Parameter |
Type |
Description |
|---|---|---|
|
- |
String |
Failed to complete the request because of an internal service error. |
Status code: 503
|
Parameter |
Type |
Description |
|---|---|---|
|
- |
String |
The system is currently unavailable. |
Example Requests
/V1.0/{project_id}/quotas
Example Responses
Status code: 200
OK
{
"quotas" : {
"resources" : [ {
"unit" : "",
"type" : "alarm",
"quota" : 1000,
"used" : 10
} ]
}
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
OK |
|
400 |
Bad Request |
|
401 |
Unauthorized |
|
403 |
Forbidden |
|
408 |
Request Timeout |
|
429 |
Too Many Requests |
|
500 |
Internal Server Error |
|
503 |
Service Unavailable |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.