layout | page_title | description |
---|---|---|
api |
Quotas - HTTP API |
The /quota endpoints are used to query for and interact with quotas. |
The /quota
endpoints are used to query for and interact with quotas.
This endpoint lists all quota specifications.
Method | Path | Produces |
---|---|---|
GET |
/v1/quotas |
application/json |
The table below shows this endpoint's support for blocking queries and required ACLs.
Blocking Queries | ACL Required |
---|---|
YES |
quota:read namespace:* if namespace has quota attached |
prefix
(string: "")
- Specifies a string to filter quota specifications on based on an index prefix. This is specified as a query string parameter.
$ curl \
https://localhost:4646/v1/quotas
$ curl \
https://localhost:4646/v1/quotas?prefix=sha
[
{
"CreateIndex": 8,
"Description": "Limit the shared default namespace",
"Hash": "SgDCH7L5ZDqNSi2NmJlqdvczt/Q6mjyVwVJC0XjWglQ=",
"Limits": [
{
"Hash": "NLOoV2WBU8ieJIrYXXx8NRb5C2xU61pVVWRDLEIMxlU=",
"Region": "global",
"RegionLimit": {
"CPU": 2500,
"DiskMB": 0,
"MemoryMB": 2000,
"Networks": [
{
"CIDR": "",
"Device": "",
"DynamicPorts": null,
"IP": "",
"MBits": 50,
"Mode": "",
"ReservedPorts": null
}
]
},
"VariablesLimit": 1000
}
],
"ModifyIndex": 56,
"Name": "shared-quota"
}
]
This endpoint reads information about a specific quota specification.
Method | Path | Produces |
---|---|---|
GET |
/v1/quota/:quota |
application/json |
The table below shows this endpoint's support for blocking queries and required ACLs.
Blocking Queries | ACL Required |
---|---|
YES |
quota:read namespace:* if namespace has quota attached |
:quota
(string: <required>)
- Specifies the quota specification to query where the identifier is the quota's name.
$ curl \
https://localhost:4646/v1/quota/shared-quota
{
"CreateIndex": 8,
"Description": "Limit the shared default namespace",
"Hash": "SgDCH7L5ZDqNSi2NmJlqdvczt/Q6mjyVwVJC0XjWglQ=",
"Limits": [
{
"Hash": "NLOoV2WBU8ieJIrYXXx8NRb5C2xU61pVVWRDLEIMxlU=",
"Region": "global",
"RegionLimit": {
"CPU": 2500,
"DiskMB": 0,
"MemoryMB": 2000,
"Networks": [
{
"CIDR": "",
"Device": "",
"DynamicPorts": null,
"IP": "",
"MBits": 50,
"Mode": "",
"ReservedPorts": null
}
]
},
"VariablesLimit": 1000
}
],
"ModifyIndex": 56,
"Name": "shared-quota"
}
This endpoint is used to create or update a quota specification.
Method | Path | Produces |
---|---|---|
POST |
/v1/quota/:quota /v1/quota |
application/json |
The table below shows this endpoint's support for blocking queries and required ACLs.
Blocking Queries | ACL Required |
---|---|
NO |
quota:write |
The request body contains a valid, JSON quota specification. View the api
package to see the definition of a QuotaSpec
object.
{
"Name": "shared-quota",
"Description": "Limit the shared default namespace",
"Limits": [
{
"Region": "global",
"RegionLimit": {
"CPU": 2500,
"MemoryMB": 1000,
"Networks": [
{
"Mbits": 50
}
]
}
}
]
}
$ curl \
--request POST \
--data @spec.json \
https://localhost:4646/v1/quota/shared-quota
$ curl \
--request POST \
--data @spec.json \
https://localhost:4646/v1/quota
This endpoint is used to delete a quota specification.
Method | Path | Produces |
---|---|---|
DELETE |
/v1/quota/:quota |
application/json |
The table below shows this endpoint's support for blocking queries and required ACLs.
Blocking Queries | ACL Required |
---|---|
NO |
quota:write |
:quota
(string: <required>)
- Specifies the quota specification to delete where the identifier is the quota's name.
$ curl \
--request DELETE \
https://localhost:4646/v1/quota/shared-quota
This endpoint lists all quota usages.
Method | Path | Produces |
---|---|---|
GET |
/v1/quota-usages |
application/json |
The table below shows this endpoint's support for blocking queries and required ACLs.
Blocking Queries | ACL Required |
---|---|
YES |
quota:read namespace:* if namespace has quota attached |
prefix
(string: "")
- Specifies a string to filter quota specifications on based on an index prefix. This is specified as a query string parameter.
$ curl \
https://localhost:4646/v1/quota-usages
$ curl \
https://localhost:4646/v1/quota-usages?prefix=sha
[
{
"Used": {
"NLOoV2WBU8ieJIrYXXx8NRb5C2xU61pVVWRDLEIMxlU=": {
"Region": "global",
"RegionLimit": {
"CPU": 500,
"MemoryMB": 256,
"DiskMB": 0,
"Networks": null
},
"Hash": "NLOoV2WBU8ieJIrYXXx8NRb5C2xU61pVVWRDLEIMxlU="
}
},
"Name": "default",
"CreateIndex": 8,
"ModifyIndex": 56
}
]
This endpoint reads information about a specific quota usage.
Method | Path | Produces |
---|---|---|
GET |
/v1/quota/usage/:quota |
application/json |
The table below shows this endpoint's support for blocking queries and required ACLs.
Blocking Queries | ACL Required |
---|---|
YES |
quota:read namespace:* if namespace has quota attached |
:quota
(string: <required>)
- Specifies the quota specification to query where the identifier is the quota's name.
$ curl \
https://localhost:4646/v1/quota/usage/shared-quota
{
"Used": {
"NLOoV2WBU8ieJIrYXXx8NRb5C2xU61pVVWRDLEIMxlU=": {
"Region": "global",
"RegionLimit": {
"CPU": 500,
"MemoryMB": 256,
"DiskMB": 0,
"Networks": [
{
"CIDR": "",
"Device": "",
"DynamicPorts": null,
"IP": "",
"MBits": 50,
"Mode": "",
"ReservedPorts": null
}
]
},
"Hash": "NLOoV2WBU8ieJIrYXXx8NRb5C2xU61pVVWRDLEIMxlU="
}
},
"Name": "default",
"CreateIndex": 8,
"ModifyIndex": 56
}