GET /api/host_reports
List host reports

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 and order by a searchable field, e.g. '<field> 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$/.

host_id
optional

If provided, filters reports by the host

Validations:

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

Search fields

Field name Type Possible values
change
changed
changes
failed
failure
failures
format plain, puppet, ansible
host
host_name
keyword string
last_report
location
nochange
nochanges
organization
proxy
reported
reported_at
unchanged

GET /api/host_reports/:id
Show host report details

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/host_reports
Create a host report

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

Validations:

  • Must be a Hash

host_report[host]
required

Hostname of the report's host origin

Validations:

  • Must be a String

host_report[format]
optional , nil allowed

Format of the report, e.g. Ansible

Validations:

  • Must be one of: plain, puppet, ansible.

host_report[reported_at]
required

UTC time of the report

Validations:

  • Must be a String

host_report[change]
optional , nil allowed

Summary count of actions with change (semantics is different for each report type)

Validations:

  • Must be a Integer

host_report[nochange]
optional , nil allowed

Summary count of actions without change (semantics is different for each report type)

Validations:

  • Must be a Integer

host_report[failure]
optional , nil allowed

Summary count of actions with failure (semantics is different for each report type)

Validations:

  • Must be a Integer

host_report[body]
required

String with JSON formatted body of the report

Validations:

  • Must be a String

host_report[proxy]
optional , nil allowed

Hostname of the proxy processed the report (will be detected from SSL cert for HTTPS requests)

Validations:

  • Must be a String

host_report[keywords]
optional , nil allowed

A list of keywords to associate with the report for better searching

Validations:

  • Must be an array of String


DELETE /api/host_reports/:id
Delete a host report

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.


GET /api/host_reports/export
Export host reports in a CSV file

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 and order by a searchable field, e.g. '<field> 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
change
changed
changes
failed
failure
failures
format plain, puppet, ansible
host
host_name
keyword string
last_report
location
nochange
nochanges
organization
proxy
reported
reported_at
unchanged