Aggregate decision counts for a project
GET
/api/v2026-01/audit/summary
const url = 'https://api.zstrike.io/api/v2026-01/audit/summary';const options = { method: 'GET', headers: { 'x-op-id': 'example', 'x-session-id': 'example', Authorization: 'Bearer <token>' }};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.zstrike.io/api/v2026-01/audit/summary \ --header 'Authorization: Bearer <token>' \ --header 'x-op-id: example' \ --header 'x-session-id: example'Returns counts over the same events GET /audit/events lists, without returning the events themselves. Intended for dashboard tiles, which otherwise have to page every event across the wire and count client-side - capping an exact number into a lower bound. byPrincipal is keyed on the Cedar principal, the only identity an audit record carries. Callers holding their own user or membership model are expected to resolve those keys themselves.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”projectId
string
start_date
string
ISO instant; rows are filtered at full resolution.
end_date
string
ISO instant; rows are filtered at full resolution.
principal
string
action
string
resource
string
decision
string
policy
string
sessionId
string
Header Parameters
Section titled “Header Parameters”x-op-id
required
string
Operation ID
x-session-id
required
string
Session ID
Responses
Section titled “Responses”Aggregate counts
Media typeapplication/json
object
projectId
string
totals
object
total
integer
allow
integer
deny
integer
byPrincipal
Array<object>
object
principal
string
total
integer
allow
integer
deny
integer
byAction
Array<object>
object
action
string
total
integer
allow
integer
deny
integer
Examplegenerated
{ "projectId": "example", "totals": { "total": 1, "allow": 1, "deny": 1 }, "byPrincipal": [ { "principal": "example", "total": 1, "allow": 1, "deny": 1 } ], "byAction": [ { "action": "example", "total": 1, "allow": 1, "deny": 1 } ]}Bad Request
Media typeapplication/json
object
code
string
description
string
success
boolean
errors
Array<string>
op_id
string
timestamp
string format: date-time
Example
{ "code": "E400", "description": "Bad Request", "success": false, "errors": [ "Error Message 1", "Error Message 2" ], "op_id": "op_example"}Unauthorized
Media typeapplication/json
object
code
string
description
string
success
boolean
errors
Array<string>
op_id
string
timestamp
string format: date-time
Example
{ "code": "E401", "description": "Unauthorized", "success": false, "errors": [ "Unauthorized" ], "op_id": "op_example"}Forbidden
Media typeapplication/json
object
code
string
description
string
success
boolean
errors
Array<string>
op_id
string
timestamp
string format: date-time
Example
{ "code": "E403", "description": "Forbidden", "success": false, "errors": [ "Forbidden" ], "op_id": "op_example"}Not Found
Media typeapplication/json
object
code
string
description
string
success
boolean
errors
Array<string>
op_id
string
timestamp
string format: date-time
Example
{ "code": "E404", "description": "Not Found", "success": false, "errors": [ "Not Found" ], "op_id": "op_example"}Internal Server Error
Media typeapplication/json
object
code
string
description
string
success
boolean
errors
Array<string>
op_id
string
timestamp
string format: date-time
Example
{ "code": "E500", "description": "Internal Server Error", "success": false, "errors": [ "Internal Server Error" ]}