Skip to content
Passports

What changed from an earlier version to this one

Scope: readSee also:Authentication ·Errors ·Pagination ·Rate limits
GET
/batteries/{batteryId}/passport/versions/{versionNo}/diff

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

Authorization

apiKey
headerAuthorizationBearer <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.

Path Parameters

batteryId*string
Formatuuid
versionNo*integer
Range1 <= value

Query Parameters

against?integer
Range1 <= value

Response 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
Value in"version""preview"
to_version_no?integer

Absent in a publish preview.

Example Request
curl -X GET 'https://example.com/api/v1/batteries/497f6eca-6276-4993-bfeb-53cbbbba6f08/passport/versions/1/diff'
Example Response
{  "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}