Appearance
OCPP Logs
Context
The OCPP Logs API provides access to the same OCPP (Open Charge Point Protocol) message logs that are available through the ChargePilot Dashboard under the OCPP Logs section. Logs capture the communication between your charging stations and the ChargePilot controller, and are useful for debugging, auditing, and monitoring charger behaviour.
The data returned by this API corresponds directly to the fields available in the OCPP Logs Download in the ChargePilot Dashboard. For detailed field descriptions and examples, refer to that article.
Available Endpoints
GET /ocpp-logs/site/{id}- Retrieve OCPP logs for a specific site
Returns a paginated list of OCPP log entries for the given site, filtered by time range and optionally by action type.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The ID of the site for which to retrieve OCPP logs |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
from | string (ISO 8601) | Yes | Start of the time range |
to | string (ISO 8601) | Yes | End of the time range |
actions | string | No | Comma-separated list of OCPP actions to filter by (see Action Values) |
sort_order | asc | desc | No | Sort order for results by occurrence_time |
take | number | No | Number of records to return (max 1000) |
skip | number | No | Number of records to skip, for pagination |
Response
json
{
"ocpp_logs": [
/* array of OCPPLog objects */
],
"count": 42
}Data
Each log entry contains the following fields:
Core Fields
| Field | Type | Description |
|---|---|---|
occurrence_time | string (ISO 8601) | Timestamp of when the OCPP message occurred |
action | string | The OCPP action type (see Action Values) |
payload | object | The raw OCPP message payload |
site_id | string | ID of the site this log belongs to |
site_name | string | Display name of the site |
charger_id | string | ID of the charging station that produced the log |
connector_id | number | Connector number on the charging station |
Request Fields
These fields are extracted from the OCPP request message where applicable.
| Field | Type | Description |
|---|---|---|
request_timestamp | string | Timestamp from the request message |
request_info | string | Additional info from the request |
request_status | string | Status reported in the request |
request_reason | string | Reason provided in the request |
request_id_tag | string | RFID/ID tag associated with the request |
request_transaction_id | number | Transaction ID referenced in the request |
request_vendor_id | string | Vendor identifier from a DataTransfer request |
request_error_code | string | Error code from the request |
request_vendor_error_code | string | Vendor-specific error code |
request_meter_stop | string | Meter value at transaction stop |
Charging Profile Fields
These fields are extracted from the charging schedule in a SetChargingProfile request.
| Field | Type | Description |
|---|---|---|
req_cs_profile_sched_charging_rate_unit | string | Unit for charging rate (A or W) |
req_cs_profile_sched_duration | number | Duration of the charging schedule (seconds) |
req_cs_profile_sched_start_schedule | string (ISO 8601) | Start time of the charging schedule |
req_cs_profile_sched_min_charging_rate | number | Minimum charging rate in the schedule |
req_cs_profile_sched_schedule_period | array | Schedule periods (see below) |
Schedule Period
| Field | Type | Description |
|---|---|---|
start_period | number | Offset in seconds from the schedule start |
limit | number | Charging rate limit for this period |
number_phases | number | Number of phases to use |
Response Fields
| Field | Type | Description |
|---|---|---|
response_id_tag_info_status | string | Authorization status returned for an ID tag |
Extracted Meter Values
These fields are parsed from MeterValues messages for convenient access without processing the raw payload.
| Field | Type | Description |
|---|---|---|
extracted_voltage | number | Total voltage (V) |
extracted_voltage_phase1 | number | Voltage on phase 1 (V) |
extracted_voltage_phase2 | number | Voltage on phase 2 (V) |
extracted_voltage_phase3 | number | Voltage on phase 3 (V) |
extracted_current | number | Total current (A) |
extracted_current_phase1 | number | Current on phase 1 (A) |
extracted_current_phase2 | number | Current on phase 2 (A) |
extracted_current_phase3 | number | Current on phase 3 (A) |
extracted_power | number | Total active power (W) |
extracted_power_phase1 | number | Active power on phase 1 (W) |
extracted_power_phase2 | number | Active power on phase 2 (W) |
extracted_power_phase3 | number | Active power on phase 3 (W) |
extracted_state_of_charge | number | Battery state of charge (%) |
Action Values
The action field (and the actions filter parameter) accepts any of the following OCPP 1.6 / OCPP 2.0 action names:
Authorize, BootNotification, CancelReservation, CertificateSigned, ChangeAvailability, ChangeConfiguration, ClearCache, ClearChargingProfile, DataTransfer, DeleteCertificate, DiagnosticsStatusNotification, ExtendedTriggerMessage, FirmwareStatusNotification, GetCompositeSchedule, GetConfiguration, GetDiagnostics, GetInstalledCertificateIds, GetLocalListVersion, GetLog, Heartbeat, InstallCertificate, LogStatusNotification, MeterValues, RemoteStartTransaction, RemoteStopTransaction, ReserveNow, Reset, SecurityEventNotification, SendLocalList, SetChargingProfile, SignCertificate, SignedFirmwareStatusNotification, SignedUpdateFirmware, StartTransaction, StatusNotification, StopTransaction, TriggerMessage, UnlockConnector, UpdateFirmware