API ReferenceCases (Deprecated)

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/cases

Query Parameters:

ParameterTypeDescription
agentIdstringFilter by agent
statusstringopen, proposed_fix, testing, closed
severitystringlow, 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/:id

Create Case

POST /api/v1/cases

Request 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/:id

Delete Case

DELETE /api/v1/cases/:id

Fixes API

List Fixes

GET /api/fixes

Create Fix

POST /api/fixes

Request Body:

{
  "caseId": "case_001",
  "type": "prompt_update",
  "description": "Add 2FA verification step",
  "changes": {
    "promptDiff": "..."
  }
}

Apply Fix

POST /api/fixes/:id/apply

Shadow Tests API

Create Shadow Test

POST /api/shadow-tests

Request Body:

{
  "fixId": "fix_001",
  "traceIds": ["tr_1", "tr_2"],
  "config": {
    "comparisonMode": "side_by_side"
  }
}

Get Shadow Test Results

GET /api/shadow-tests/:id/results

Response:

{
  "success": true,
  "data": {
    "testId": "test_001",
    "status": "completed",
    "results": {
      "improved": 8,
      "unchanged": 1,
      "regressed": 1,
      "improvementRate": 0.8
    }
  }
}

Next Steps