Traces & Observability
GET
/v1/orgs/{org_id}/traces/{trace_id}Get Trace
Get full trace detail including per-detector breakdown and replays.
Runtime, CI or Admin tokenscope: readoperation_id: traces.get
Authentication
Any bearer token belonging to the org can read this endpoint.
SDK install
pip install znyx-sdknpm install @znyx/sdkHeader parameters
| Name | Type | Required | Description |
|---|---|---|---|
| X-API-Key#header | string | null | optional | — |
| authorization#header | string | null | optional | — |
Responses
| Status | Description |
|---|---|
| 200 | Successful Response |
| 422 | Validation Error |
Response schema
idrequiredstring
request_idrequiredstring
trace_idstring | null
session_idstring | null
contextrequiredstring
decisionrequiredstring
risk_scoreinteger | null
policy_versionstring | null
latency_msinteger | null
rule_hit_idsstring[] | null
tenant_idstring | null
app_idstring | null
agent_idstring | null
created_atstring | null
span_idstring | null
input_textstring | null
policy_hashstring | null
detector_resultsobject[] | null
quality_scoresobject | null
metadataobject | null
envstring | null
replaysobject[]
Errors & what triggers them
| Code | Trigger | Fix |
|---|---|---|
| 401 | Missing or expired Authorization header. | — |
| 403 | Token does not have org access (wrong org_id, or insufficient role). | — |
| 404 | Resource does not exist in this org. | — |
Request
curl -X GET 'https://api.znyx.ai/v1/orgs/00000000-0000-0000-0000-000000000000/traces/00000000-0000-0000-0000-000000000000' \ -H 'Authorization: Bearer $ZNYX_TOKEN'
Response
application/json
Successful Response
{
"id": "string",
"request_id": "string",
"trace_id": null,
"session_id": null,
"context": "string",
"decision": "string",
"risk_score": null,
"policy_version": null,
"latency_ms": null,
"rule_hit_ids": null,
"tenant_id": null,
"app_id": null,
"agent_id": null,
"created_at": null,
"span_id": null,
"input_text": null,
"policy_hash": null,
"detector_results": null,
"quality_scores": null,
"metadata": null,
"env": null,
"replays": [
{}
]
}Schema: object