GET /api/foreman_datacenter/device_roles
List all device_roles

Params

Param name Description
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
color
created_at
name
updated_at

GET /api/foreman_datacenter/device_roles/:id
Show a device_role

Params

Param name Description
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/foreman_datacenter/device_roles
Create a device_role

Params

Param name Description
device_role
required

Validations:

  • Must be a Hash

device_role[name]
required

Validations:

  • Must be a String

device_role[color]
required

Validations:

  • Must be a String


PUT /api/foreman_datacenter/device_roles/:id
Update a device_role

Params

Param name Description
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.

device_role
required

Validations:

  • Must be a Hash

device_role[name]
optional

Validations:

  • Must be a String

device_role[color]
optional

Validations:

  • Must be a String


DELETE /api/foreman_datacenter/device_roles/:id
Delete a device_role

Params

Param name Description
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.