Cases API (Deprecated)
⚠️
Deprecated: The Cases API has been replaced by the Issues & Fixes API. Please migrate to the new endpoints. The Cases API will be removed in a future release.
Manage failure cases, fixes, and shadow tests.
List Cases
GET /api/v1/casesQuery Parameters:
| Parameter | Type | Description |
|---|---|---|
agentId | string | Filter by agent |
status | string | open, proposed_fix, testing, closed |
severity | string | low, medium, high, critical |
Response:
{
"success": true,
"data": [
{
"id": "case_001",
"title": "Authentication Guidance Errors",
"severity": "high",
"status": "open",
"traceCount": 47,
"agentId": "agent_abc123",
"createdAt": "2024-01-15T10:00:00Z"
}
]
}Get Case
GET /api/v1/cases/:idCreate Case
POST /api/v1/casesRequest Body:
{
"title": "New failure pattern",
"description": "Users receiving incorrect information",
"agentId": "agent_abc123",
"severity": "medium",
"traceIds": ["tr_1", "tr_2", "tr_3"]
}Update Case
PATCH /api/v1/cases/:idDelete Case
DELETE /api/v1/cases/:idFixes API
List Fixes
GET /api/fixesCreate Fix
POST /api/fixesRequest Body:
{
"caseId": "case_001",
"type": "prompt_update",
"description": "Add 2FA verification step",
"changes": {
"promptDiff": "..."
}
}Apply Fix
POST /api/fixes/:id/applyShadow Tests API
Create Shadow Test
POST /api/shadow-testsRequest Body:
{
"fixId": "fix_001",
"traceIds": ["tr_1", "tr_2"],
"config": {
"comparisonMode": "side_by_side"
}
}Get Shadow Test Results
GET /api/shadow-tests/:id/resultsResponse:
{
"success": true,
"data": {
"testId": "test_001",
"status": "completed",
"results": {
"improved": 8,
"unchanged": 1,
"regressed": 1,
"improvementRate": 0.8
}
}
}Next Steps
- Evaluation & Grading - Run evaluations
- Webhooks & Notifications - Configure notifications