Node Pools HTTP API
The /node/pool endpoints are used to query for and interact with node pools.
List Node Pools
This endpoint list all node pools.
| Method | Path | Produces |
|---|---|---|
GET | /v1/node/pools | application/json |
The table below shows this endpoint's support for blocking queries and required ACLs.
| Blocking Queries | ACL Required |
|---|---|
YES | node_pool:read |
Parameters
prefix(string: "")- Specifies a string to filter node pools based on a name prefix. This is specified as a query string parameter.next_token(string: "")- This endpoint supports paging. Thenext_tokenparameter accepts a string which identifies the next expected node pool. This value can be obtained from theX-Nomad-NextTokenheader from the previous response.per_page(int: 0)- Specifies a maximum number of node pools to return for this request. If omitted, the response is not paginated. The value of theX-Nomad-NextTokenheader of the last response can be used as thenext_tokenof the next request to fetch additional pages.filter(string: "")- Specifies the expression used to filter the results. Consider using pagination to reduce resource used to serve the request.
Sample Request
$ nomad operator api '/v1/node/pools'
$ nomad operator api '/v1/node/pools?prefix=prod'
$ nomad operator api -filter 'Meta.env == "production"' '/v1/node/pools?per_page=5'
Sample Response
[
{
"CreateIndex": 11,
"Description": "Production workloads",