# Get Audit Trail logs This API endpoint retrieves audit logs for all API keys within a top-level client, providing a comprehensive overview of usage. It supports querying logs for a specific user's API key ID to facilitate focused analysis. Endpoint: GET /api/v1/audit-trail Version: 1.0.0 Security: x-api-key ## Query parameters: - `filter[startDate]` (string) Specifies the start date (inclusive) for logs to be retrieved. The date must be in the ISO 8601 format like YYYY-MM-DD. Example: "2023-11-01" - `filter[endDate]` (string) Specifies the end date (inclusive) for logs to be retrieved. The date must be in the ISO 8601 format like YYYY-MM-DD. Example: "2023-12-01" - `filter[userApiKey._id]` (string) Specifies the user API key ID to filter logs by. Example: "5e94d5b63f557b001420bbe3" - `page[size]` (integer) The number of items to return. If not specified, the API will return a default of 30,000 items, which is the maximum value. Example: 12000 - `page[cursor]` (string) Pagination cursor that indicates the starting position for the next set of items Example: "5e94d5b63f557b001420bbe3" - `allowRedirect` (boolean) If set to true, the API will return a 303 redirect response if the response payload is too large. The header and will also include the URL to the actual resource. Example: true ## Response 200 fields (application/json): - `data` (array) Array of Audit Trail items - `data.id` (string) Id of Audit Trail Example: "5e94d5b63f557b001420bbe3" - `data.uri` (string) URI of request Example: "/api/v1/reconciliations" - `data.method` (string) Http method of request Example: "GET" - `data.sourceIp` (string) Client Ip address of request Example: "123.45.6.78" - `data.meta` (object) query parameters and status associated with the audit log - `data.meta.status` (string) Status of request Example: "400" - `data.meta.service` (string) Service of request Example: "Reconciliations" - `data.meta.queryParameters` (object) Query parameters of request Example: {"filter[modifiedBefore]":"2021-01-01","page[size]":"500"} - `data.meta.error` (string) Error message of request Example: "Error message" - `data.userApiKey` (object) - `data.userApiKey.id` (string) Id of token Example: "5e94d5b63f557b001420bab1" - `data.userApiKey.name` (string) Name of token Example: "API Token" - `data.createdAt` (string) Date when audit log was created Example: "2021-01-01T00:00:00.000Z" - `links` (object) - `links.self` (string) Link to self Example: "/api/v1/audit-trail?filter[startDate]=2023-11-01&filter[endDate]=2023-12-01&page[size]=12000&page[cursor]=5e94d5b63f557b001420bbe3" - `links.next` (string) Pagination link pointing to the next page Example: "/api/v1/audit-trail?filter[startDate]=2023-11-01&filter[endDate]=2023-12-01&page[size]=12000&page[cursor]=5e94d5b63f557b001420bbe6" ## Response 303 fields (application/json): - `data` (object) - `data.url` (string) The URL to the new location of the resource. ## Response 400 fields (application/json): - `message` (object) Reason(s) for the errors related to incorrect query keys or values that are out of bound - `message.errors` (array) - `message.errors.field` (string) The field that caused the error Example: "filter[startDate]" - `message.errors.message` (string) The error message Example: "filter[startDate] must be in iso format" - `name` (string) BadRequest Example: "BadRequest" - `status` (integer) The HTTP status code. Example: 400 ## Response 401 fields (application/json): - `message` (string) Reason for the error such as incorrect service access, malformed, expired or deactivated token. Example: "Invalid token" - `name` (string) Unauthorized Example: "Unauthorized" - `status` (integer) The HTTP status code. Example: 401 ## Response 413 fields (application/json): - `message` (string) Reason for the error related to the payload size Example: "Response size is greater than 1MB" - `name` (string) PayloadTooLarge Example: "PayloadTooLarge" - `status` (integer) The HTTP status code. Example: 413