GET /api/models
List all hardware models

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

search
optional

filter results

Validations:

  • String

order
optional

Sort field and order, eg. ‘id DESC’

Validations:

  • 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
hardware_model string
info text
name string
vendor_class string

GET /api/models/:id
Show a hardware model

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

id
required

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, ‘‘, ‘-’ with no leading or trailing space..


POST /api/models
Create a hardware model

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

model
required

Validations:

  • Hash

model[name]
required

Validations:

  • String

model[info]
optional , nil allowed

Validations:

  • String

model[vendor_class]
optional , nil allowed

Validations:

  • String

model[hardware_model]
optional , nil allowed

Validations:

  • String


PUT /api/models/:id
Update a hardware model

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

id
required

Validations:

  • String

model
required

Validations:

  • Hash

model[name]
optional

Validations:

  • String

model[info]
optional , nil allowed

Validations:

  • String

model[vendor_class]
optional , nil allowed

Validations:

  • String

model[hardware_model]
optional , nil allowed

Validations:

  • String


DELETE /api/models/:id
Delete a hardware model

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

id
required

Validations:

  • String