Returns audit log records of API requests and responses. All parameters are optional. If an API request sent with Content-Type:multipart/form-data included a file, a link to the file is returned.
Request: GET https://api-<DNS.Edge.URL>/v1/api/audit/logs?offset=10&limit=10&startTime= 2017-03-24T06:43:09.811Z&endTime=2018-03-24T06:43:09.811Z&username=username Authorization: Bearer token
Parameter
Name | Description | Type | Required |
offset | The number of records to skip, from the beginning of the log. For example, offset=100 will return records from 101 to the end of the log. | String | Optional |
limit | The maximum number of records to retrieve. | String | Optional |
startTime | The start time of the period to return logs for, in ISO_8601 format. | String | Optional |
endTime | The end time of the period to return logs for, in ISO_8601 format. | String | Optional |
username | To filter log records for a particular user, specify a user name. | String | Optional |
Successful response
200 OK Content-Type: application/JSON [ { "source": { "userId": "user ID", "ipAddress": "IP address of the user who made the request" }, "request": { "url": "API that was called", "timestamp": "24843644", "payload": "The body of the API request" }, "response": { "timestamp": "12193686", "status": "200", "mime": "application/json", "payload": "The body of the call response" } }, { "source": { "userId": "user ID", "ipAddress": "IP address of the user who made the request" }, "request": { "url": "API that was called", "timestamp": "24843644", "payload": "The body of the API request" }, "response": { "timestamp": "12193686", "status": "200", "mime": "multipart/form-data", "payload": "link to the download file" } }, ... ]
Response on internal error
500 Internal server error Content-Type: application/JSON {"code": "code", "brief": "a message describing the error"}
Possible error codes
- SITE_DOES_NOT_EXIST
- UNEXPECTED_ERROR