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_token
parameter accepts a string which identifies the next expected node pool. This value can be obtained from theX-Nomad-NextToken
header 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-NextToken
header of the last response can be used as thenext_token
of 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
Sample Response
Read Node Pool
This endpoint queries information about a node pool.
Method | Path | Produces |
---|---|---|
GET | /v1/node/pool/:node_pool | 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
:node_pool
(string: <required>)
- Specifies the node pool to query.
Sample Request
Sample Response
Create or Update Node Pool
This endpoint is used to create or update a node pool.
Method | Path | Produces |
---|---|---|
POST | /v1/node/pool/:node_pool /v1/node/pool | application/json |
The table below shows this endpoint's support for blocking queries and required ACLs.
Blocking Queries | ACL Required |
---|---|
NO | node_pool:write |
Parameters
Name
(string: <required>)
- Specifies the node pool to create or update. Must have fewer than 128 characters. Only alphanumeric,-
, and_
are allowed.Description
(string: "")
- Specifies the optional human-readable description of the node pool. Must have fewer than 256 characters.Meta
(object: null)
- Optional object with string keys and values of metadata to attach to the node pool. Node pool metadata is not used by Nomad and is intended for use by operators and third party tools.SchedulerConfiguration
(SchedulerConfiguration: <optional>)
- Specifies custom configuration applied when scheduling allocations in the node pool.SchedulerAlgorithm
(string: ""
) - The algorithm used by the scheduler when scoring nodes. Possible values arebinpack
orspread
. If not specified the [global cluster configuration value][api_scheduler_algo] is used.
Sample Payload
Sample Request
Delete Node Pool
This endpoint is used to delete a node pool.
Method | Path | Produces |
---|---|---|
DELETE | /v1/node/pool/:node_pool | application/json |
The table below shows this endpoint's support for blocking queries and required ACLs.
Blocking Queries | ACL Required |
---|---|
NO | management |
Parameters
:node_pool
(string: <required>)
- Specifies the node pool to delete.
Sample Request
List Node Pool Nodes
This endpoint list the nodes in a node pool.
Method | Path | Produces |
---|---|---|
GET | /v1/node/pool/:node_pool/nodes | application/json |
The table below shows this endpoint's support for blocking queries and required ACLs.
Blocking Queries | ACL Required |
---|---|
YES | node:read node_pool:read |
Parameters
:node_pool
(string: <required>)
- Specifies the node pool to list nodes.next_token
(string: "")
- This endpoint supports paging. Thenext_token
parameter accepts a string which identifies the next expected node. This value can be obtained from theX-Nomad-NextToken
header from the previous response.per_page
(int: 0)
- Specifies a maximum number of nodes to return for this request. If omitted, the response is not paginated. The value of theX-Nomad-NextToken
header of the last response can be used as thenext_token
of 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.resources
(bool: false)
- Specifies whether or not to include theNodeResources
andReservedResources
fields in the response.os
(bool: false)
- Specifies whether or not to include special attributes such as operating system name in the response.
Sample Request
Sample Response
List Node Pool Jobs
This endpoint lists the jobs in a node pool.
Method | Path | Produces |
---|---|---|
GET | /v1/node/pool/:node_pool/jobs | application/json |
The table below shows this endpoint's support for blocking queries and required ACLs.
Blocking Queries | ACL Required |
---|---|
YES | namespace:read-job node_pool:read |
Parameters
:node_pool
(string: <required>)
- Specifies the node pool to list jobs.filter
(string: "")
- Specifies the expression used to filter the results. Consider using pagination to reduce resource used to serve the request.meta
(bool: false)
- If set, jobs returned will include a meta field containing key-value pairs provided in the job specification'smeta
block.namespace
(string: "default")
- Specifies the target namespace. Specifying*
will return all jobs across all the authorized namespaces.next_token
(string: "")
- This endpoint supports paging. Thenext_token
parameter accepts a string which identifies the next expected job. This value can be obtained from theX-Nomad-NextToken
header from the previous response.per_page
(int: 0)
- Specifies a maximum number of jobs to return for this request. If omitted, the response is not paginated. The value of theX-Nomad-NextToken
header of the last response can be used as thenext_token
of the next request to fetch additional pages.
Sample Request
Sample Response