Audit events
Read the audit feed of who did what, scoped to what you can see.
The audit feed records actions across Cadence — who did what, to what. GET /api/v1/audit_events; MCP audit_events_list. Needs read. Replace
https://cadence.example.com with your instance's address.
Filter by kind, actor_type and actor_id, subject_type and subject_id,
from and to, and space. Results are cursor-paged; follow next_cursor with
cursor. An invalid filter is refused with 422 and code invalid_filter.
curl "https://cadence.example.com/api/v1/audit_events?space=OPS&kind=authz.denied" \
-H "Authorization: Bearer smc_your_token_here"The feed is scoped to what you can see: you get events in the spaces you are a member of. Events that belong to the instance as a whole, rather than to any space, are visible only to whoever administers the instance.
Events about a workflow
Creating, updating, or deleting a workflow records an event with subject_type
Workflow and a kind of workflow.created, workflow.updated, or
workflow.deleted. A created or deleted event carries the workflow's attributes in
its payload, and an updated event carries what changed. Events recorded before
workflows took their current name were rewritten to these values, so a filter on
kind=workflow.updated, or on subject_type=Workflow with a subject_id, returns
older events as well as new ones.
You see a workflow's events only while the workflow exists. Once a workflow is
deleted, none of its events are listed, for any caller, including whoever
administers the instance: not its workflow.created and workflow.updated events,
and not the workflow.deleted event itself. A filter on kind=workflow.deleted
therefore returns nothing, and so does a subject_id lookup on a deleted workflow.
If you need a record of a workflow's history, list its events before you
delete the workflow and save the output: give subject_type=Workflow and the
workflow's subject_id, as shown below, and follow next_cursor until the last
page.
To list the workflows created or updated in a space, filter by kind. kind
takes several values separated by commas:
curl "https://cadence.example.com/api/v1/audit_events?space=OPS&kind=workflow.created,workflow.updated" \
-H "Authorization: Bearer smc_your_token_here"To list the events about one workflow, give subject_type=Workflow together with
subject_id, the workflow's numeric id (see
Workflows and stages § Workflows).
subject_type on its own is refused with 422, code invalid_filter, and
subject_type and subject_id must be given together.
curl "https://cadence.example.com/api/v1/audit_events?space=OPS&subject_type=Workflow&subject_id=31" \
-H "Authorization: Bearer smc_your_token_here"