import os
from dataframer import Dataframer
client = Dataframer(
api_key=os.environ.get("DATAFRAMER_API_KEY"), # This is the default and can be omitted
)
context = client.dataframer.context.retrieve()
print(context.knowledge)curl https://df-api.dataframer.ai/api/dataframer/context/ \
-H "Authorization: Bearer $DATAFRAMER_API_KEY"{
"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_uuid": {
"value": {
"error": "Invalid rubric_id format: \"abc\" is not a valid UUID"
}
}
}{
"not_found": {
"value": {
"error": "Rubric not found"
}
}
}Get context
Retrieve the knowledge and rubric content that failures reference
import os
from dataframer import Dataframer
client = Dataframer(
api_key=os.environ.get("DATAFRAMER_API_KEY"), # This is the default and can be omitted
)
context = client.dataframer.context.retrieve()
print(context.knowledge)curl https://df-api.dataframer.ai/api/dataframer/context/ \
-H "Authorization: Bearer $DATAFRAMER_API_KEY"{
"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_uuid": {
"value": {
"error": "Invalid rubric_id format: \"abc\" is not a valid UUID"
}
}
}{
"not_found": {
"value": {
"error": "Rubric not found"
}
}
}Authorizations
API Key authentication. Format: "Bearer YOUR_API_KEY"
Query Parameters
Narrow the rubrics to one connected observability platform's failures. It narrows only the rubrics — knowledge stays workspace-wide by design, so a project with no rubrics of its own returns knowledge and an empty rubrics list
Serve only this rubric, with every example included and no size budget. Ignores project_id, and the response carries rubrics alone — no knowledge key, since naming a rubric says what is wanted
Response
Workspace knowledge and rubric content
Knowledge distilled from your expert reviews. Always the whole workspace, never narrowed by project_id: policy, terminology and domain facts are meant to carry across projects. Absent entirely when rubric_id is given
Show child attributes
Show child attributes
Rubrics your failures were graded against. When it exceeds the length of rubrics, that list is a trimmed view
Those rubrics by name, each at its current version
Show child attributes
Show child attributes

