Developers/Guides/Read your chargers' log events
Guide

Read your chargers' log events

Read the OCPP messages your chargers exchanged with Voltra, and what Voltra did about them, with an API key. Filter by charger, page through a time window with a cursor, keep polling for new events, and know how long events are kept.

This guide is for developers who want their chargers' log events in their own systems. These are the events the Console's Logs page shows: every OCPP message a charger sent or received, and what Voltra did about it. By the end you will have read a day of events for one charger, page by page, and kept polling for new ones.

You need an API key and the organization ID. A key restricted to projects also needs x-project-id; see Who sees which events. A Console user needs a role with charger read access (READ_CHARGE_POINTS).

The endpoint is in beta and is being turned on one organization at a time. Where it is not on for your organization, it answers 404 like a path that does not exist.

Resources used
  • Charger — An OCPP charge point registered in a project. The guide covers its two identifiers, how it connects, its status and its lifecycle; the reference lists the operations that act on it.
01

Who sees which events

The organization is the one in x-organization-id, which must be your key's organization. The query string never chooses the organization or widens the project.

Callerx-project-idEvents returned
A key restricted to projectsRequired: one of the key's projectsOnly events of that project. Events with no project are never returned.
A key with no project restrictionLeave it outEvery event of the organization.
A Console userOptionalWith it, only that project's events; without it, the organization's.

A restricted key that sends no x-project-id, or names a project it is not linked to, gets 401 or 403. See Fix 401 and 403 errors.

02

How long events are kept

meta.retention_seconds is how long your organization's log store keeps events, as the store reports it: 604800 seconds (7 days) today. Events older than that can already be gone, and it is null when the store cannot report it. A cursor that points at events retention has since removed continues with the oldest event still kept, so read at least once per retention period to miss nothing.

03

Read a page of events

Example
curl "https://api.voltra.com/csms/v2/chargers/log-events?charge_box_id=CHARGER-001&timestamp_after=2026-11-20T00:00:00Z&limit=100" \
  -H "x-api-key: $VOLTRA_KEY" \
  -H "x-organization-id: $VOLTRA_ORG" \
  -H "x-project-id: $VOLTRA_PROJECT"
Response (trimmed)
{
  "data": [
    {
      "type": "csms.log_event",
      "id": "5f0c2d8e-0000-4000-8000-000000000002",
      "attributes": {
        "id": "5f0c2d8e-0000-4000-8000-000000000002",
        "timestamp": "2026-11-20T00:00:04.120Z",
        "event_type": "protocol_event",
        "event": "ocpp.message",
        "source": "ocpp",
        "level": "info",
        "summary": "StatusNotification from CHARGER-001",
        "charge_box_id": "CHARGER-001",
        "project_id": "…",
        "ocpp": {
          "action": "StatusNotification",
          "direction": "inbound",
          "message_type": "CALL",
          "unique_id": "5f0c2d8e-0000-4000-8000-000000000001",
          "version": "1.6"
        },
        "raw_ocpp_frame": [2, "5f0c2d8e-0000-4000-8000-000000000001", "StatusNotification", { "connectorId": 1, "status": "Available", "errorCode": "NoError" }]
      },
      "relationships": null,
      "meta": null
    }
  ],
  "meta": {
    "request_id": "…",
    "pagination": { "has_more": true, "limit": 100, "cursors": { "after": "eyJv…", "before": null } },
    "retention_seconds": 604800
  }
}

Events come oldest first, in the order Voltra recorded them.

Query parameters

ParameterMeaning
limitEvents per page, 1 to 100. Default 20.
afterThe meta.pagination.cursors.after of the previous page.
timestamp_afterOnly events recorded at or after this time (RFC 3339). Without it and without after, the window starts 24 hours ago.
timestamp_beforeOnly events recorded before this time. Without it, the window ends with the newest event when the request is served.
charge_box_idOnly events of this charger, by its OCPP identity.
source, levelOnly events with this source (for example ocpp) or level (for example error).
direction, message_type, action, unique_id, status, error_codeOnly OCPP messages whose ocpp field has this value. direction is inbound or outbound; message_type is CALL, CALLRESULT or CALLERROR.
searchOnly events whose summary, message, event name, charger, or OCPP action, message id, status or error code contains this text, ignoring case.

Filters match exactly, except search, and all of them must match.

04

Page through a window

Repeat the call with after until has_more is false. Send the same filters and time bounds on every page. You get every matching event of the window once, with no gaps and no repeats.

#!/usr/bin/env bash
set -euo pipefail
base="https://api.voltra.com/csms/v2/chargers/log-events?charge_box_id=CHARGER-001&timestamp_after=2026-11-20T00:00:00Z&timestamp_before=2026-11-21T00:00:00Z&limit=100"
after=""
while :; do
  page=$(curl -sSf "$base${after:+&after=$after}" \
    -H "x-api-key: $VOLTRA_KEY" -H "x-organization-id: $VOLTRA_ORG" -H "x-project-id: $VOLTRA_PROJECT")
  echo "$page" | jq -c '.data[].attributes'
  after=$(echo "$page" | jq -r '.meta.pagination.cursors.after')
  [ "$(echo "$page" | jq -r '.meta.pagination.has_more')" = "true" ] || break
done

A page can be short, or empty, while has_more is true. Filters are applied while Voltra reads the stored events, and one request reads at most 20,000 stored events, in at most 10 reads, for at most 5 seconds. With a narrow filter, such as one rarely seen charger, the page holds what was found before that budget ran out, and the cursor continues from where reading stopped. Keep going until has_more is false; do not stop on a short page.

05

Poll for new events

Leave out timestamp_before and walk to the last page. Its has_more is false, and its cursors.after is still set: keep it. Call again later with that cursor, and the same filters, to get only the events recorded since. When nothing new has been recorded, the page is empty and the cursor is unchanged.

Poll no more often than every few seconds, and back off on 429 and 5xx as described in Back off on rate limits.

06

Event fields

Every field below is present on every event and is null when the event has none. An event can carry more fields.

FieldMeaning
idThe event's id.
timestampWhen the event happened, in UTC.
event_typeprotocol_event (an OCPP message), domain_event (something Voltra did or decided) or application_log.
eventThe event name, for example ocpp.message.
source, levelWhere it came from, for example ocpp, and its level, for example info or error.
summary, messageOne line for people, and the full message.
charge_box_id, connect_shortcodeThe charger, by its OCPP identity and its short code. See Charger.
device_label, device_typeThe device's label and type, where the event is about a device.
org_id, project_idThe organization and project the event belongs to.
ocppFor an OCPP message: action, direction, message_type, unique_id, status, error_code, session_id, version and elapsed_ms.
raw_ocpp_frame, rawThe OCPP-J frame exactly as it was sent.
dataEvent-specific details.
subjectWhat the event is about: id, type and parent_id.
traceThe trace it was recorded in: trace_id and span_id. Quote these to Voltra support.
07

Errors

Errors use the error envelope.

StatuscodeCauseFix
400validation_failedlimit is not 1 to 100, a time is not RFC 3339, or timestamp_after is not before timestamp_before. details.field_errors names the field.Fix the parameter.
400csms.invalid_cursorafter was not returned by this endpoint for this organization.Pass cursors.after back unchanged, or start again without it.
401, 403The key, organization or project is wrong, or a restricted key sent no x-project-id.See Who sees which events.
404The endpoint is not on for your organization yet.Contact Voltra support.
500csms.log_store_unavailableThe log store could not be read.Retry with backoff.