Skip to main content

Traces & Observability

GET/v1/orgs/{org_id}/traces/{trace_id}

Get Trace

Get full trace detail including per-detector breakdown and replays.

Bearer token or X-API-Keyscope: org memberoperation_id: traces.get

Authentication

Send either Authorization: Bearer <token> or X-API-Key: <token>. Any org token with sufficient scope. Create tokens from the console or the /v1/orgs/{org_id}/tokens endpoints. Requests without a valid credential are rejected with 401.

SDK install

pip install znyx-sdknpm install @znyx/sdk

Code samples

Request

curl -X GET "$ZNYX_API_URL/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

Path parameters

NameTypeRequiredDescription
org_id#pathstringrequired-
trace_id#pathstringrequired-

Header parameters

NameTypeRequiredDescription
X-API-Key#headerstring | nulloptional-
authorization#headerstring | nulloptional-

Responses

StatusDescription
200Successful Response
422Validation 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

CodeTriggerFix
401Missing or expired Authorization header.-
403Token does not have org access (wrong org_id, or insufficient role).-
404Resource does not exist in this org.-