Zum Inhalt springen
Pässe

One published version with its signed snapshot and validation report

Scope: readSiehe auch:Authentifizierung ·Fehler ·Paginierung ·Ratenlimits
GET
/batteries/{batteryId}/passport/versions/{versionNo}

Any member.

Autorisierung

apiKey
headerAutorisierungBearer <Token>

Organisation API key sent as Authorization: Bearer bp_live_… (ADR-017). Accepted only by the operations that list this scheme, with the scope in their x-api-key-scope.

Pfad-Parameter

batteryId*string
Formatuuid
versionNo*integer
Bereich1 <= value

Antwort-Body

The version.

application/json
  1. response
batterypass_v2_issue_count*integer
batterypass_v2_valid*boolean

Whether the BatteryPass v2.0 export passed its schema (advisory, ADR-012).

canonical_hash*string

sha256:<hex> of the JCS-canonical snapshot (ADR-004).

key_id*string
public_hash*string

sha256:<hex> of the JCS-canonical public document (ADR-013).

published_at*string
Formatdate-time
published_by?string
Formatuuid
published_by_name?string
reason*string
registry_version*string
valid_until?string

When a later version replaced this one.

Formatdate-time
version_no*integer
Bereich1 <= value
batterypass_v2*

Result of validating a BatteryPass v2.0 export against its schema (advisory, ADR-012).

public_document*

A passport version projected to an access tier. The public projection is stored and signed at publication (ADR-013); verify it by canonicalising this object with RFC 8785 (JCS), hashing it with SHA-256 and checking the Ed25519 signature.

public_signature*string

Ed25519 signature of the canonical public document bytes (base64url, no padding).

registry_hash*string
signature*string

Ed25519 signature of the canonical snapshot bytes (base64url, no padding).

snapshot*

A JSON document whose shape is described elsewhere (snapshot, BatteryPass v2.0 export).

Beispielanfrage
curl -X GET 'https://example.com/api/v1/batteries/497f6eca-6276-4993-bfeb-53cbbbba6f08/passport/versions/1'
Beispielantwort
{  "batterypass_v2_issue_count": 0,  "batterypass_v2_valid": true,  "canonical_hash": "string",  "key_id": "string",  "public_hash": "string",  "published_at": "2019-08-24T14:15:22Z",  "published_by": "9ac9eee7-2153-423d-b22d-04e12679154a",  "published_by_name": "string",  "reason": "string",  "registry_version": "string",  "valid_until": "2019-08-24T14:15:22Z",  "version_no": 1,  "batterypass_v2": {    "issues": [      {        "field_key": "string",        "kind": "missing",        "message": "string",        "path": "string"      }    ],    "schema": "string",    "valid": true  },  "public_document": {    "category": {      "key": "string",      "label": {        "de": "string",        "en": "string"      }    },    "economic_operator": {      "address": {        "city": "string",        "confirmed_source": "manual",        "country": "string",        "extra_line": "string",        "place_id": "string",        "postal_code": "string",        "region": "string",        "street": "string"      },      "contact_person": "string",      "name": "string",      "spare_parts_contact": "string",      "support_email": "user@example.com",      "website": "string"    },    "gs1_digital_link": "string",    "gtin": "string",    "model_name": "string",    "passport_id": "string",    "predecessor_passport_id": "string",    "restricted_fields_present": [      "string"    ],    "sections": [      {        "fields": [          {            "documents": [              {                "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",                "kind": "declaration_of_conformity",                "mime": "string",                "sha256": "string",                "size_bytes": 0,                "title": "string",                "url": "string"              }            ],            "key": "string",            "label": {              "de": "string",              "en": "string"            },            "legal": {              "property1": "string",              "property2": "string"            },            "level": "model",            "schema": {              "enum": [                null              ],              "enum_labels": [                {                  "de": "string",                  "en": "string"                }              ],              "items": {},              "label": {                "de": "string",                "en": "string"              },              "max": 0,              "max_bytes": 0,              "max_items": 0,              "max_length": 0,              "mime": [                "string"              ],              "min": 0,              "pattern": "string",              "properties": [                {                  "name": "string",                  "schema": {}                }              ],              "type": "string",              "unit": "string"            },            "status": "provided",            "tier": "public",            "trigger": {              "de": "string",              "en": "string"            },            "unit": "string",            "value": null          }        ],        "key": "string",        "label": {          "de": "string",          "en": "string"        }      }    ],    "serial_number": "string",    "tier": "public",    "version": {      "no": 1,      "published_at": "2019-08-24T14:15:22Z",      "registry_version": "string"    }  },  "public_signature": "string",  "registry_hash": "string",  "signature": "string",  "snapshot": {}}