Skip to Content
API ReferenceGET /api/test-downloads

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:

ParameterTypeRequiredDescription
job_idstringYesUUID of a completed job
GET /api/test-downloads?job_id=abc-123-def

Authentication: None required. This endpoint is public.

Processing Steps

  1. Validate query parameter and fetch the job row (selected fields only)
  2. Check that the job has an output_storage_path
  3. 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/..." }
FieldTypeDescription
job_idstringThe job UUID
property_namestring | nullProperty name from the job
original_filenamestringOriginal uploaded filename
unit_countnumberTotal extracted units
error_countnumberValidation error count
warning_countnumberValidation warning count
original_urlstring | nullSigned URL for the original uploaded file (1-hour expiry)
output_urlstring | nullSigned URL for the extracted output file (1-hour expiry)

Validation Errors

CheckStatusMessage
Missing job_id400Missing job_id
Job not found404Job not found
No output file400No 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