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.
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.

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.13Function added.