import os
from dataframer import Dataframer
client = Dataframer(
api_key=os.environ.get("DATAFRAMER_API_KEY"), # This is the default and can be omitted
)
failure = client.dataframer.failures.retrieve(
failure_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
print(failure.id)curl https://df-api.dataframer.ai/api/dataframer/failures/$FAILURE_ID/ \
-H "Authorization: Bearer $DATAFRAMER_API_KEY"{
"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>"
}
],
"content_location": {
"data_plane": true,
"s3_key": "<string>",
"storage_uri": "<string>",
"sha256": "<string>",
"bytes_size": 123,
"version": 123,
"fields": {}
},
"content_unavailable_reason": "result_content_in_data_plane"
}
]
},
"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>"
}
],
"prompt_templates_content_location": {
"data_plane": true,
"s3_key": "<string>",
"storage_uri": "<string>",
"sha256": "<string>",
"bytes_size": 123,
"version": 123,
"fields": {}
},
"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",
"content_location": {
"data_plane": true,
"s3_key": "<string>",
"storage_uri": "<string>",
"sha256": "<string>",
"bytes_size": 123,
"version": 123,
"fields": {}
},
"content_unavailable_reason": "result_content_in_data_plane"
}
],
"content_location": {
"data_plane": true,
"s3_key": "<string>",
"storage_uri": "<string>",
"sha256": "<string>",
"bytes_size": 123,
"version": 123,
"fields": {}
},
"content_unavailable_reason": "result_content_in_data_plane"
}
]
},
"content_location": {
"data_plane": true,
"s3_key": "<string>",
"storage_uri": "<string>",
"sha256": "<string>",
"bytes_size": 123,
"version": 123,
"fields": {}
},
"content_unavailable_reason": "result_content_in_data_plane",
"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>"
},
"content_location": {
"data_plane": true,
"s3_key": "<string>",
"storage_uri": "<string>",
"sha256": "<string>",
"bytes_size": 123,
"version": 123,
"fields": {}
},
"content_unavailable_reason": "result_content_in_data_plane"
}
],
"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_uuid": {
"value": {
"error": "Invalid failure_id format: \"abc\" is not a valid UUID"
}
}
}{
"not_found": {
"value": {
"error": "Failure not found"
}
}
}Get failure
Retrieve a specific failure by ID
import os
from dataframer import Dataframer
client = Dataframer(
api_key=os.environ.get("DATAFRAMER_API_KEY"), # This is the default and can be omitted
)
failure = client.dataframer.failures.retrieve(
failure_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
print(failure.id)curl https://df-api.dataframer.ai/api/dataframer/failures/$FAILURE_ID/ \
-H "Authorization: Bearer $DATAFRAMER_API_KEY"{
"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>"
}
],
"content_location": {
"data_plane": true,
"s3_key": "<string>",
"storage_uri": "<string>",
"sha256": "<string>",
"bytes_size": 123,
"version": 123,
"fields": {}
},
"content_unavailable_reason": "result_content_in_data_plane"
}
]
},
"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>"
}
],
"prompt_templates_content_location": {
"data_plane": true,
"s3_key": "<string>",
"storage_uri": "<string>",
"sha256": "<string>",
"bytes_size": 123,
"version": 123,
"fields": {}
},
"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",
"content_location": {
"data_plane": true,
"s3_key": "<string>",
"storage_uri": "<string>",
"sha256": "<string>",
"bytes_size": 123,
"version": 123,
"fields": {}
},
"content_unavailable_reason": "result_content_in_data_plane"
}
],
"content_location": {
"data_plane": true,
"s3_key": "<string>",
"storage_uri": "<string>",
"sha256": "<string>",
"bytes_size": 123,
"version": 123,
"fields": {}
},
"content_unavailable_reason": "result_content_in_data_plane"
}
]
},
"content_location": {
"data_plane": true,
"s3_key": "<string>",
"storage_uri": "<string>",
"sha256": "<string>",
"bytes_size": 123,
"version": 123,
"fields": {}
},
"content_unavailable_reason": "result_content_in_data_plane",
"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>"
},
"content_location": {
"data_plane": true,
"s3_key": "<string>",
"storage_uri": "<string>",
"sha256": "<string>",
"bytes_size": 123,
"version": 123,
"fields": {}
},
"content_unavailable_reason": "result_content_in_data_plane"
}
],
"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_uuid": {
"value": {
"error": "Invalid failure_id format: \"abc\" is not a valid UUID"
}
}
}{
"not_found": {
"value": {
"error": "Failure not found"
}
}
}Authorizations
API Key authentication. Format: "Bearer YOUR_API_KEY"
Path Parameters
Unique identifier for the failure
Query Parameters
Comma-separated extras. context adds the knowledge and rubric content that GET /api/dataframer/context/ serves, so one call gets both
Comma-separated lists to leave out of the response, keeping their counts and averages: reviews, judgments. Both are served by default here, unlike on the list
Response
The failure with its root-cause analysis
Short name for the failure
What the traces in this failure have in common
The project the traces came from
Show child attributes
Show child attributes
Traces currently assigned to this failure
When the failure was first tracked
When traces were last pulled and matched (null if never)
Rubrics graded against on this failure's traces (omitted when detail=summary)
Show child attributes
Show child attributes
Expert-review scores (null if none; omitted when detail=summary)
Show child attributes
Show child attributes
LLM-judge scores (null if none; omitted when detail=summary)
Show child attributes
Show child attributes
Automatic root-cause analysis
Show child attributes
Show child attributes
Where description is stored in your own cloud (null unless your deployment is customer-hosted)
Show child attributes
Show child attributes
Set when description is empty because it is stored in your own cloud, not because there is none (null otherwise). The name, counts and scores are still complete. The Python SDK reads the text from your data plane, fills the fields and clears this
result_content_in_data_plane Knowledge and rubric content; returned only when include=context
Show child attributes
Show child attributes

