GET /v1/classes
Retrieve a list of all classes the node classifier knows about at the time of the request.
Request format
The GET /v1/classes
endpoint returns the node classifier's
current class data. The node classifier periodically retrieves class data from the primary
server, and you can check the last retrieval time with the GET /v1/last-class-update endpoint. If you want to ensure the response
contains the latest data, use the POST /v1/update-classes endpoint to
force a retrieval.
When Forming node classifier API requests to this endpoint, the request is
a basic GET
call with authentication.
Response format
A successful response is a JSON array of objects. Each object uses these keys to describe a class:
Key | Definition |
---|---|
name
|
The name of the class, as a string. |
environment
|
The name of the environment that this class exists in. Note that the same class can exist in different environments and can have different parameters in each environment. |
parameters
|
An object describing the parameters and default parameter values for the class. The keys of this object are the parameter names (strings). Each value is the default value for the associated parameter as a string, boolean, number, structured value, or |
This is an example of one class object:
{ "name": "apache", "environment": "production", "parameters": { "default_mods": true, "default_vhost": true, ... } }