import os
from dataframer import Dataframer
client = Dataframer(
api_key=os.environ.get("DATAFRAMER_API_KEY"), # This is the default and can be omitted
)
failures = client.dataframer.failures.list()
print(failures.context)curl https://df-api.dataframer.ai/api/dataframer/failures/ \
-H "Authorization: Bearer $DATAFRAMER_API_KEY"{
"results": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"project": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"platform": "langfuse"
},
"trace_count": 123,
"first_tracked_at": "2023-11-07T05:31:56Z",
"last_refreshed_at": "2023-11-07T05:31:56Z",
"rubrics": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
],
"human_review": {
"reviewed_trace_count": 123,
"coverage": 0.5,
"average_score": 0.5,
"severity_distribution": {
"low": 123,
"medium": 123,
"high": 123,
"critical": 123
},
"review_count": 123,
"reviews": [
{
"source_id": "<string>",
"source_url": "<string>",
"reviewer": {
"name": "<string>",
"email": "jsmith@example.com"
},
"submitted_at": "2023-11-07T05:31:56Z",
"grades": [
{
"rubric": "<string>",
"rubric_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"severity": "low",
"rationale": "<string>",
"scores": [
{
"dimension": "<string>",
"score": "<string>",
"confidence": "low"
}
]
}
],
"trace_edits": [
{
"area": "query",
"step_name": "<string>",
"status": "ok",
"rationale": "<string>",
"diff": "<string>"
}
]
}
]
},
"llm_judge": {
"judged_trace_count": 123,
"coverage": 0.5,
"average_score": 0.5,
"judgment_count": 123,
"judgments": [
{
"source_id": "<string>",
"source_url": "<string>",
"judge": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"model": "<string>"
},
"rubric": "<string>",
"rubric_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"evaluated_at": "2023-11-07T05:31:56Z",
"overall_score": 0.5,
"confidence": 0.5,
"verdicts": [
{
"dimension": "<string>",
"score": "<string>",
"notes": "<string>"
}
]
}
]
},
"analysis": {
"status": "never_run",
"last_analyzed_at": "2023-11-07T05:31:56Z",
"new_traces_since_analysis": 123,
"cause_count": 123,
"prompt_template_count": 123,
"prompt_templates": [
{
"group": "<string>",
"template": "<string>",
"trace_count": 123,
"notes": "<string>"
}
],
"causes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "active",
"rank": 123,
"title": "<string>",
"description": "<string>",
"probability": 0.5,
"attributed_trace_count": 123,
"first_detected_at": "2023-11-07T05:31:56Z",
"last_confirmed_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"remediation": {
"instructions": "<string>",
"prompt_template_edits": [
{
"template_ref": "<string>",
"before": "<string>",
"after": "<string>"
}
],
"probability": 0.5
},
"examples": [
{
"source_id": "<string>",
"source_url": "<string>",
"quote": "<string>",
"occurred_at": "2023-11-07T05:31:56Z"
}
]
}
]
}
}
],
"count": 123,
"context": {
"knowledge": {
"facts": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "policy_rule",
"text": "<string>",
"grounding": "<string>",
"tags": [
"<string>"
],
"confidence": 0.5,
"created_at": "2023-11-07T05:31:56Z",
"source": {
"source_id": "<string>",
"source_url": "<string>"
}
}
],
"total": 123
},
"rubric_count": 123,
"rubrics": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"project": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"platform": "langfuse"
},
"version": 123,
"description": "<string>",
"instructions": "<string>",
"dimensions": [
{
"name": "<string>",
"scoring_model": "pass_fail",
"required": true,
"levels": [
{
"label": "<string>",
"description": "<string>",
"value": 123
}
],
"positive_examples": [
{
"query": "<string>",
"answer": "<string>",
"source_id": "<string>",
"source_url": "<string>"
}
],
"negative_examples": [
{
"query": "<string>",
"answer": "<string>",
"source_id": "<string>",
"source_url": "<string>"
}
],
"examples": [
{
"query": "<string>",
"answer": "<string>",
"source_id": "<string>",
"source_url": "<string>"
}
]
}
],
"examples_omitted": 123
}
]
}
}{
"bad_updated_since": {
"value": {
"error": "updated_since must be an ISO 8601 datetime with a timezone, e.g. 2026-08-01T00:00:00Z"
}
}
}List failures
List the failures DataFramer tracks in your production traces
import os
from dataframer import Dataframer
client = Dataframer(
api_key=os.environ.get("DATAFRAMER_API_KEY"), # This is the default and can be omitted
)
failures = client.dataframer.failures.list()
print(failures.context)curl https://df-api.dataframer.ai/api/dataframer/failures/ \
-H "Authorization: Bearer $DATAFRAMER_API_KEY"{
"results": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"project": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"platform": "langfuse"
},
"trace_count": 123,
"first_tracked_at": "2023-11-07T05:31:56Z",
"last_refreshed_at": "2023-11-07T05:31:56Z",
"rubrics": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
],
"human_review": {
"reviewed_trace_count": 123,
"coverage": 0.5,
"average_score": 0.5,
"severity_distribution": {
"low": 123,
"medium": 123,
"high": 123,
"critical": 123
},
"review_count": 123,
"reviews": [
{
"source_id": "<string>",
"source_url": "<string>",
"reviewer": {
"name": "<string>",
"email": "jsmith@example.com"
},
"submitted_at": "2023-11-07T05:31:56Z",
"grades": [
{
"rubric": "<string>",
"rubric_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"severity": "low",
"rationale": "<string>",
"scores": [
{
"dimension": "<string>",
"score": "<string>",
"confidence": "low"
}
]
}
],
"trace_edits": [
{
"area": "query",
"step_name": "<string>",
"status": "ok",
"rationale": "<string>",
"diff": "<string>"
}
]
}
]
},
"llm_judge": {
"judged_trace_count": 123,
"coverage": 0.5,
"average_score": 0.5,
"judgment_count": 123,
"judgments": [
{
"source_id": "<string>",
"source_url": "<string>",
"judge": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"model": "<string>"
},
"rubric": "<string>",
"rubric_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"evaluated_at": "2023-11-07T05:31:56Z",
"overall_score": 0.5,
"confidence": 0.5,
"verdicts": [
{
"dimension": "<string>",
"score": "<string>",
"notes": "<string>"
}
]
}
]
},
"analysis": {
"status": "never_run",
"last_analyzed_at": "2023-11-07T05:31:56Z",
"new_traces_since_analysis": 123,
"cause_count": 123,
"prompt_template_count": 123,
"prompt_templates": [
{
"group": "<string>",
"template": "<string>",
"trace_count": 123,
"notes": "<string>"
}
],
"causes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "active",
"rank": 123,
"title": "<string>",
"description": "<string>",
"probability": 0.5,
"attributed_trace_count": 123,
"first_detected_at": "2023-11-07T05:31:56Z",
"last_confirmed_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"remediation": {
"instructions": "<string>",
"prompt_template_edits": [
{
"template_ref": "<string>",
"before": "<string>",
"after": "<string>"
}
],
"probability": 0.5
},
"examples": [
{
"source_id": "<string>",
"source_url": "<string>",
"quote": "<string>",
"occurred_at": "2023-11-07T05:31:56Z"
}
]
}
]
}
}
],
"count": 123,
"context": {
"knowledge": {
"facts": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "policy_rule",
"text": "<string>",
"grounding": "<string>",
"tags": [
"<string>"
],
"confidence": 0.5,
"created_at": "2023-11-07T05:31:56Z",
"source": {
"source_id": "<string>",
"source_url": "<string>"
}
}
],
"total": 123
},
"rubric_count": 123,
"rubrics": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"project": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"platform": "langfuse"
},
"version": 123,
"description": "<string>",
"instructions": "<string>",
"dimensions": [
{
"name": "<string>",
"scoring_model": "pass_fail",
"required": true,
"levels": [
{
"label": "<string>",
"description": "<string>",
"value": 123
}
],
"positive_examples": [
{
"query": "<string>",
"answer": "<string>",
"source_id": "<string>",
"source_url": "<string>"
}
],
"negative_examples": [
{
"query": "<string>",
"answer": "<string>",
"source_id": "<string>",
"source_url": "<string>"
}
],
"examples": [
{
"query": "<string>",
"answer": "<string>",
"source_id": "<string>",
"source_url": "<string>"
}
]
}
],
"examples_omitted": 123
}
]
}
}{
"bad_updated_since": {
"value": {
"error": "updated_since must be an ISO 8601 datetime with a timezone, e.g. 2026-08-01T00:00:00Z"
}
}
}Authorizations
API Key authentication. Format: "Bearer YOUR_API_KEY"
Query Parameters
Filter failures by which connected observability platform owns them
Return only failures that changed after this time
How much of each failure to return. full includes every root cause with its evidence, plus the expert-review and judge score blocks; summary returns counts only
full, summary Comma-separated extras. reviews and judgments add the submitted reviews and the judge verdicts themselves, which the list withholds by default because they dominate its size — their counts and averages are always present. context adds the knowledge and rubric content that GET /api/dataframer/context/ serves, so one call gets both
Maximum failures to return
x <= 200Number of failures to skip

