JSON API » audit » audit/list
Lists audit log entries.
Input parameters
Requires authentication and the audit role privilege.
Name | Type | Description | Required | Default value |
---|---|---|---|---|
auth_username | String | Authentication username. | Yes | |
auth_password | String | Authentication password. | Yes | |
start | Integer | Start Unix timestamp. | Yes | |
end | Integer | End Unix timestamp. -1 for now. | No | -1 |
customer | String or integer | Customer to get entries for. See below for more details. | No | Customer of authentication user. |
column | String | Column to search in. "person", "source", "action", "object", "id", "name", "field", "old", "new", or empty string for none. | No | Empty string. |
match | String | Column match. See below for more details. | No | "exact" |
value | String | Column value. | No | Empty string. |
sort | String | Field to sort by. "action", "customer", "field", "id", "name", "new", "person", "object", "old", or "time". | No | "time" |
descending | Integer | 1 to sort descending, 0 not to. | No | 0 |
The customer field may have the following values:
Field value | Returns entries for |
---|---|
Field not set | Customer of authentication user. |
ID of a customer | That 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 value | Returns 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
Code | Description |
---|---|
200 | Success. |
400 | Invalid input parameters specified. Check the key and message fields for more details. |
401 | The authentication details provided are invalid. |
402 | Your 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
Version | Changes |
---|---|
3.14 | end input parameter changed to return data < value instead of <= value. "column", "match" and "value" input parameters added. |
3.13 | Function added. |