Examples

GET /api/hosts/1/audits
200
{
  "total": 1,
  "subtotal": 1,
  "page": 1,
  "per_page": 20,
  "search": null,
  "sort": {
    "by": null,
    "order": null
  },
  "results": [
    {
      "user_id": 135138680,
      "user_type": null,
      "user_name": "secret_admin",
      "version": 1,
      "comment": null,
      "associated_id": null,
      "associated_type": null,
      "remote_address": null,
      "associated_name": null,
      "created_at": "2018-11-15 19:02:47 UTC",
      "id": 980190968,
      "auditable_id": 1,
      "auditable_name": "host305.example110.com",
      "auditable_type": "Host::Base",
      "action": "update",
      "audited_changes": {
        "model_id": [
          null,
          980190962
        ],
        "grub_pass": [
          "$6$VekFJm4HSwtnevap$QBaja34dphkt6enD3vO7bLVAxxkKybCHuqZRigUjYKh8VRvg5ot9pa71G9wEqmcOvCkzdgvZ4bybmaAVyVkYG.",
          "$5$pcFYzltrROIL65el$qgjuLTExZZA5A06MC6S/2KyEWjW9QEjNDgWiekZNtYD"
        ]
      },
      "locations": [
        {
          "id": 255093256,
          "name": "Location 1",
          "title": "Location 1",
          "description": null
        }
      ],
      "organizations": [
        {
          "id": 447626438,
          "name": "Organization 1",
          "title": "Organization 1",
          "description": null
        }
      ]
    }
  ]
}

Params

Param name Description
location_id
optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
optional

Scope by organizations

Validations:

  • Must be a Integer

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

paginate results

Validations:

  • Must be a String

per_page
optional

number of entries per request

Validations:

  • Must be a String

Search fields

Field name Type Possible values
action create, update, delete
auditable_id integer
changes text
comment string
host string
hostgroup string
hostgroup_title string
id integer
interface_fqdn string
interface_ip string
interface_mac string
location string
location_id integer
organization string
organization_id integer
os string
os_title string
parameter string
partition_table string
provisioning_template string
puppetclass string
remote_address string
setting string
time datetime
type operatingsystem, taxonomy, role, ptable, provisioning_template, user, auth_source, compute_resource, host, interface, location, organization, os, override_value, parameter, partition_table, setting, smart_class_parameter, smart_variable, subnet
user string
username string