# Get analysis QC metrics

Retrieves quality control metrics for an analysis.

Returns QC data for all samples in the analysis including:
- Sample metadata (name, assay, reference genome)
- Text metrics (categorical QC values)
- Range metrics (numerical QC values with thresholds)

Endpoint: GET /v1/analysis/qc_metrics
Version: 96
Security: bearerAuth

## Security:

  - `bearerAuth` (unknown)
    http bearer JWT

## Query parameters:

  - `analysis_id` (integer, required)
    The analysis ID to get QC metrics for

## Response 200:

  - `200` (unknown)
    QC metrics retrieved successfully

## Response 200 fields (application/json):

  - `samples_qc` (array, required)
    QC data for each sample

  - `samples_qc.sample_metadata` (object, required)
    Metadata about the sample for QC context

  - `samples_qc.sample_metadata.sample_id` (string)
    Sample identifier
    Example: 67890

  - `samples_qc.sample_metadata.name` (string)
    Sample name
    Example: Sample_001

  - `samples_qc.sample_metadata.annotation_version` (number)
    Annotation version used
    Example: 85

  - `samples_qc.sample_metadata.created_at` (string)
    Sample creation date
    Example: 2024-01-15

  - `samples_qc.sample_metadata.assay` (string)
    Assay name
    Example: WES_v2

  - `samples_qc.sample_metadata.reference_genome` (string)
    Reference genome version
    Example: HG38

  - `samples_qc.sample_qc_metrics` (object, required)
    QC metrics values

  - `samples_qc.sample_qc_metrics.text_metrics` (array, required)
    Categorical/text QC metrics

  - `samples_qc.sample_qc_metrics.text_metrics.name` (string)
    Metric name
    Example: Sex Check

  - `samples_qc.sample_qc_metrics.text_metrics.value` (string)
    Metric value
    Example: Male

  - `samples_qc.sample_qc_metrics.text_metrics.status` (string)
    QC status
    Enum: "PASS", "WARN", "FAIL"

  - `samples_qc.sample_qc_metrics.range_metrics` (array, required)
    Numerical QC metrics with ranges

  - `samples_qc.sample_qc_metrics.range_metrics.name` (string)
    Metric name
    Example: Mean Coverage

  - `samples_qc.sample_qc_metrics.range_metrics.value` (number)
    Metric value
    Example: 125.5

  - `samples_qc.sample_qc_metrics.range_metrics.status` (string)
    QC status
    Enum: "PASS", "WARN", "FAIL"

  - `samples_qc.sample_qc_metrics.range_metrics.range` (object)
    Range thresholds for QC metric

  - `samples_qc.sample_qc_metrics.range_metrics.range.interval` (array)
    Expected range [min, max]
    Example: [100,200]

  - `samples_qc.sample_qc_metrics.range_metrics.range.threshold_range` (array)
    Warning threshold range [min, max]
    Example: [80,250]

  - `samples_qc.sample_qc_metrics.range_metrics.details` (string)
    Additional details
    Example: Coverage is within expected range

  - `error` (string)
    Error message if QC 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

