# The published versions of a unit's passport, newest first

> `GET /batteries/{batteryId}/passport/versions` · Scope: `read` · operationId `listPassportVersions`

Any member. With `at`, only versions published at or before that instant: the first item is the
version that was valid then (history by date for the portal, with every tier).

## Pfad-Parameter

- **batteryId** `string (uuid)` (erforderlich)

## Query-Parameter

- **limit** `integer` (Standard: 50): Maximum number of items to return.
- **cursor** `string`: Opaque cursor from a previous page's `next_cursor`.
- **at** `string (date-time)`

## Antworten

### 200 (`application/json`)

A page of versions.

- **items** `PassportVersionSummary[]` (erforderlich)
  - **batterypass_v2_issue_count** `integer` (erforderlich)
  - **batterypass_v2_valid** `boolean` (erforderlich): Whether the BatteryPass v2.0 export passed its schema (advisory, ADR-012).
  - **canonical_hash** `string` (erforderlich): `sha256:<hex>` of the JCS-canonical snapshot (ADR-004).
  - **key_id** `string` (erforderlich)
  - **public_hash** `string` (erforderlich): `sha256:<hex>` of the JCS-canonical public document (ADR-013).
  - **published_at** `string (date-time)` (erforderlich)
  - **published_by** `string (uuid)`
  - **published_by_name** `string`
  - **reason** `string` (erforderlich)
  - **registry_version** `string` (erforderlich)
  - **valid_until** `string (date-time)`: When a later version replaced this one.
  - **version_no** `integer` (erforderlich)
- **next_cursor** `string | null` (erforderlich): Cursor for the next page, or null when this is the last page.

### 400 (`application/problem+json`)

The request is malformed or failed validation (`validation_error`), or a token is invalid or expired (`invalid_token`).

### 401 (`application/problem+json`)

The API key is missing, unknown or revoked (`unauthenticated`).

### 403 (`application/problem+json`)

The API key may not perform this action (`forbidden`): it lacks the operation's scope, or the action needs more than a viewer's rights.

### 404 (`application/problem+json`)

The resource does not exist in the organisation of the API key, or the public passport is unknown (`not_found`).

### default (`application/problem+json`)

Any other problem, e.g. `internal_error`.

## Beispiel

```bash title="cURL"
curl -X GET "https://passport.kabin.sh/api/v1/batteries/{batteryId}/passport/versions" \
  -H "Authorization: Bearer $BATTERYPASS_API_KEY"
```
