API reference
Audit actions
The organisation’s audit trail: who did what to which resource, and when.
Its operations need the scope audit.view.
List audit actions
GET/v1/audit-actions
Returns the organisation’s audit trail, newest first by default (by date, then the order recorded), as the console’s Audit page shows it to a member holding audit.view: who or what did each action, to which resource, through which channel, the fields it changed with their old and new values, what else it recorded, the lane it belongs to and the IP address it came from. Filter by resource (entity_type and entity_uuid, a deleted resource’s too, or resource, a search of resource names), by actor (actor_uuid), by exact action code, by category (GET /v1/audit-categories), by lane and by time window, and order with direction. The user agent, the request URL and the raw metadata are never answered, nor are the identifiers the console hides. The key needs the audit.view scope, and its issuer must hold that permission. Pages by page and per_page (limit is the same as per_page); every page carries current_page, per_page, last_page and total.
Needs the scope audit.view.
Query parameters
- entity_typestring or nullOptional
The type of the resource whose audit actions to list, such as
server,database_instanceorlog_source; required withentity_uuid. More types may be added.Values:serverdomainservicelog_sourcecustom_metricdatabase_instancemetric_sourceserver_profilereportserver_portserver_volumeserver_system_servicedashboardtagtag_groupalarm_policyalarm_channelcontact_grouproleuserorganisation(an open set: new values may be added) - entity_uuidstring (uuid) or nullOptional
The uuid of the resource whose audit actions to list, a deleted one too; required with
entity_type. - actor_uuidstring (uuid) or nullOptional
Only the actions of this person or service account, by user uuid; a removed member’s too.
- categorystring or nullOptional
Only the actions of this category, by its
slug(GET /v1/audit-categories).Values:authssomfadomainserviceserverserver_profilelog_sourcetagdashboardcustom_metricmetric_sourcedatabase_instancereportalarm_rulealarm_policyalarm_incidenthealthalarm_channelcontact_grouporganisationuserroleinvitationai_accessbillingemailapi_tokensystem(an open set: new values may be added) - lanestring or nullOptional
Only the actions of this lane of the Audit page:
changes,alarms,incidents,healthorlifecycle.Values:changesalarmsincidentshealthlifecycle(an open set: new values may be added) - resourcestring or nullOptional
Only the actions about a resource whose name contains this text (the Audit page’s resource search, not case sensitive, at most 100 characters).
- directionstring or nullOptional
The order by time:
desc(newest first) when omitted, orasc. A cursor is tied to the order that made it.Values:ascdesc(an open set: new values may be added) - actionstring or nullOptional
Only the actions with this exact action code, such as
database_instance.update. - periodstring or nullOptional
A relative window ending now: 1 to 9999 minutes, hours, days or weeks (
3h,2w). Not withfromandto. The operation names its longest window and its default. - fromstring or nullOptional
The start of a pinned window, epoch milliseconds or RFC 3339 with an offset. Needs
to. A start before the oldest data kept is served from it. - tostring or nullOptional
The end of a pinned window, epoch milliseconds or RFC 3339 with an offset, after
from. A window that ends before the oldest data kept, or in the future, is refused. - limitinteger or nullOptional
The same as
per_page, kept for existing clients. - include_totalstring or nullOptional
Ignored:
totalis always present.Values:truefalse10(an open set: new values may be added) - per_pageinteger or nullOptional
How many audit actions to return in one page, from 1 to 100; 25 when omitted.
- pageinteger or nullOptional
The page to read, from 1; 1 when omitted. A page past the last answers no rows.
Returns
200 OK:
One page of the organisation’s audit actions.
Each item of the page:
- uuidstring
The audit action’s uuid.
- atinteger
Epoch milliseconds. When the action was recorded.
An instant: epoch milliseconds, UTC. - actionstring
The action’s code, such as
database_instance.update. More codes may be added. - action_labelstring
The action’s label, as the console shows it.
- categoryobject or null
The action’s category; null when it has none.
- slugstring
The category’s key, such as
database. - namestring
The category’s name.
- subjectobject or null
The resource the action is about; null when it is about none, or the resource is no longer known.
- typestring
The resource’s type, such as
serverordatabase_instance. More types may be added. - uuidstring
The resource’s uuid.
- namestring or null
The resource’s name.
- deletedboolean
Whether the resource has since been deleted.
- lanestring
The Audit page’s lane the action belongs to:
changes,alarms,incidents,healthorlifecycle. - actorobject
Who or what did the action.
- typestring
user(a person),service_account(a service account, through its API key),agent(a server’s agent),support(a change WatchTower15 support made) orsystem(WatchTower15 itself). More types may be added. - uuidstring or null
The user uuid of the person or service account; null for an agent, the system or WatchTower15 support.
- namestring or null
The name of the person or service account, or “WatchTower15 support” for a change WatchTower15 support made; null for an agent or the system.
- emailstring or null
The email of the person, as the Audit page shows it to a member holding
audit.view; null for a service account, an agent or the system.
- originstring or null
What caused an action nobody did by hand:
agent,scheduler,scan,ingestorsystem; null otherwise, and on a row recorded without it. An open set. - viastring or null
The channel the action came through:
api(an API key) ormcp(an AI client); null for the console or WatchTower15 itself. - changesarray of objects
The fields the action changed, with the values the Audit page shows:
oldandnewfor a value change,addedandremovedfor a change of a set,changedtrue for a masked value (a secret, whose value is never recorded). A key that does not apply to a change is null (changed: false).- fieldstring
The changed field’s key.
- labelstring
The changed field’s label, as the console shows it.
- oldany
The value before the change, as recorded; null when none was recorded or the change is not a value change.
- newany
The value after the change, as recorded; null when none was recorded or the change is not a value change.
- addedany
What a change of a set added; null for any other change.
- removedany
What a change of a set removed; null for any other change.
- changedboolean
True when the field changed and its value is masked, never recorded.
- changes_countinteger
The number of fields the action changed.
- contextarray of objects
What else the action recorded, as the Audit page lists it under the row.
- keystring
The pair’s key; a nested value is
parent.child. - labelstring
The pair’s label, as the console shows it.
- valueany
The pair’s value, by its
type. - typestring
One of
text,number,boolean,instant(epoch milliseconds) orlist(strings).
- ip_addressstring or null
The IP address the action came from, as recorded; null when none was.
Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.