---
title: "Audit a published Darwin Core archive"
method: GET
path: "/audit"
---

# Audit a published Darwin Core archive

`GET /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`

A file this tool reads, sent or fetched from the address given, is read as one dropped on our website: what the read finds (column headings, the shape of its rows, the terms they became, refusal codes) is kept so the reader learns, never the file or its values. Names and contacts are dropped or replaced by a code, and protected species' locations are made coarser. The defects the website's own audit finds in a published Darwin Core archive, given by its GBIF dataset key or its address: each coded, with the check that found it, the file and lines it stands on and its count over the rows read; and every TDWG BDQ TG2 test, ran with its counts or not run under a code (a test not run is not a test passed). With call_id instead: a pending audit, collected.

## Query parameters

- `gbif_dataset` string, uuid
- `url` string, uri
- `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)
