JSON API » audit » audit/list

Lists audit log entries.

Input parameters

Requires authentication and the audit role privilege.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
startIntegerStart Unix timestamp.Yes
endIntegerEnd Unix timestamp. -1 for now.No-1
customerString or integerCustomer to get entries for. See below for more details.NoCustomer of authentication user.
columnStringColumn to search in. "person", "source", "action", "object", "id", "name", "field", "old", "new", or empty string for none.NoEmpty string.
matchStringColumn match. See below for more details.No"exact"
valueStringColumn value.NoEmpty string.
sortStringField to sort by. "action", "customer", "field", "id", "name", "new", "person", "object", "old", or "time".No"time"
descendingInteger1 to sort descending, 0 not to.No0

The customer field may have the following values:

Field valueReturns entries for
Field not setCustomer of authentication user.
ID of a customerThat customer.
"all"All customers directly under customer of authentication user.
"recursive"All customers under customer of authentication user, recursively.
"system"All customers on system.

The match field may have the following values:

Field valueReturns calls with destinations that
"contains"Contain the corresponding value.
"end"End with the corresponding value.
"exact"Equal the corresponding value.
"start"Start with the corresponding value.

Responses

CodeDescription
200Success.
400Invalid input parameters specified. Check the key and message fields for more details.
401The authentication details provided are invalid.
402Your role does not allow this.

Data returned

An array of fields, one row for each audit log entry.

Example: With required parameters

http://enswitch.example.com/api/json/audit/list/?auth_username=user;auth_password=password;start=1234567890

{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":[ { "id":1, ... }, { "id":2, ... } ] }

Change history

VersionChanges
3.14end input parameter changed to return data < value instead of <= value. "column", "match" and "value" input parameters added.
3.13Function added.