GET /api/foreman_datacenter/device_types
List all device_types

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
created_at
manufacturer
model
subdevice_role
u_height
updated_at

GET /api/foreman_datacenter/device_types/:id
Show a device_type

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_types
Create a device_type

Params

Param name Description
device_type
required

Validations:

  • Must be a Hash

device_type[model]
required

Validations:

  • Must be a String

device_type[manufacturer_id]
optional , nil allowed

Manufacturer ID

Validations:

  • Must be a number.

device_type[u_height]
optional , nil allowed

U Height

Validations:

  • Must be a number.

device_type[is_full_depth]
optional , nil allowed

is_full_depth

Validations:

  • Must be one of: true, false, 1, 0.

device_type[is_pdu]
optional , nil allowed

is_pdu

Validations:

  • Must be one of: true, false, 1, 0.

device_type[is_network_device]
optional , nil allowed

is_network_device

Validations:

  • Must be one of: true, false, 1, 0.

device_type[subdevice_role]
optional , nil allowed

subdevice_role

Validations:

  • Must be a String


PUT /api/foreman_datacenter/device_types/:id
Update a device_type

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_type
required

Validations:

  • Must be a Hash

device_type[model]
optional

Validations:

  • Must be a String

device_type[manufacturer_id]
optional , nil allowed

Manufacturer ID

Validations:

  • Must be a number.

device_type[u_height]
optional , nil allowed

U Height

Validations:

  • Must be a number.

device_type[is_full_depth]
optional , nil allowed

is_full_depth

Validations:

  • Must be one of: true, false, 1, 0.

device_type[is_pdu]
optional , nil allowed

is_pdu

Validations:

  • Must be one of: true, false, 1, 0.

device_type[is_network_device]
optional , nil allowed

is_network_device

Validations:

  • Must be one of: true, false, 1, 0.

device_type[subdevice_role]
optional , nil allowed

subdevice_role

Validations:

  • Must be a String


DELETE /api/foreman_datacenter/device_types/:id
Delete a device_type

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.