GET /api/config_groups
List of config groups

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

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
class string
name string

GET /api/config_groups/:id
Show a config group

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

id
required

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.


POST /api/config_groups
Create a config group

Examples

POST /api/config_groups
{
  "config_group": {
    "name": "config-group",
    "puppetclass_ids": [
      980190962,
      281110143
    ]
  }
}
201
{
  "created_at": "2021-05-19 07:33:19 UTC",
  "updated_at": "2021-05-19 07:33:19 UTC",
  "id": 980190963,
  "name": "config-group",
  "puppetclasses": [
    {
      "id": 980190962,
      "name": "base",
      "module_name": "base"
    },
    {
      "id": 281110143,
      "name": "vim",
      "module_name": "vim"
    }
  ]
}

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

config_group
required

Validations:

  • Must be a Hash

config_group[name]
required

Validations:

  • Must be a String

config_group[puppetclass_ids]
optional , nil allowed

Validations:

  • Must be an array of any type


PUT /api/config_groups/:id
Update a config group

Examples

PUT /api/config_groups/980190962-Monitoring
{
  "config_group": {
    "name": "new name",
    "puppetclass_ids": [
      980190962,
      281110143
    ]
  }
}
200
{
  "created_at": "2021-05-19 07:33:15 UTC",
  "updated_at": "2021-05-19 07:33:19 UTC",
  "id": 980190962,
  "name": "new name",
  "puppetclasses": [
    {
      "id": 980190962,
      "name": "base",
      "module_name": "base"
    },
    {
      "id": 281110143,
      "name": "vim",
      "module_name": "vim"
    }
  ]
}

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

id
required

Validations:

  • Must be a String

config_group
required

Validations:

  • Must be a Hash

config_group[name]
optional

Validations:

  • Must be a String

config_group[puppetclass_ids]
optional , nil allowed

Validations:

  • Must be an array of any type


DELETE /api/config_groups/:id
Delete a config group

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

id
required

Validations:

  • Must be a String