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. '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$/.

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
format plain, puppet, ansible
host
host_name
keyword string
last_report
location
organization
proxy
reported
reported_at

GET /api/host_report/: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_report
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[applied]
optional , nil allowed

Number of applied resources or tasks

Validations:

  • Must be a Integer

host_report[failed]
optional , nil allowed

Number of failed resources or tasks

Validations:

  • Must be a Integer

host_report[pending]
optional , nil allowed

Number of pending resources or tasks

Validations:

  • Must be a Integer

host_report[other]
optional , nil allowed

Number of other resources or tasks

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

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. '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
format plain, puppet, ansible
host
host_name
keyword string
last_report
location
organization
proxy
reported
reported_at