Examples

GET /api/puppetclasses
200
{
  "total": 9,
  "subtotal": 9,
  "page": 1,
  "per_page": 20,
  "search": null,
  "sort": {
    "by": null,
    "order": null
  },
  "results": {
    "apache": [
      {
        "id": 298486374,
        "name": "apache",
        "created_at": "2020-05-20T13:27:49.535Z",
        "updated_at": "2020-05-20T13:27:49.535Z"
      }
    ],
    "auth": [
      {
        "id": 638205575,
        "name": "auth",
        "created_at": "2020-05-20T13:27:49.535Z",
        "updated_at": "2020-05-20T13:27:49.535Z"
      }
    ],
    "base": [
      {
        "id": 980190962,
        "name": "base",
        "created_at": "2020-05-20T13:27:49.535Z",
        "updated_at": "2020-05-20T13:27:49.535Z"
      },
      {
        "id": 980190962,
        "name": "base",
        "created_at": "2020-05-20T13:27:49.535Z",
        "updated_at": "2020-05-20T13:27:49.535Z"
      }
    ],
    "chkmk": [
      {
        "id": 51848956,
        "name": "chkmk",
        "created_at": "2020-05-20T13:27:49.535Z",
        "updated_at": "2020-05-20T13:27:49.535Z"
      }
    ],
    "class56": [
      {
        "id": 1018350796,
        "name": "class56",
        "created_at": "2020-05-20T13:28:08.875Z",
        "updated_at": "2020-05-20T13:28:08.875Z"
      }
    ],
    "nagios": [
      {
        "id": 1018350795,
        "name": "nagios",
        "created_at": "2020-05-20T13:27:49.535Z",
        "updated_at": "2020-05-20T13:27:49.535Z"
      }
    ],
    "pam": [
      {
        "id": 374648174,
        "name": "pam",
        "created_at": "2020-05-20T13:27:49.535Z",
        "updated_at": "2020-05-20T13:27:49.535Z"
      }
    ],
    "vim": [
      {
        "id": 281110143,
        "name": "vim",
        "created_at": "2020-05-20T13:27:49.535Z",
        "updated_at": "2020-05-20T13:27:49.535Z"
      }
    ]
  }
}

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Must be a Integer

host_id
optional

ID of host

Validations:

  • Must be a String

hostgroup_id
optional

ID of host group

Validations:

  • Must be a String

environment_id
optional

ID of environment

Validations:

  • Must be a String

search
optional

filter results

Validations:

  • Must be a String

order
optional

Sort field and order, eg. ‘id DESC’

Validations:

  • Must be a String

page
optional

Page number, starting at 1

Validations:

  • Must be a number.

per_page
optional

Number of results per page to return, ‘all’ to return all results

Validations:

  • Must match regular expression /\A([1-9]\d|all)\Z$/.

Search fields

Field name Type Possible values
config_group string
environment string
host string
hostgroup string
key string
location string
name string
organization string