Zum Inhalt springen
Lebenszyklus

The lifecycle of a unit, newest first

Scope: readSiehe auch:Authentifizierung ·Fehler ·Paginierung ·Ratenlimits
GET
/batteries/{batteryId}/lifecycle-events

Any member. Events recorded by members, service-partner reports, condition updates and second life.

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

Query-Parameter

limit?integer

Maximum number of items to return.

Bereich1 <= value <= 200
Standard50
cursor?string

Opaque cursor from a previous page's next_cursor.

Länge1 <= length <= 512

Antwort-Body

A page of events.

application/json
  1. response
items*array<>
next_cursor*|

Cursor for the next page, or null when this is the last page.

Beispielanfrage
curl -X GET 'https://example.com/api/v1/batteries/497f6eca-6276-4993-bfeb-53cbbbba6f08/lifecycle-events'
Beispielantwort
{  "items": [    {      "api_key": {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "name": "string"      },      "battery_id": "bf9efcd2-a647-473f-b459-71d521ebe1ad",      "created_at": "2019-08-24T14:15:22Z",      "description": "string",      "evidence": [        {          "access_tier": "public",          "filename": "string",          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",          "kind": "declaration_of_conformity",          "revision": 1,          "superseded": true,          "title": "string"        }      ],      "field_keys": [        "string"      ],      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "occurred_on": "2019-08-24",      "partner": {        "email": "user@example.com",        "name": "string",        "request_id": "266ea41d-adf5-480b-af50-15b940c2b846"      },      "related_battery_id": "1ce5ea42-7c27-4051-b607-ecc81b42bedf",      "related_serial_number": "string",      "reported_by": {        "display_name": "string",        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"      },      "source": "manual",      "type": "placed_on_market"    }  ],  "next_cursor": "string"}