Query Audit Events
query_audit_eventsQuery the Control Plane audit trail for mutations on one or more resources of the same kind. Omit name and names to fetch every event for that kind in the org. Supply names to audit multiple resources in one call (events are merged and sorted newest-first). Supports filtering by subject, audit context, and time range. Platform events live in the built-in cpln context. It answers who changed what; runtime events (scaling, probe failures) come from diagnose_workload.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"kind": "<kind>"
},
"name": "query_audit_events"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | End time — ISO 8601 OR a relative duration meaning that long ago (units m/h/d/w/mo/y; months are "mo"). Only valid with `from`. | |
| gvc | No | GVC name. Required when `kind` is GVC-scoped (workload, identity, dbcluster, volumeset) AND `name`/`names` is provided. | |
| org | No | Organization slug. | |
| from | No | Start time — ISO 8601 (e.g. "2025-10-23T07:00:00Z") OR a relative duration meaning that long ago (units m/h/d/w/mo/y; months are "mo", e.g. "3mo"). Overrides `since`. | |
| kind | Yes | Resource kind to query audit events for — singular, exact spelling (e.g., "workload", "secret", "policy", "identity", "auditctx", "gvc"). With a custom `context`, kind instead matches the arbitrary `resource.type` your workload wrote (e.g., "order"). | |
| name | No | Single resource name. Mutually exclusive with `names`. Omit both to query every resource of that kind in the org. | |
| limit | No | Maximum events to return in the merged result (default: 50, max: 1000). | |
| names | No | Multiple resource names to audit in one call. Merges events from all named resources, sorted newest-first. Max 25 names. Mutually exclusive with `name`. | |
| since | No | Relative lookback window from now (default: "7d"). Examples: "1h", "24h", "7d", "30d". Mutually exclusive with from/to. | |
| context | No | Audit context name (default: "cpln"). Use a custom context name to query workload-written events. | |
| subject | No | Filter by subject: user email (contains "@"), full link (starts with "/"), or bare service-account name (auto-resolved to /org/{org}/serviceaccount/{name}). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| data | No | The full result. Read this, not only the summary. | |
| details | No | ||
| summary | Yes | ||
| nextSteps | No |