Skip to main content

List Reports

Lists all reports for a specific case.

Endpoint

GET /api/reports?case_id=...

Query Parameters

ParameterTypeRequiredDescription
case_idstringYesThe 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

FieldTypeDescription
idstringThe report ID
case_idstringThe case ID
typestringThe report type
statusstringCurrent status: pending, processing, completed, failed, cancelled
created_atstringISO 8601 timestamp when the report was created

Root Object

FieldTypeDescription
reportsarrayArray of report summaries
totalnumberTotal number of reports for this case

Notes

  • Reports are sorted by created_at in descending order (newest first)
  • The list response only includes summary information. Use GET /api/reports/:id to get full details including progress and output URLs.