Core
IoT Platform v2.x
2

getActions #

Retrieves the list of all action keys currently registered in the audit trail.

This includes the built-in keys (e.g. kzCreateAsset, kzDeleteDevice) as well as any custom keys registered via registerAuditHook.

The registry is stored in Redis and is shared across all nodes in a cluster. It is rebuilt on every server boot: keys are cleared when the AuditTrailPlugin initialises and repopulated as hooks are registered. The registry therefore always reflects the hooks registered by the currently running process, with no stale data from previous boots.

Note: If a hook is removed between deployments, its action key will no longer appear in the response. Historical audit documents that reference that key will still be returned by search, but the key will be absent from the filter dropdown. Only keys registered by the currently running server are listed.

The frontend uses this endpoint to populate the action filter dropdown.


Query Syntax #

HTTP #

URL: http://kuzzle:7512/_/auditTrail/:index/actions
Method: GET

Javascript #

kuzzle.query({
  controller: 'audit-trail',
  action: 'getActions',
  index: '<tenant-index>',
});

Arguments #

ArgumentTypeDescription
index
string
Tenant index name

Response #

Returns an array of action key objects.

[{ "name": "kzCreateAsset" }, { "name": "kzDeleteAsset" }, { "name": "createThing" }]

Response Properties #

PropertyTypeDescription
name
string
Action key. Matches a key in auditTrail.action.* in the frontend locale files