reference

Audit Log

3 endpoints

GET/api/v3/audit/events

List Audit Events

Requires: ACCOUNT_audit_log

Lists what happened in an account, newest first: what people did in the app or through the API, and what wxrks did on its own on the account's behalf.

  • The period is from to to, at most 90 days. Without either, the last 7 days. to is never after now.
  • Pages are read with a cursor: pass the nextCursor of a page as cursor to get the next one, with the same filters, until nextCursor is null.
  • changedSince reads only the events at or after that instant, to pick up what happened since the last call.
  • Only events recorded with the account are listed. Actions of wxrks staff are not listed.
  • Read events (codes with Get, List, Search, Find or Count) are left out unless includeReads is true.
  • An actorUuid that is not a user of the account gives an empty page.

query parameters

accountUuid string (uuid)
The account to read. Defaults to the caller's own account; another account answers 403.
from integer (int64)
Start of the period, epoch milliseconds.
to integer (int64)
End of the period, epoch milliseconds.
changedSince integer (int64)
Only events at or after this instant, epoch milliseconds.
eventType string
Event types that start with this text, for example Project_ or Project_Update.
actorUuid string (uuid)
Only the events of this user. Not with username.
username string
Only the events of the user with this exact username. Not with actorUuid.
object string
Text searched in the event details, such as a project UUID: 3 to 200 letters, digits, spaces or . _ : @ / -.
includeReads boolean
Also list read events.
pageSize integer
Events per page, 1 to 200. Defaults to 50.
cursor string
The nextCursor of the previous page.

Responses

200 OK

AuditEventPageDto

items AuditEventDto[]
nextCursor string

Request

curl -X GET 'https://app.wxrks.com/api/v3/audit/events' \
  -H "X-AUTH-TOKEN: $WXRKS_TOKEN"

Response 200

{
  "items": [
    {}
  ],
  "nextCursor": "string"
}

POST/api/v3/audit/exports

Start Audit Events Export

Requires: ACCOUNT_audit_log

Starts a file with the events that List Audit Events lists for the same filters, newest first, and returns requestUuid to follow it with Get Audit Events Export Status. The period is fixed when the export starts: without from and to, the last 7 days up to that moment.

  • CSV: the columns Date (UTC), Event type, Username, Name, User UUID, Agent, Details and Event ID. A cell that starts with =, +, - or @ gets a leading ', so a spreadsheet does not run it.
  • JSON: an array of the events, as List Audit Events returns them.
  • The file holds at most the 100,000 most recent events. When the filters reach more, the status says truncated; narrow the period to export the rest.
  • Filters are checked before the export starts: an invalid one answers 422 and starts nothing.

query parameters

formatrequired stringCSV JSON
File format.
accountUuid string (uuid)
The account to export. Defaults to the caller's own account; another account answers 403.
from integer (int64)
Start of the period, epoch milliseconds.
to integer (int64)
End of the period, epoch milliseconds.
changedSince integer (int64)
Only events at or after this instant, epoch milliseconds.
eventType string
Event types that start with this text, for example Project_ or Project_Update.
actorUuid string (uuid)
Only the events of this user. Not with username.
username string
Only the events of the user with this exact username. Not with actorUuid.
object string
Text searched in the event details, such as a project UUID: 3 to 200 letters, digits, spaces or . _ : @ / -.
includeReads boolean
Also export read events.

Responses

200 OK

AuditExportStatusDto

downloadUrl string
error string
exportedEvents integer
fileName string
format stringCSV JSON
requestUuid string (uuid)
status stringSTARTED COMPLETED FAILED
truncated boolean

Request

curl -X POST 'https://app.wxrks.com/api/v3/audit/exports?format=CSV' \
  -H "X-AUTH-TOKEN: $WXRKS_TOKEN"

Response 200

{
  "downloadUrl": "string",
  "error": "string",
  "exportedEvents": 0,
  "fileName": "string",
  "format": "CSV",
  "requestUuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "status": "STARTED",
  "truncated": false
}

GET/api/v3/audit/exports/{requestUuid}

Get Audit Events Export Status

Requires: ACCOUNT_audit_log

The status of an export: STARTED, COMPLETED or FAILED, with exportedEvents so far. When COMPLETED, downloadUrl is a link to the file valid for one hour; ask the status again for a new link. When FAILED, error says why. Only the user who started the export can read it, for 6 hours.

path parameters

requestUuidrequired string (uuid)
The requestUuid returned by Start Audit Events Export.

Responses

200 OK

AuditExportStatusDto

downloadUrl string
error string
exportedEvents integer
fileName string
format stringCSV JSON
requestUuid string (uuid)
status stringSTARTED COMPLETED FAILED
truncated boolean

Request

curl -X GET 'https://app.wxrks.com/api/v3/audit/exports/{requestUuid}' \
  -H "X-AUTH-TOKEN: $WXRKS_TOKEN"

Response 200

{
  "downloadUrl": "string",
  "error": "string",
  "exportedEvents": 0,
  "fileName": "string",
  "format": "CSV",
  "requestUuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "status": "STARTED",
  "truncated": false
}