What a guardrail's checks came to in a project
const url = 'https://example.com/v1/guardrails/example/outcomes?projectId=example&from=2026-04-15T12%3A00%3A00Z&to=2026-04-15T12%3A00%3A00Z';const options = {method: 'GET', headers: {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://example.com/v1/guardrails/example/outcomes?projectId=example&from=2026-04-15T12%3A00%3A00Z&to=2026-04-15T12%3A00%3A00Z' \ --header 'Authorization: Bearer <token>'Counts from the server, over a window: how many of the guardrail’s checks on agent turns in the project passed, were violated (the answer went through: log-only, noop, or an action handed back; or a retry sent it back for a new one), blocked (a halt failed the turn, or a retry whose attempts had run out) or errored (the check couldn’t run; a halt guardrail’s error fails the turn too, and is counted here). The same counts per agent version, and the window’s latest blocked turns, by run id and time only: a blocked answer stays behind its run’s page. A guardrail whose scope didn’t match a turn wasn’t checked on it. A check is counted per answer it judged: a guardrail judges a turn’s final answer, and, in a turn with a retry guardrail, its halt and retry guardrails judge each answer. Replays and dry runs aren’t counted. Outcomes go with their run’s retention, so a window can hold fewer than asked; recordedSince says how far back they go. A guardrail no longer registered still has its outcomes. Needs read on the guardrail and on the project.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”Responses
Section titled “Responses”The outcomes.
object
Examplegenerated
{ "guardrailId": "example", "from": "2026-04-15T12:00:00Z", "to": "2026-04-15T12:00:00Z", "counts": { "passed": 1, "violated": 1, "blocked": 1, "errored": 1 }, "byAgentVersion": [ { "agentId": "example", "agentVersion": "example", "passed": 1, "violated": 1, "blocked": 1, "errored": 1 } ], "recentBlocked": [ { "runId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "at": "2026-04-15T12:00:00Z", "agentId": "example", "agentVersion": "example" } ], "recordedSince": "2026-04-15T12:00:00Z"}A missing or malformed projectId, from, to or recent; a window over 90 days.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Missing / malformed / expired / revoked bearer token.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}rate-limit-exceeded with details.limit: "api-requests", on a runtime that sets workspace limits (Kindgi Cloud): this workspace’s limit on API requests a minute is reached, so the request wasn’t run; Retry-After says when to send it again.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Headers
Section titled “Headers”guardrail-outcomes-not-supported: this deployment doesn’t record guardrail outcomes.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}The database was too busy to answer in time (database-busy), or the authorization store couldn’t be reached (authz-backend-unavailable); Retry-After (whole seconds) says when to try again.
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}