GET /api/test-downloads
Public endpoint (no authentication required) that generates signed download URLs for both the original uploaded file and the extracted output file for a given job. Intended for internal testing and QA workflows.
Request
Method: GET
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
job_id | string | Yes | UUID of a completed job |
GET /api/test-downloads?job_id=abc-123-defAuthentication: None required. This endpoint is public.
Processing Steps
- Validate query parameter and fetch the job row (selected fields only)
- Check that the job has an
output_storage_path - Generate signed URLs — create 1-hour Supabase Storage signed URLs for both the original file and the output file (in parallel)
Response
Success (200):
{
"job_id": "abc-123-def",
"property_name": "Montrose at Vintage Park",
"original_filename": "rent_roll.xlsx",
"unit_count": 312,
"error_count": 0,
"warning_count": 2,
"original_url": "https://xyz.supabase.co/storage/v1/object/sign/...",
"output_url": "https://xyz.supabase.co/storage/v1/object/sign/..."
}| Field | Type | Description |
|---|---|---|
job_id | string | The job UUID |
property_name | string | null | Property name from the job |
original_filename | string | Original uploaded filename |
unit_count | number | Total extracted units |
error_count | number | Validation error count |
warning_count | number | Validation warning count |
original_url | string | null | Signed URL for the original uploaded file (1-hour expiry) |
output_url | string | null | Signed URL for the extracted output file (1-hour expiry) |
Validation Errors
| Check | Status | Message |
|---|---|---|
Missing job_id | 400 | Missing job_id |
| Job not found | 404 | Job not found |
| No output file | 400 | No output file |
Notes
- This endpoint has no authentication. It should not be exposed in production without access controls.
- Signed URLs expire after 1 hour. Call again to generate fresh URLs.
- Unlike
/api/download, this endpoint returns URLs for both files (original and output) and does not generate a formatted filename.
Last updated on