Skip to content
Documentation Menu

Get Log

Source: OCPP 2.0.1 Part 2 — Specification (Edition 2, 2022-12-15) — Section 1.24 (Messages); Use Case N01 — Retrieve Log Information (Functional Block N. Diagnostics)

Overview

The CSMS sends GetLogRequest to ask the Charging Station to upload a log file (security or diagnostics) to a remote location. The CS responds with GetLogResponse(status, filename?) and then sends progress updates via LogStatusNotification, all sharing the same requestId.

If the CS is already uploading a log when a new request arrives, it SHOULD cancel the ongoing upload and respond with AcceptedCanceled.

Sequence Diagram

CSMS  ──── GetLogRequest ────▶  Charging Station
            (logType, requestId, log{remoteLocation, oldestTimestamp?, latestTimestamp?},
             retries?, retryInterval?)
CSMS  ◀─── GetLogResponse ────  Charging Station
            (status, filename?, statusInfo?)
                                  (then LogStatusNotificationRequest messages with same requestId)

Initiator

CSMS → Charging Station

Fields

Field NameField TypeCard.Description
logTypeLogEnumType1..1Required. Type of log file the CS should send.
requestIdinteger1..1Required. Id of this request.
retriesinteger0..1Optional. Maximum number of upload retries.
retryIntervalinteger0..1Optional. Interval (s) between retries.
logLogParametersType1..1Required. Specifies the requested log and remote location.

LogParametersType

FieldTypeCard.Description
remoteLocationstring [0..512]1..1Required. URL where the log should be stored.
oldestTimestampdateTime0..1Optional. Oldest log entry to include.
latestTimestampdateTime0..1Optional. Latest log entry to include.

LogEnumType values

DiagnosticsLog, SecurityLog.

LogStatusEnumType values

Accepted, Rejected, AcceptedCanceled.

Examples

{
  "logType": "SecurityLog",
  "requestId": 123,
  "retries": 3,
  "retryInterval": 60,
  "log": {
    "remoteLocation": "ftps://logs-user:secret@logs.example.com/uploads/",
    "oldestTimestamp": "2026-04-25T00:00:00Z",
    "latestTimestamp": "2026-04-27T12:00:00Z"
  }
}

Schema

Source: schemas/GetLogRequest.json, schemas/GetLogResponse.json (OCPP 2.0.1 FINAL)

Request schema (JSON Schema)
Response schema (JSON Schema)