Scaling Policies HTTP API
The /scaling/policies
and /scaling/policy/
endpoints are used to list and view scaling policies.
List Scaling Policies
This endpoint returns the scaling policies from all jobs.
Method | Path | Produces |
---|---|---|
GET | /scaling/policies | application/json |
The table below shows this endpoint's support for blocking queries, consistency modes and required ACLs.
Blocking Queries | Consistency Modes | ACL Required |
---|---|---|
YES | all | namespace:list-scaling-policies |
Parameters
job
(string: "")
- Specifies the job ID to filter policies by.type
(string: "")
- Specifies the type of scaling policy to filter by. In the open source version of Nomad,horizontal
is the only supported value. Within Nomad Enterprise,vertical_mem
andvertical_cpu
are supported along withvertical
. The latter returns policies matching bothvertical_mem
andvertical_cpu
.
Sample Request
Sample Response
Read Scaling Policy
This endpoint reads a specific scaling policy.
Method | Path | Produces |
---|---|---|
GET | /scaling/policy/:policy_id | application/json |
The table below shows this endpoint's support for blocking queries, consistency modes and required ACLs.
Blocking Queries | Consistency Modes | ACL Required |
---|---|---|
YES | all | namespace:read-scaling-policy |
Parameters
:policy_id
(string: <required>)
- Specifies the ID of the scaling policy (as returned by the scaling policy list endpoint). This is specified as part of the path.
Sample Request
Sample Response