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