Guardrail triggers

Package: agentrouter.guardrails.v1 Service: GuardrailTriggersService

Endpoints

List guardrail trigger events

What it does: Lists trigger events matching the specified filters.

Request fields:

FieldRequiredDescription
customer_idnoOwning customer scope; defaults to caller's session customer when empty.
project_idnoOwning project scope; defaults to caller's session project when empty.
pagenoCursor-pagination inputs.
guardrail_idsnoFilter to events for these guardrail ids.
consumer_idsnoFilter to events for these consumer ids.
resource_idsnoFilter to events for these resource ids.
date_fromnoInclusive start of the time range to query.
date_tonoInclusive end of the time range to query.
min_execution_duration_msnoFilter to events with execution_duration_ms >= this value.
max_execution_duration_msnoFilter to events with execution_duration_ms <= this value.
guardrail_typesnoFilter to events for guardrails of these types.
exclude_guardrail_typesnoExclude events for guardrails of these types.

Response fields:

FieldRequiredDescription
triggersnoTrigger events matching the request filters, one page's worth.
pagenoCursor-pagination outputs.
totalnoTotal count of matching triggers across all pages.
{"signatures":{"go":"c.GuardrailTriggers().ListGuardrailTriggers(ctx, \u0026guardrailsv1.ListGuardrailTriggersRequest{...})","python":"client.guardrailtriggers.listguardrailtriggers(...)","typescript":"client.guardrailtriggers.listguardrailtriggers({...})","cli":"tare api guardrails triggers list","curl":"curl \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H.../guardrails/triggers\" \\\n  -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\""},"examples":{"go":"// No Go SDK wrapper for GuardrailTriggersService yet -- use the CLI or curl example below.","python":"# No Python SDK wrapper for GuardrailTriggersService yet -- use the CLI or curl example below.","typescript":"// No TypeScript SDK wrapper for GuardrailTriggersService yet -- use the CLI or curl example below.","cli":"tare api guardrails triggers list","curl":"curl \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H.../guardrails/triggers\" \\\n  -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\""},"persona":"Authenticated (API key or session token)","httpVerb":"GET","httpPath":"/v1/customers/{customer_id}/projects/{project_id}/guardrails/triggers","slug":"list-guardrail-trigger-events"}

Get a guardrail trigger event

What it does: Returns a single trigger event by id.

Request fields:

FieldRequiredDescription
customer_idnoOwning customer scope; defaults to caller's session customer when empty.
project_idnoOwning project scope; defaults to caller's session project when empty.
idyesRequired: id of the trigger event to fetch.

Response fields:

FieldRequiredDescription
triggernoThe requested guardrail trigger event.
{"signatures":{"go":"c.GuardrailTriggers().GetGuardrailTrigger(ctx, \u0026guardrailsv1.GetGuardrailTriggerRequest{...})","python":"client.guardrailtriggers.getguardrailtrigger(...)","typescript":"client.guardrailtriggers.getguardrailtrigger({...})","cli":"tare api guardrails triggers get \u003cid\u003e","curl":"curl \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H.../guardrails/triggers/01H...\" \\\n  -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\""},"examples":{"go":"// No Go SDK wrapper for GuardrailTriggersService yet -- use the CLI or curl example below.","python":"# No Python SDK wrapper for GuardrailTriggersService yet -- use the CLI or curl example below.","typescript":"// No TypeScript SDK wrapper for GuardrailTriggersService yet -- use the CLI or curl example below.","cli":"tare api guardrails triggers get \u003cid\u003e","curl":"curl \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H.../guardrails/triggers/01H...\" \\\n  -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\""},"persona":"Authenticated (API key or session token)","httpVerb":"GET","httpPath":"/v1/customers/{customer_id}/projects/{project_id}/guardrails/triggers/{id}","slug":"get-a-guardrail-trigger-event"}

Get guardrail trigger statistics

What it does: Returns aggregate statistics for trigger events in scope.

Request fields:

FieldRequiredDescription
customer_idnoOwning customer scope; defaults to caller's session customer when empty.
project_idnoOwning project scope; defaults to caller's session project when empty.

Response fields:

FieldRequiredDescription
total_triggersnoTotal number of trigger events in scope.
avg_execution_time_msnoAverage execution time across all triggers, in milliseconds.
top_consumersnoRanked list of consumers by trigger count.
top_resourcesnoRanked list of resources by trigger count.
top_guardrailsnoRanked list of guardrails by trigger count.
time_distributionnoTime-series distribution of trigger counts.
{"signatures":{"go":"c.GuardrailTriggers().GetGuardrailTriggerStats(ctx, \u0026guardrailsv1.GetGuardrailTriggerStatsRequest{...})","python":"client.guardrailtriggers.getguardrailtriggerstats(...)","typescript":"client.guardrailtriggers.getguardrailtriggerstats({...})","cli":"tare api guardrails triggers stats","curl":"curl \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H.../guardrails/triggers/stats\" \\\n  -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\""},"examples":{"go":"// No Go SDK wrapper for GuardrailTriggersService yet -- use the CLI or curl example below.","python":"# No Python SDK wrapper for GuardrailTriggersService yet -- use the CLI or curl example below.","typescript":"// No TypeScript SDK wrapper for GuardrailTriggersService yet -- use the CLI or curl example below.","cli":"tare api guardrails triggers stats","curl":"curl \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H.../guardrails/triggers/stats\" \\\n  -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\""},"persona":"Authenticated (API key or session token)","httpVerb":"GET","httpPath":"/v1/customers/{customer_id}/projects/{project_id}/guardrails/triggers/stats","slug":"get-guardrail-trigger-statistics"}

Get guardrails dashboard summary

What it does: Returns a combined summary of guardrail posture and recent trigger activity for the dashboard view.

Request fields:

FieldRequiredDescription
customer_idnoOwning customer scope; defaults to caller's session customer when empty.
project_idnoOwning project scope; defaults to caller's session project when empty.

Response fields:

FieldRequiredDescription
guardrailsnoSummary of guardrails configured in scope.
eventsnoSummary of trigger events recorded in scope.
{"signatures":{"go":"c.GuardrailTriggers().GetDashboard(ctx, \u0026guardrailsv1.GetDashboardRequest{...})","python":"client.guardrailtriggers.getdashboard(...)","typescript":"client.guardrailtriggers.getdashboard({...})","cli":"tare api guardrails dashboard","curl":"curl \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H.../guardrails/dashboard\" \\\n  -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\""},"examples":{"go":"// No Go SDK wrapper for GuardrailTriggersService yet -- use the CLI or curl example below.","python":"# No Python SDK wrapper for GuardrailTriggersService yet -- use the CLI or curl example below.","typescript":"// No TypeScript SDK wrapper for GuardrailTriggersService yet -- use the CLI or curl example below.","cli":"tare api guardrails dashboard","curl":"curl \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H.../guardrails/dashboard\" \\\n  -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\""},"persona":"Authenticated (API key or session token)","httpVerb":"GET","httpPath":"/v1/customers/{customer_id}/projects/{project_id}/guardrails/dashboard","slug":"get-guardrails-dashboard-summary"}