Server Endpoints
Complete API reference for the Briefcase HTTP server (briefcase-server).
Base URL
https://api.briefcasebrain.com
Health
GET /health
Returns server health status.
Response: 200 OK
{
"status": "healthy",
"storage_healthy": true,
"version": "2.1.19",
"uptime_secs": 0
}
GET /info
Returns server version and configuration.
Response: 200 OK
{
"name": "briefcase-server",
"version": "2.1.19",
"rust_version": "1.75+",
"features": [
"decision-tracking",
"replay",
"policy-validation",
"diff"
]
}
Decisions
POST /api/v1/decisions
Create a new decision snapshot.
Request Body:
{
"function_name": "evaluate_claim",
"module_name": "claims",
"inputs": [{"value": "claim_data", "type": "json"}],
"outputs": [{"value": "approved", "type": "string", "confidence": 0.95}],
"model_params": {
"name": "gpt-4",
"version": "0613",
"provider": "openai",
"params": {"temperature": 0.1}
},
"execution_time_ms": 1250,
"tags": {"environment": "production"}
}
Response: 201 Created
{"id": "dec_abc123", "created_at": "2026-02-06T12:00:00Z"}
GET /api/v1/decisions/{id}
Retrieve a decision by ID.
GET /api/v1/decisions
List decisions with optional filters.
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
function_name | string | Filter by function |
module_name | string | Filter by module |
model_name | string | Filter by model |
limit | integer | Max results (default: 50) |
offset | integer | Pagination offset |
DELETE /api/v1/decisions/{id}
Delete a decision snapshot.
Replay
POST /api/v1/replay/{id}
Replay a single decision.
Request Body:
{
"mode": "tolerant",
"context_overrides": {}
}
Modes: strict | tolerant | validation_only
POST /api/v1/replay/batch
Batch replay multiple decisions.
Request Body:
{
"snapshot_ids": ["dec_abc123", "dec_def456"],
"mode": "tolerant",
"concurrency": 4
}
POST /api/v1/replay/{id}/validate
Validate a decision against policy rules.
Request Body:
{
"policy_name": "production_policy",
"rules": [
{"field": "confidence", "comparator": "gte", "threshold": 0.9},
{"field": "execution_time_ms", "comparator": "lte", "threshold": 5000}
]
}
POST /api/v1/replay/stats
Get statistics for a set of replay results.
Request Body:
{"snapshot_ids": ["dec_abc123", "dec_def456"]}
Diff
POST /api/v1/diff
Compare two decision snapshots.
Request Body:
{"original_id": "dec_abc123", "new_id": "dec_def456"}
Response:
{
"inputs_changed": false,
"outputs_changed": true,
"model_params_changed": false,
"field_changes": [
{"field": "outputs[0].value", "change_type": "Modified",
"old_value": "approved", "new_value": "denied"}
],
"execution_time_delta_ms": -250
}