Audit
The audit trail of the organization's sessions, and how many months it is kept.
List audit events
Dev's audit trail, newest first - every recorded action of the organisation's sessions, filtered by actor, session, action and time.
Reads dev's store of the installation's audit log through core/audit's search. A row is the record as a reader sees it: identifiers clear, personal fields resolved to the subject (the pseudonym once erased), payloads clear as dev wrote them or only redacted. actor matches the subject that acted; session_id matches the session or the root session the action ran under. Every read is itself a dev.audit.searched record naming the reader, the filters as commitments and the number of rows returned; a read whose record cannot be written answers 503.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
cursor | string | Optional | |
limit | integer | Optional | |
actor | string | Optional | the subject that acted, user:<id>, agent:<id>, key:<id> or service:<name> |
session_id | string | Optional | |
action | string | Optional | one action, such as dev.session.create |
since | string (date-time) | Optional | records at or after this moment |
until | string (date-time) | Optional | records before this moment |
Response
datadata[].accesseddata[].accountable- the person answerable
data[].actiondata[].action_id- act_<uuidv7>, shared by the phases of one action
data[].agent- the agent identity and the harness it runs in
data[].approval_iddata[].approvalsdata[].atdata[].attempted- the supplied fields that did not resolve, by name; never their values
data[].celldata[].connectiondata[].correlation_iddata[].credentialdata[].decisiondata[].delegationdata[].depthdata[].egressdata[].inputdata[].input.kind- One of
none,clear,redacted,attached data[].input.size- the attachment's size in bytes, for kind attached
data[].input.value- the clear text
data[].ownerdata[].phase- One of
intent,start,end data[].policy_versiondata[].principal- the subject that acted
data[].product- dev, or core for the port's own records
data[].protecteddata[].requestdata[].resultdata[].result.kind- One of
none,clear,redacted,attached data[].result.size- the attachment's size in bytes, for kind attached
data[].result.value- the clear text
data[].root_sessiondata[].sandboxdata[].seq- the record's place in the organisation's chain of dev's store
data[].sessiondata[].statusdata[].surfacedata[].targetsdata[].targets[].iddata[].targets[].kinddata[].witness_deferreddata[].workerhas_morenext_cursor
curl "$CIRESK_API/v1/dev/audit/events" \
-H "Authorization: Bearer $CIRESK_KEY"Get the audit retention
How many months dev's audit trail is kept, 12 for an organisation that set none.
Response
months- 12 (the default), 84 or 120: the 1-, 7- and 10-year tiers; any other value is 422
curl "$CIRESK_API/v1/dev/audit/retention" \
-H "Authorization: Bearer $CIRESK_KEY"Set the audit retention
Set how many months dev's audit trail is kept - 12 (the default), 84 or 120.
A person with dev:policy.write. The change is the port's own core.audit.retention record in dev's store. Lowering applies to the daily purge and to archive objects written from then on; an object already in the object lock archive keeps its date. Purge never deletes a record the archive does not hold.
Request body
months- 12 (the default), 84 or 120: the 1-, 7- and 10-year tiers; any other value is 422
Response
months- 12 (the default), 84 or 120: the 1-, 7- and 10-year tiers; any other value is 422
curl -X PUT "$CIRESK_API/v1/dev/audit/retention" \
-H "Authorization: Bearer $CIRESK_KEY" \
-H "Content-Type: application/json" \
-d '{
"months": 12
}'