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
| Field | Type | Required | Description |
|---|---|---|---|
logType | LogEnumType | Required | DiagnosticsLog or SecurityLog. |
requestId | integer | Required | Correlation id, echoed in LogStatusNotification. |
log | LogParametersType | Required | remoteLocation, and optionally oldestTimestamp and latestTimestamp. |
retries | integer | Optional | Upload retry count. |
retryInterval | integer | Optional | Seconds 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
| Field | Type | Required | Description |
|---|---|---|---|
status | LogStatusEnumType | Required | Whether the upload will be attempted. |
filename | string | Optional | The file that will be uploaded. |
statusInfo | StatusInfoType | Optional | Reason code. |
json
[3, "19223201", {
"status": "Accepted",
"filename": "CP001-security-20260909.log"
}]Values
LogStatusEnumType
| Value | Meaning |
|---|---|
Accepted | The upload will be attempted. |
Rejected | Refused. |
AcceptedCanceled | Accepted, 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.