Quota HTTP API
The /quota
endpoints are used to query for and interact with quotas.
Enterprise Only! This API endpoint and functionality only exists in Nomad Enterprise. This is not present in the open source version of Nomad.
List Quota Specifications
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 |
Parameters
prefix
(string: "")
- Specifies a string to filter quota specifications on based on an index prefix. This is specified as a query string parameter.
Sample Request
Sample Response
Read Quota Specification
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 |
Parameters
:quota
(string: <required>)
- Specifies the quota specification to query where the identifier is the quota's name.
Sample Request
Sample Response
Create or Update Quota Specification
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 |
Body
The request body contains a valid, JSON quota specification. View the api
package to see the definition of a QuotaSpec
object.
Sample Payload
Sample Request
Delete Quota Specification
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 |
Parameters
:quota
(string: <required>)
- Specifies the quota specification to delete where the identifier is the quota's name.
Sample Request
List Quota Usages
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 |
Parameters
prefix
(string: "")
- Specifies a string to filter quota specifications on based on an index prefix. This is specified as a query string parameter.
Sample Request
Sample Response
Read Quota Usage
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 |
Parameters
:quota
(string: <required>)
- Specifies the quota specification to query where the identifier is the quota's name.
Sample Request
Sample Response