Zum Inhalt springen
Pässe

What changed from an earlier version to this one

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

Any member. Compares the signed snapshots field by field; against defaults to the previous version.

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

Query-Parameter

against?integer
Bereich1 <= value

Antwort-Body

The changes.

application/json
  1. response
fields*array<>
from_version_no?integer

Absent when there is nothing to compare with (the first publication).

metadata*array<>
to*string
Wert in"version""preview"
to_version_no?integer

Absent in a publish preview.

Beispielanfrage
curl -X GET 'https://example.com/api/v1/batteries/497f6eca-6276-4993-bfeb-53cbbbba6f08/passport/versions/1/diff'
Beispielantwort
{  "fields": [    {      "after": {        "documents": [          "string"        ],        "measured_at": "2019-08-24T14:15:22Z",        "revision": 0,        "source": "manual",        "status": "provided",        "tier": "public",        "unit": "string",        "value": null      },      "before": {        "documents": [          "string"        ],        "measured_at": "2019-08-24T14:15:22Z",        "revision": 0,        "source": "manual",        "status": "provided",        "tier": "public",        "unit": "string",        "value": null      },      "change": "added",      "key": "string",      "level": "model"    }  ],  "from_version_no": 0,  "metadata": [    {      "after": "string",      "before": "string",      "key": "model_version"    }  ],  "to": "version",  "to_version_no": 0}