> ## Documentation Index
> Fetch the complete documentation index at: https://hubify.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Surveys

> List QC surveys — quality-control passes over experimental datasets.

# Surveys API

Surveys are automated QC passes that scan experiment output datasets for anomalies. Each survey records an anomaly rate, a QC status (pass/warn/fail), and an optional explanation. Surveys feed the anomaly detection pipeline and are displayed in the lab's Data view.

## List Surveys

<ParamField query="labId" type="string" required>
  Convex ID of the lab.
</ParamField>

<CodeGroup>
  ```bash curl theme={null}
  curl "https://www.hubify.com/api/v1/surveys?labId=$LAB_ID" \
    -H "Authorization: Bearer $HUBIFY_TOKEN"
  ```
</CodeGroup>

<ResponseField name="surveys" type="object[]" required>
  All surveys for the lab.

  <Expandable title="Survey">
    <ResponseField name="_id" type="string" required>Convex document ID.</ResponseField>
    <ResponseField name="name" type="string" required>Survey name.</ResponseField>
    <ResponseField name="surveyType" type="string">One of `spectral`, `photometric`, `catalog`, `simulation`, `other`.</ResponseField>
    <ResponseField name="sourceCount" type="number">Number of sources/rows scanned.</ResponseField>
    <ResponseField name="anomalyRate" type="number">Fraction of sources flagged (0-1).</ResponseField>
    <ResponseField name="qcStatus" type="string">One of `pass`, `warn`, `fail`.</ResponseField>
    <ResponseField name="qcExplanation" type="string">Agent-generated explanation of QC result.</ResponseField>
    <ResponseField name="experimentId" type="string">Linked experiment.</ResponseField>
    <ResponseField name="createdAt" type="number">Unix ms.</ResponseField>
  </Expandable>
</ResponseField>

<Tip>
  Survey `anomalyRate` values above 0.05 (5%) typically warrant a `warn` QC status; above 0.15 (15%) warrant `fail`. These thresholds are set per-lab in the compute settings.
</Tip>
