Skip to content

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

ParameterTypeRequiredDescription
idstringYesThe ID of the site for which to retrieve OCPP logs

Query Parameters

ParameterTypeRequiredDescription
fromstring (ISO 8601)YesStart of the time range
tostring (ISO 8601)YesEnd of the time range
actionsstringNoComma-separated list of OCPP actions to filter by (see Action Values)
sort_orderasc | descNoSort order for results by occurrence_time
takenumberNoNumber of records to return (max 1000)
skipnumberNoNumber 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

FieldTypeDescription
occurrence_timestring (ISO 8601)Timestamp of when the OCPP message occurred
actionstringThe OCPP action type (see Action Values)
payloadobjectThe raw OCPP message payload
site_idstringID of the site this log belongs to
site_namestringDisplay name of the site
charger_idstringID of the charging station that produced the log
connector_idnumberConnector number on the charging station

Request Fields

These fields are extracted from the OCPP request message where applicable.

FieldTypeDescription
request_timestampstringTimestamp from the request message
request_infostringAdditional info from the request
request_statusstringStatus reported in the request
request_reasonstringReason provided in the request
request_id_tagstringRFID/ID tag associated with the request
request_transaction_idnumberTransaction ID referenced in the request
request_vendor_idstringVendor identifier from a DataTransfer request
request_error_codestringError code from the request
request_vendor_error_codestringVendor-specific error code
request_meter_stopstringMeter value at transaction stop

Charging Profile Fields

These fields are extracted from the charging schedule in a SetChargingProfile request.

FieldTypeDescription
req_cs_profile_sched_charging_rate_unitstringUnit for charging rate (A or W)
req_cs_profile_sched_durationnumberDuration of the charging schedule (seconds)
req_cs_profile_sched_start_schedulestring (ISO 8601)Start time of the charging schedule
req_cs_profile_sched_min_charging_ratenumberMinimum charging rate in the schedule
req_cs_profile_sched_schedule_periodarraySchedule periods (see below)

Schedule Period

FieldTypeDescription
start_periodnumberOffset in seconds from the schedule start
limitnumberCharging rate limit for this period
number_phasesnumberNumber of phases to use

Response Fields

FieldTypeDescription
response_id_tag_info_statusstringAuthorization status returned for an ID tag

Extracted Meter Values

These fields are parsed from MeterValues messages for convenient access without processing the raw payload.

FieldTypeDescription
extracted_voltagenumberTotal voltage (V)
extracted_voltage_phase1numberVoltage on phase 1 (V)
extracted_voltage_phase2numberVoltage on phase 2 (V)
extracted_voltage_phase3numberVoltage on phase 3 (V)
extracted_currentnumberTotal current (A)
extracted_current_phase1numberCurrent on phase 1 (A)
extracted_current_phase2numberCurrent on phase 2 (A)
extracted_current_phase3numberCurrent on phase 3 (A)
extracted_powernumberTotal active power (W)
extracted_power_phase1numberActive power on phase 1 (W)
extracted_power_phase2numberActive power on phase 2 (W)
extracted_power_phase3numberActive power on phase 3 (W)
extracted_state_of_chargenumberBattery 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