# Get BAM file download URL (v2)

Retrieves pre-signed download URLs for BAM and BAI files associated with an analysis.

Version 2 includes:
- DNA BAM and BAI files
- RNA BAM and BAI files (for tumor/somatic samples)
- Checksum files for verification

The URLs are temporary and will expire after a set period.

Endpoint: GET /v2/analysis/bam_location
Version: 96
Security: bearerAuth

## Security:

  - `bearerAuth` (unknown)
    http bearer JWT

## Query parameters:

  - `analysis_id` (integer, required)
    The analysis ID to get BAM locations for

## Response 200:

  - `200` (unknown)
    BAM locations retrieved successfully

## Response 200 fields (application/json):

  - `bam` (string)
    Pre-signed URL for DNA BAM file

  - `bam_checksum` (string)
    Pre-signed URL for DNA BAM checksum file

  - `bai` (string)
    Pre-signed URL for DNA BAI file

  - `bai_checksum` (string)
    Pre-signed URL for DNA BAI checksum file

  - `rna_bam` (string)
    Pre-signed URL for RNA BAM file

  - `rna_bam_checksum` (string)
    Pre-signed URL for RNA BAM checksum file

  - `rna_bai` (string)
    Pre-signed URL for RNA BAI file

  - `rna_bai_checksum` (string)
    Pre-signed URL for RNA BAI checksum file

  - `error` (string)
    Error message if files not available

## Response 401:

  - `401` (unknown)
    Authentication failed - invalid or missing token

## Response 401 fields (application/json):

  - `error` (string, required)
    Error type
    Example: Not Found

  - `message` (string, required)
    Human-readable error description
    Example: Analysis with ID 12345 was not found

## Response 404:

  - `404` (unknown)
    Resource not found

## Response 404 fields (application/json):

  - `error` (string, required)
    Error type
    Example: Not Found

  - `message` (string, required)
    Human-readable error description
    Example: Analysis with ID 12345 was not found

## Response 429:

  - `429` (unknown)
    Rate limit exceeded

## Response 429 fields (application/json):

  - `error` (string, required)
    Error type
    Example: Not Found

  - `message` (string, required)
    Human-readable error description
    Example: Analysis with ID 12345 was not found

## Response 429 headers (application/json):

  - `Retry-After` (integer)
    Number of seconds to wait before retrying

