List Reports
Lists all reports for a specific case.
Endpoint
GET /api/reports?case_id=...
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
case_id | string | Yes | The ID of the case to list reports for |
Request Example
curl "https://api.silentwitness.ai/api/reports?case_id=case_abc123" \
-H "X-API-Key: sk-your-api-key"
Response
Success (200 OK)
{
"success": true,
"data": {
"reports": [
{
"id": "rpt_xyz789",
"case_id": "case_abc123",
"type": "technical_report",
"status": "completed",
"created_at": "2024-01-15T10:30:00Z"
},
{
"id": "rpt_abc456",
"case_id": "case_abc123",
"type": "technical_report",
"status": "failed",
"created_at": "2024-01-14T09:00:00Z"
}
],
"total": 2
}
}
Error (400 Bad Request)
{
"success": false,
"error": "case_id query parameter is required"
}
Response Fields
Reports Array
| Field | Type | Description |
|---|---|---|
id | string | The report ID |
case_id | string | The case ID |
type | string | The report type |
status | string | Current status: pending, processing, completed, failed, cancelled |
created_at | string | ISO 8601 timestamp when the report was created |
Root Object
| Field | Type | Description |
|---|---|---|
reports | array | Array of report summaries |
total | number | Total number of reports for this case |
Notes
- Reports are sorted by
created_atin descending order (newest first) - The list response only includes summary information. Use
GET /api/reports/:idto get full details including progress and output URLs.