GetLog

Asks the station to upload a log file. Generalises 1.6's GetDiagnostics, and adds the security log.

Version
OCPP 2.0.1
Direction
CSMS → Charge Point
Functional block
Diagnostics

1.6 had GetDiagnostics, which fetched one vendor-defined blob. 2.0.1 has GetLog with a logType, and the important addition is SecurityLog — the auditable record of SecurityEventNotification events.

Request

FieldTypeRequiredDescription
logTypeLogEnumTypeRequiredDiagnosticsLog or SecurityLog.
requestIdintegerRequiredCorrelation id, echoed in LogStatusNotification.
logLogParametersTypeRequiredremoteLocation, and optionally oldestTimestamp and latestTimestamp.
retriesintegerOptionalUpload retry count.
retryIntervalintegerOptionalSeconds between retries.
json
[2, "19223201", "GetLog", {
  "requestId": 1001,
  "logType": "SecurityLog",
  "log": {
    "remoteLocation": "https://logs.example.com/upload/CP001",
    "oldestTimestamp": "2026-09-08T00:00:00Z",
    "latestTimestamp": "2026-09-09T00:00:00Z"
  }
}]

Response

FieldTypeRequiredDescription
statusLogStatusEnumTypeRequiredWhether the upload will be attempted.
filenamestringOptionalThe file that will be uploaded.
statusInfoStatusInfoTypeOptionalReason code.
json
[3, "19223201", {
  "status": "Accepted",
  "filename": "CP001-security-20260909.log"
}]

Values

LogStatusEnumType

ValueMeaning
AcceptedThe upload will be attempted.
RejectedRefused.
AcceptedCanceledAccepted, and an ongoing upload was cancelled.

Implementation notes

`SecurityLog` is the one worth automating. It is where a fleet's authentication failures and tamper events are recoverable from, and it is not available any other way.

As in 1.6, the station uploads directly — the destination must be reachable from the station's network, and a pre-signed URL must not expire before the upload finishes.