GET /api/hosts/:host_id/puppetclass_ids
List all Puppet class IDs for host

Examples

GET /api/hosts/host2039/puppetclass_ids
200
{
  "results": [
    1018350799
  ]
}

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


POST /api/hosts/:host_id/puppetclass_ids
Add a Puppet class to host

Examples

POST /api/hosts/host2040/puppetclass_ids
{
  "puppetclass_id": 281110143,
  "host_class": {
    "puppetclass_id": 281110143
  }
}
200
{
  "host_id": 91,
  "puppetclass_id": 281110143
}

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
required

ID of host

Validations:

  • Must be a String

puppetclass_id
required

ID of Puppet class

Validations:

  • Must be a String


DELETE /api/hosts/:host_id/puppetclass_ids/:id
Remove a Puppet class from host

Examples

POST /api/hosts/host2042/puppetclass_ids/invalid_id
{
  "host_class": {}
}
422
{
  "error": {
    "message": "Couldn't find Puppetclass with 'id'=invalid_id"
  }
}

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
required

ID of host

Validations:

  • Must be a String

id
required

ID of Puppet class

Validations:

  • Must be a String