Skip to content
R-Service R-Service
RR Tech Service Management Developer Guide

Audit Entries API

List all audit entries for an account:

GET /audit_lines
Status: 200 OK
[
{
"id": 354217,
"action": "update",
"created_at": "2017-01-21T14:47:11-06:00",
"created_by": {
"id": 156,
"name": "Ellen Brown",
"account": {
"id": "pro-product",
"name": "Widget International"
}
},
"audited": "project",
"project": {
"id": 7497,
"subject": "Digital Operations Center (DOC)"
}
},
{
"id": 354216,
"action": "create",
"created_at": "2017-01-21T14:46:47-06:00",
"created_by": {
"id": 128,
"name": "Howard Tanner",
"account": {
"id": "pro-product",
"name": "Widget International"
}
},
"audited": "request",
"request": {
"id": 70486,
"subject": "Unable to access SAP"
}
},
"..."
]

The response contains these fields by default. Filtering and pagination are available to reduce/limit the collection of audit entries.

By default the following fields will appear in collections of Audit Entries:

action auditable audited created_at created_by id

Filtering is available for the following fields :

id created_at

By default a collection of Sites is sorted descending by id . The following field is accepted by the ?sort= parameter :

id

GET /audit_lines/:id
Status: 200 OK
{
"id": 354217,
"action": "update",
"created_at": "2017-01-21T14:47:11-06:00",
"created_by": {
"id": 156,
"name": "Ellen Brown",
"account": {
"id": "pro-product",
"name": "Widget International"
}
},
"audited": "project",
"project": {
"id": 7497,
"subject": "Digital Operations Center (DOC)"
},
"changes": {
"justification": [
"compliance",
"correction"
]
}
}

The response contains these fields .

action

Readonly enum — The Action field indicates the type of transactions that caused the audit entry to be generated. Possible values are:

  • create : Create
  • update : Update
  • destroy : Destroy

auditable

Readonly reference — The Auditable field provides a reference to the record for which the audit entry was generated. The name of this field is returned as the Audited field value.

audited

Readonly enum — The Audited field contains the record type name of the record for which the audit entry was generated.

changes

Optional hash — The Changes field provides the old and the new value of each field’s value that was set or changed by the transaction that caused the audit entry to be generated.

created_at

Readonly datetime — The date and time at which the audit entry was created.

created_by

Readonly reference to Person — The Created by field is set to the person who caused the audit entry to be generated.

id

Readonly integer — The unique ID of the audit entry.