Get limits¶
Overview¶
Gets absolute and rate limit information, including information on currently used absolute limits.
Classification¶
- Show
API Operation Object¶
- limits
Synchronous / Asynchronous¶
- synchronous
Request¶
HTTP Request Method¶
- GET
HTTP Request Path¶
{api_endpoint}/v2/{project_id}/limits
HTTP Request Header¶
Format¶
Accept-Encoding: gzip, deflate, compress (optional)
Accept: application/json
X-Auth-Token: <token_id>
Content-Type: application/json
HTTP Request Body¶
Format¶
- none
Request Parameter¶
name | style | format | description | required/optional | default value | action for invalid parameter | response code for invalid parameter |
---|---|---|---|---|---|---|---|
project_id | URL | UUID(3) | project id | required | - | Terminate | 400, 404 |
token_id | Header | authentication token string | keystone authentication token | required | - | Terminate | 401 |
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 "Content-Length", "Date"
HTTP Response Body¶
Format¶
{
"limits": {
"absolute": {
"maxImageMeta": <maxImageMeta>,
"maxPersonality": <maxPersonality>,
"maxPersonalitySize": <maxPersonalitySize>,
"maxSecurityGroupRules": <maxSecurityGroupRules>,
"maxSecurityGroups": <maxSecurityGroups>,
"maxServerMeta": <maxServerMeta>,
"maxTotalCores": <maxTotalCores>,
"maxTotalFloatingIps": <maxTotalFloatingIps>,
"maxTotalInstances": <maxTotalInstances>,
"maxTotalKeypairs": <maxTotalKeypairs>,
"maxTotalRAMSize": <maxTotalRAMSize>,
"maxServerGroups": <maxServerGroups>,
"maxServerGroupMembers": <maxServerGroupMembers>,
"totalCoresUsed": <totalCoresUsed>,
"totalInstancesUsed": <totalInstancesUsed>,
"totalRAMUsed": <totalRAMUsed>,
"totalSecurityGroupsUsed": <totalSecurityGroupsUsed>,
"totalFloatingIpsUsed": <totalFloatingIpsUsed>,
"totalServerGroupsUsed": <totalServerGroupsUsed>
},
"rate": [
{
"limit": [
{
"next-available": "<next-available>",
"remaining": <remaining>,
"unit": "<unit>",
"value": <value>,
"verb": "<verb>"
},
<<repeat>>
],
"regex": "<regex>",
"uri": "<uri>"
},
<<repeat>>
]
}
}
Response Parameter¶
item | format | description |
---|---|---|
maxImageMeta | int | Maximum number of metadata items associated with an Image |
maxPersonality | int | The maximum number of file path/content pairs that can be supplied on server build |
maxPersonalitySize | int | The maximum size, in bytes, for each personality file |
maxSecurityGroupRules | int | Maximum number of security group rules |
maxSecurityGroups | int | Maximum number of security groups |
maxServerMeta | int | Maximum number of metadata items associated with a server |
maxTotalCores | int | Maximum total number of vcpus |
maxTotalFloatingIps | int | Maximum total number of floating Ips |
maxTotalInstances | int | Maximum total number of security groups |
maxTotalKeypairs | int | Maximum total number of keypairs |
maxTotalRAMSize | int | Maximum total amount of RAM (MB) |
maxServerGroups | int | Maximum number of server groups |
maxServerGroupMembers | int | Maximum number of server group members |
totalCoresUsed | int | total number of used vcpus |
totalInstancesUsed | int | total number of used servers |
totalRAMUsed | int | total amount of used RAMs |
totalSecurityGroupsUsed | int | total number of used security groups |
totalFloatingIpsUsed | int | total number of used floating IPs |
totalServerGroupsUsed | int | total number of used server groups |
next-available | time/date | Time the rate limit restriction is released |
remaining | int | Number of requests to reach the rate limit |
unit | String | Time units of the rate limit |
value | int | Current request the number of times in time unit |
verb | String | Format of request |
regex | String | Regular expression of URI |
uri | String | URI to display the rate limit |
Sample API Request and Response¶
Sample API Request¶
Request URI¶
https://example.com/v2/{project_id}/limits
Request Header¶
Accept-Encoding: gzip, deflate, compress (optional)
Accept: application/json
X-Auth-Token: ajk3adjiown02
Content-Type: application/json
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 "Content-Length", "Date"
Response Body¶
{
"limits": {
"absolute": {
"maxImageMeta": <maxImageMeta>,
"maxPersonality": <maxPersonality>,
"maxPersonalitySize": <maxPersonalitySize>,
"maxSecurityGroupRules": <maxSecurityGroupRules>,
"maxSecurityGroups": <maxSecurityGroups>,
"maxServerMeta": <maxServerMeta>,
"maxTotalCores": <maxTotalCores>,
"maxTotalFloatingIps": <maxTotalFloatingIps>,
"maxTotalInstances": <maxTotalInstances>,
"maxTotalKeypairs": <maxTotalKeypairs>,
"maxTotalRAMSize": <maxTotalRAMSize>,
"maxServerGroups": <maxServerGroups>,
"maxServerGroupMembers": <maxServerGroupMembers>,
"totalCoresUsed": <totalCoresUsed>,
"totalInstancesUsed": <totalInstancesUsed>,
"totalRAMUsed": <totalRAMUsed>,
"totalSecurityGroupsUsed": <totalSecurityGroupsUsed>,
"totalFloatingIpsUsed": <totalFloatingIpsUsed>,
"totalServerGroupsUsed": <totalServerGroupsUsed>
},
"rate": [
{
"limit": [
{
"next-available": "<next-available>",
"remaining": <remaining>,
"unit": "<unit>",
"value": <value>,
"verb": "<verb>"
},
<<repeat>>
],
"regex": "<regex>",
"uri": "<uri>"
},
<<repeat>>
]
}
}
Execution Example¶
HTTP Request¶
GET /v2/e4ee5a9bdf934e35b62c8b995152feee/limits HTTP/1.1
User-Agent: curl/7.35.0
Host: localhost:8774
Accept: */*
X-Auth-Token: 870466f60fd3461abbcf1f2f16ffc30f
HTTP Response¶
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 513
X-Compute-Request-Id: req-e43c12ba-7ef5-4bd5-b535-6f21e8c7dd40
Date: Fri, 19 Dec 2014 07:03:09 GMT
{"limits": {"rate": [], "absolute": {"maxServerMeta": 128, "maxPersonality": 5, "totalServerGroupsUsed": 0, "maxImageMeta": 128, "maxPersonalitySize": 10240, "maxServerGroups": 10, "maxSecurityGroupRules": 20, "maxTotalKeypairs": 100, "totalCoresUsed": 1, "totalRAMUsed": 512, "totalInstancesUsed": 1, "maxSecurityGroups": 10, "totalFloatingIpsUsed": 0, "maxTotalCores": 20, "totalSecurityGroupsUsed": 1, "maxTotalFloatingIps": 10, "maxTotalInstances": 10, "maxTotalRAMSize": 51200, "maxServerGroupMembers": 10}}}
Error Execution Example¶
HTTP Request¶
GET /v2/e4ee5a9bdf934e35b62c8b995152feee/limits HTTP/1.1
User-Agent: curl/7.35.0
Host: 192.168.56.250:8774
X-Auth-Token: eb46ce9e8a204cbabacc51282ac691ad
Accept: application/json
HTTP Response¶
HTTP/1.1 400 Bad Request
Content-Length: 188
Content-Type: application/json; charset=UTF-8
X-Compute-Request-Id: req-8e60e047-09aa-474d-9d57-4375d77b9290
Date: Wed, 07 Oct 2015 06:07:26 GMT
{"badRequest": {"message": "Malformed request URL: URL's project_id 'e4ee5a9bdf934e35b62c8b995152feee' doesn't match Context's project_id 'f66f8e846a65484a9a6740077e72e3dd'", "code": 400}}