Skip to content

Download a report

After BIOS sends a report_ready event, a client downloads the report's structured data and PDF from S3, as in step 6 of the happy path scenario. It first asks the BIOS API for download URLs.

Request the download URLs

CASE_ID and REPORT_ID are the data.case_id and subject_id from the report_ready event.

curl https://sandbox.biosgenomics.com/api/v1/cases/$CASE_ID/reports/$REPORT_ID \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -o report-files.json

Response

The BIOS API returns 200 with the report and a download URL for each of its files. Each URL expires at its expires_at, 15 minutes after the request. If a URL expires, the client can repeat the request for new ones.

report-files.json
{
  "report_id": "rpt_01kfd3m4n5p6q7r8s9t0v1w2x3",
  "case_id": "case_01kfb7q2r3s4t5v6w7x8y9z0ab",
  "created_at": "2026-11-18T16:12:44.902117Z",
  "files": [
    {
      "kind": "structured_data",
      "content_type": "application/json",
      "size_bytes": 184392,
      "sha256": "8938d4d5abad5cf7ad6ee00db72da5367ac42c6dac8fb4305d32d3c61e11dba8",
      "download_url": "https://bios-reports-sandbox-us-west-2.s3.us-west-2.amazonaws.com/org_01kf9c8d7e6f5g4h3j2k1m0npq/case_01kfb7q2r3s4t5v6w7x8y9z0ab/reports/rpt_01kfd3m4n5p6q7r8s9t0v1w2x3/report.json?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=...&X-Amz-Date=20261118T161805Z&X-Amz-Expires=900&X-Amz-SignedHeaders=host&X-Amz-Signature=...",
      "expires_at": "2026-11-18T16:33:05.118204Z"
    },
    {
      "kind": "pdf",
      "content_type": "application/pdf",
      "size_bytes": 412776,
      "sha256": "b5ae77a37a75dda25f0713d6619824d8f0b6e523779bad4e20b90461096ffac4",
      "download_url": "https://bios-reports-sandbox-us-west-2.s3.us-west-2.amazonaws.com/org_01kf9c8d7e6f5g4h3j2k1m0npq/case_01kfb7q2r3s4t5v6w7x8y9z0ab/reports/rpt_01kfd3m4n5p6q7r8s9t0v1w2x3/report.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=...&X-Amz-Date=20261118T161805Z&X-Amz-Expires=900&X-Amz-SignedHeaders=host&X-Amz-Signature=...",
      "expires_at": "2026-11-18T16:33:05.118204Z"
    }
  ]
}

Download the files

The client downloads each file from its download_url. It can compare each file's SHA-256 digest with sha256 to check the download.

curl -o report.json "$(jq -r '.files[] | select(.kind == "structured_data") | .download_url' report-files.json)"
curl -o report.pdf "$(jq -r '.files[] | select(.kind == "pdf") | .download_url' report-files.json)"