Get default quotas

Overview

Gets default quotas for a tenant.

Classification

  • Show

API Operation Object

  • os-quota-sets

Synchronous / Asynchronous

  • synchronous

Request

HTTP Request Method

  • GET

HTTP Request Path

{api_endpoint}/v2/{tenant_id}/os-quota-sets/{tenant_id}?defaults

HTTP Request Header

Format

Accept-Encoding: gzip, deflate, compress(optional)
Accept: application/json
X-Auth-Token: <token_id>

HTTP Request Body

Format

  • none

Request Parameter

Request Parameters
name style format description required/option default value action for invalid parameter response code for invalid parameter
tenant_id URL UUID(3) ID of the tenant required - Terminate * Follow a Common Error Code
token_id Header String(token_id) Keystone admin token required - Terminate * Follow a Common Error Code

Response

HTTP Response Header

Format

HTTP/1.1 <response code> <message>       (ex. 200 OK)
  • <response_code>: see “HTTP Responses” section

  • <message>: message based on the response code

    • skip auto insert field such as “X-Compute-Request-Id” and “X-Openstack-Request-Id”, “Content-Length”, “Date”

Response Code

Response Codes
response code condition
200 normal end
* Follow a Common Error Code

HTTP Response Body

Format

{
    "quota_set": {
        "id": "defaults",
        "<resource>": <limit>,
       <<repeat>>
    }
}

Response Parameter

Response Parameters
item format description
resource String(1-256characters) resource name of the quota
limit int limit of quota

Sample API Request and Response

Sample API Request

Request URI

https://example.com/v2/{tenant_id}/os-quota-sets/{tenant_id}?defaults

Request Header

Accept-Encoding: gzip, deflate, compress (optional)
Accept: application/json
X-Auth-Token: ajk3adjiown02

Request Body

  • none

Sample API Response

Response Header

HTTP/1.1 200 OK
  • <response_code>: see “HTTP Responses” section

  • <message>: message based on the response code

    • skip auto insert field such as “X-Compute-Request-Id” and “X-Openstack-Request-Id”, “Content-Length”, “Date”

Response Body

{
    "quota_set": {
        "id": "defaults",
        "<resource>": <limit>,
       <<repeat>>
    }
}

Execution Example

HTTP Request

GET /v2/cb8aa2a2c7244af5aab1fa7881ba7f4c/os-quota-sets/cb8aa2a2c7244af5aab1fa7881ba7f4c?defaults HTTP/1.1
User-Agent: curl/7.35.0
Host: 192.168.56.250:8776
X-Auth-Token: f53be3b2f9ec4d1ab22b44c4f5df5b73
Content-type: application/json
Accept: application/json

HTTP Response

HTTP/1.1 200 OK
X-Compute-Request-Id: req-18bbd1a3-aa53-4ad5-9d9f-80fd99b95cb5
Content-Type: application/json
Content-Length: 234
X-Openstack-Request-Id: req-18bbd1a3-aa53-4ad5-9d9f-80fd99b95cb5
Date: Thu, 15 Oct 2015 10:52:41 GMT

{"quota_set": {"volumes_lvmdriver-1": -1, "gigabytes": 1000, "backup_gigabytes": 1000, "snapshots": 10, "gigabytes_lvmdriver-1": -1, "volumes": 10, "snapshots_lvmdriver-1": -1, "backups": 10, "id": "cb8aa2a2c7244af5aab1fa7881ba7f4c"}}

Error Execution Example

HTTP Request

GET /v2/cb8aa2a2c7244af5aab1fa7881ba7f4/os-quota-sets/cb8aa2a2c7244af5aab1fa7881ba7f4c?defaults HTTP/1.1
User-Agent: curl/7.35.0
Host: 192.168.56.250:8776
X-Auth-Token: f53be3b2f9ec4d1ab22b44c4f5df5b73
Content-type: application/json
Accept: application/json

HTTP Response

HTTP/1.1 400 Bad Request
Content-Length: 65
Content-Type: application/json; charset=UTF-8
X-Compute-Request-Id: req-afda8c92-56ee-41c6-86df-cf2a78f3af30
X-Openstack-Request-Id: req-afda8c92-56ee-41c6-86df-cf2a78f3af30
Date: Thu, 15 Oct 2015 10:57:08 GMT

{"badRequest": {"message": "Malformed request url", "code": 400}}