GET /api/audits
Lista wszystkich kontroli

GET /api/hosts/:host_id/audits
Lista wszystkich kontroli dla danego hosta

Przykłady

GET /api/audits
200
{
  "total": 1,
  "subtotal": 1,
  "page": 1,
  "per_page": 20,
  "search": null,
  "can_create": true,
  "sort": {
    "by": null,
    "order": null
  },
  "results": [
    {
      "user_id": null,
      "user_type": null,
      "user_name": null,
      "version": 1,
      "comment": null,
      "associated_id": 272,
      "associated_type": "Host",
      "remote_address": null,
      "associated_name": null,
      "created_at": "2009-12-14 08:01:17 UTC",
      "id": 980190962,
      "auditable_id": 980190962,
      "auditable_name": null,
      "auditable_type": "Host",
      "action": "update",
      "audited_changes": {
        "architecture_id": [
          10463,
          10466
        ]
      },
      "locations": [],
      "organizations": []
    }
  ]
}

Parametry

Nazwa parametru Opis
location_id
opcjonalny

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
opcjonalny

Set the current organization context for the request

Validations:

  • Must be a Integer

search
opcjonalny

rezultat filtrowania

Validations:

  • Must be a String

order
opcjonalny

Sort field and order, eg. ‘id DESC’

Validations:

  • Must be a String

page
opcjonalny

Page number, starting at 1

Validations:

  • Must be a number.

per_page
opcjonalny

Number of results per page to return

Validations:

  • Must be a number.

Search fields

Field name Typ 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, 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

GET /api/audits/:id
Pokaż kontrole

Przykłady

GET /api/audits/980190962
200
{
  "user_id": null,
  "user_type": null,
  "user_name": null,
  "version": 1,
  "comment": null,
  "associated_id": 272,
  "associated_type": "Host",
  "remote_address": null,
  "associated_name": null,
  "created_at": "2009-12-14 08:01:17 UTC",
  "id": 980190962,
  "auditable_id": 980190962,
  "auditable_name": null,
  "auditable_type": "Host",
  "action": "update",
  "audited_changes": {
    "architecture_id": [
      10463,
      10466
    ]
  },
  "locations": [],
  "organizations": []
}

Parametry

Nazwa parametru Opis
location_id
opcjonalny

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
opcjonalny

Set the current organization context for the request

Validations:

  • Must be a Integer

id
wymagany

Validations:

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