Classes endpoint

Use the classes endpoint to retrieve a list of all classes.

To retrieve a list of all classes in a specific environment or a specific class from a specific environment, use the GET /v1/environments/<environment>/classes or GET /v1/environments/<environment>/classes/<name> endpoints.

The output from the classes endpoint (and the environments/<environment>/classes endpoints) is useful for creating or editing node groups, which usually reference one or more classes. You can use the Groups endpoints to create and edit node groups.

The node classifier gets information about classes from Puppet. Don't use the classes endpoint to create, update, or delete classes.

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

The name of the class, as a string.


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.


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 null. If the value is null, the parameter is required.

This is an example of one class object:
  "name": "apache",
  "environment": "production",
  "parameters": {
    "default_mods": true,
    "default_vhost": true,