---
title: "Audit a Darwin Core archive named in JSON or sent as a file"
method: POST
path: "/audit"
---

# Audit a Darwin Core archive named in JSON or sent as a file

`POST /audit`

## Request

- Base URL: `https://passage-data.com/api/v1`
- URL: `https://passage-data.com/api/v1/audit`
- Auth: one of:
  - none
  - HTTP bearer
  - API key in header `x-api-key`

## Request body

- object
  - `gbif_dataset` string, uuid
  - `url` string, uri
  - `content_base64` string: The zip itself, base64 (up to 10 MB of zip).
  - `filename` string
  - `annex` boolean
  - `call_id` string

## Response `200`

The audit: defects by check with file, lines and count; every BDQ TG2 test ran or not run

- ArchiveAudit
  - `archive` object: source (gbif, url, upload), dataset (GBIF's registry entry), url, bytes, sha256, core, extensions, read
  - `scope` object: rows_read, rows_in_file, complete, columns_read, columns_unmapped, reads
  - `summary` object
    - `checks` integer
    - `checks_fired` integer
    - `defects` integer
    - `defects_shown` integer
    - `cells` integer
    - `bdq_ran` integer
    - `bdq_not_compliant` integer
    - `bdq_not_run` integer
  - `checks` object[]
    - `code` string
    - `severity` string
    - `proposes_a_fix` boolean
    - `findings` integer
    - `what` string
    - `do` string
  - `findings` object[]
    - `check` integer: index into checks
    - `code` string
    - `field` string
    - `count` integer
    - `of_rows` integer
    - `examples` string[]
    - `file` string
    - `lines` integer[]
    - `lines_matched` integer, nullable
    - `by` 'value' | 'row_position' | 'blank_cell' | 'bdq_test' | 'declaration'
    - `not_located` string
    - `proposal` object
    - `asks` string
  - `bdq` object: standard, unit, file, records, summary, ran (test, terms, compliant, not_compliant, prerequisites_not_met, file, lines, values), not_run by code
  - `kept` object
  - `annex` object
    - `format` string
    - `chars` integer
    - `text` string, nullable
  - `says` string

## Other responses

- `202`: pending: the audit is still running; collect it with GET /audit?call_id=
- `400`: source.missing, source.several, dataset.malformed, url.malformed, url.refused, call_id.malformed, call_id.unknown, file.malformed
- `404`: dataset.not_found
- `413`: archive.too_large, body.too_large
- `422`: archive.not_dwca, archive.unreadable, dataset.no_archive
- `502`: archive.unreachable, registry.unreachable, audit.failed
- `503`: engine.unreachable, engine.timeout

---

[API](https://skmtc.dev/passage-data/apis/passage-data-cited-environmental-limits.md) · [All operations](https://skmtc.dev/passage-data/apis/passage-data-cited-environmental-limits/llms.txt) · [OpenAPI document](https://skmtc.dev/passage-data/apis/passage-data-cited-environmental-limits/revisions/ba066708bf53?raw)
