List Files
Returns a list of all files associated with a case.
Endpoint
GET /api/files
Authentication
Requires API Key authentication.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
caseId | string | Yes | Case ID to list files for |
Response
Returns an array of file objects.
{
"success": true,
"data": [
{
"id": "file_abc123def456",
"case_id": "case_xyz789",
"file_name": "front_damage.jpg",
"file_size": 2456789,
"file_type": "image/jpeg",
"status": "ready",
"file_source": "plaintiff",
"file_category": "crash_analysis_plaintiff",
"vehicle_index": 0,
"s3_key": "cases/case_xyz789/uploads/front_damage.jpg",
"url": "https://storage.silentwitness.ai/...",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:31:00Z"
},
{
"id": "file_def456ghi789",
"case_id": "case_xyz789",
"file_name": "rear_damage.jpg",
"file_size": 1987654,
"file_type": "image/jpeg",
"status": "ready",
"file_source": "plaintiff",
"file_category": "crash_analysis_plaintiff",
"vehicle_index": 0,
"s3_key": "cases/case_xyz789/uploads/rear_damage.jpg",
"url": "https://storage.silentwitness.ai/...",
"created_at": "2024-01-15T10:32:00Z",
"updated_at": "2024-01-15T10:33:00Z"
}
]
}
Example
curl -X GET "https://api.silentwitness.ai/api/files?caseId=case_abc123def456" \
-H "X-API-Key: $API_KEY"
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique file identifier |
case_id | string | Case this file belongs to |
file_name | string | Original file name |
file_size | integer | File size in bytes |
file_type | string | MIME type (e.g., image/jpeg) |
status | string | File status: processing, ready, error |
file_source | string | Source: plaintiff, defense |
file_category | string | Category for workflow organization |
vehicle_index | integer | Vehicle index (0=plaintiff, 1=defendant) |
url | string | Direct URL to download the file |
created_at | datetime | When the file was uploaded |
updated_at | datetime | When the file was last updated |
Errors
| Code | Description |
|---|---|
| 400 | Missing caseId parameter |
| 401 | Unauthorized - Invalid or missing token |
| 500 | Internal server error |