Query Quota

GET/zstack/v1/accounts/quotas

Headers

Authorization: OAuth the-session-uuid

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth YOUR_SESSION_UUID" \
-X GET http://localhost:8080/zstack/v1/accounts/quotas?q=name=test

Queryable Fields

Run the CLI tool, type QueryQuota, and press Tab to view all queryable fields and cross-table queryable resource names.

API Response

Response example

{
  "inventories": [
    {
      "name": "quota",
      "identityUuid": "b30cc832a5493fe2a6184a78fc20c410",
      "value": 20
    }
  ]
}
NameTypeDescriptionStarting Version
successboolean 0.6
errorErrorCodeError code. If not null, the operation failed. This field is null on success. For details, see error0.6
inventoriesListFor details, see inventories0.6

error

NameTypeDescriptionStarting Version
codeStringThe error code number. A globally unique identifier for the error, e.g., SYS.1000, HOST.10010.6
descriptionStringA brief description of the error0.6
detailsStringDetailed information about the error0.6
elaborationStringReserved field. Default is null0.6
opaqueLinkedHashMapReserved field. Default is null0.6
causeErrorCodeThe root error that caused the current error. This field is null if there is no root cause0.6

inventories

NameTypeDescriptionStarting Version
nameStringResource name0.6
identityUuidStringIdentity UUID (account UUID or user UUID)0.6
identityTypeStringIdentity type (account or user)0.6
valueLongDefault quota value0.6
lastOpDateTimestampLast modification time0.6
createDateTimestampCreation time0.6

SDK Examples

Java SDK

QueryQuotaAction action = new QueryQuotaAction();
action.conditions = asList("name=test");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryQuotaAction.Result res = action.call();

Python SDK

QueryQuotaAction action = QueryQuotaAction()
action.conditions = ["name=test"]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryQuotaAction.Result res = action.call()