Skip to content
Documentation Menu

Get Log

Source: OCPP 1.6 Security Whitepaper Edition 2 (2020-03-31) — Use Case N01 (Retrieve Log Information), Sections 5.9 / 5.10 (Messages)

Overview

The Central System can request a Charge Point to upload a log file (security log or diagnostics log) to a given location. The format of the log file is not prescribed.

Flow:

  1. Central System sends GetLog.req to the Charge Point with the log type, request id, target URL and optional retry parameters.
  2. The Charge Point responds with GetLog.conf indicating whether it can accept the request and the file name that will be uploaded.
  3. The Charge Point sends LogStatusNotification.req(status = Uploading, requestId).
  4. The Charge Point uploads the log file to the URL provided in log.remoteLocation.
  5. The Charge Point sends LogStatusNotification.req(status = Uploaded, requestId) (or a failure status).

If the Charge Point is already uploading a log when a new GetLog.req arrives, it SHOULD cancel the ongoing upload and respond with AcceptedCanceled.

It is RECOMMENDED to upload via FTP or FTPS, which support resume on partial uploads. The CP advertises which protocols it supports via the SupportedFileTransferProtocols configuration key.

Sequence Diagram

Figure 12. Sequence Diagram: Get Security Log

Central System  ──── GetLog.req ────▶  Charge Point
                     (logType, requestId, log{remoteLocation, ...}, retries?, retryInterval?)
Central System  ◀─── GetLog.conf ────  Charge Point
                     (status, filename?)
                ◀─── LogStatusNotification.req (Uploading)
                ──── LogStatusNotification.conf ────▶
                                       (...uploading log file...)
                ◀─── LogStatusNotification.req (Uploaded)
                ──── LogStatusNotification.conf ────▶

Initiator

Central System → Charge Point

Fields

Field NameField TypeCard.Description
logTypeLogEnumType1..1Required. This contains the type of log file that the Charge Point should send.
requestIdinteger1..1Required. The id of this request.
retriesinteger0..1Optional. How many times the Charge Point must try to upload the log before giving up.
retryIntervalinteger0..1Optional. The interval in seconds after which a retry may be attempted.
logLogParametersType1..1Required. This field specifies the requested log and the location to which the log should be sent.

LogParametersType

FieldTypeCard.Description
remoteLocationstring [0..512]1..1Required. The URL of the location at the remote system where the log should be stored.
oldestTimestampdateTime0..1Optional. Date and time of the oldest logging information to include.
latestTimestampdateTime0..1Optional. Date and time of the latest logging information to include.

LogEnumType values

  • DiagnosticsLog — Diagnostics log file.
  • SecurityLog — Security log file.

LogStatusEnumType values

  • Accepted — Accepted this log upload. CP will start the log file upload.
  • Rejected — Log upload request rejected.
  • AcceptedCanceled — Accepted, but in doing so canceled an ongoing log file upload.

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"
  }
}
  • SupportedFileTransferProtocols — File transfer protocols supported by the CP.

Schema

Source: schemas/GetLog.json, schemas/GetLogResponse.json (OCPP 1.6 Security Whitepaper, JSON Schema draft-06)

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