Get OCPP Logs
const url = 'https://api.exolink.cloud/tenant/example/logs/ocpp';const options = { method: 'GET', headers: { 'x-exo-logs-format': 'csv', 'x-exo-actions': 'BootNotification,Heartbeat', 'x-exo-msg-types': 'CALL,CALLERROR', 'x-exo-direction': 'charger', Authorization: 'Bearer <token>' }};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.exolink.cloud/tenant/example/logs/ocpp \ --header 'Authorization: Bearer <token>' \ --header 'x-exo-actions: BootNotification,Heartbeat' \ --header 'x-exo-direction: charger' \ --header 'x-exo-logs-format: csv' \ --header 'x-exo-msg-types: CALL,CALLERROR'Get OCPP communication logs, in one of three modes:
- With
x-exo-logs-format, the logs are stored as a file and the response carries a download link. - Otherwise, with
x-exo-size, one page of the logs, newest first. Pass the returnednextCursorasx-exo-cursorfor the next page. Only this mode applies thex-exo-actions,x-exo-msg-types,x-exo-direction,x-exo-msg-idandx-exo-searchfilters. - Otherwise, the JSON list of all log rows in the range.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Tenant domain prefix
Header Parameters
Section titled “Header Parameters”Start of the log range. Defaults to the start of the current UTC day.
End of the log range. Defaults to the end of the current UTC day.
Return a download link instead of the logs. csv stores a CSV file, any other value a JSON file.
Example
csvComma-separated charger identities
Page size; selects the paged list
The nextCursor of the previous page
Comma-separated OCPP actions
Example
BootNotification,HeartbeatComma-separated message types out of CALL, CALLRESULT, CALLERROR
Example
CALL,CALLERRORSender of the message
OCPP message ID
Text to search for in the message
Responses
Section titled “Responses”OCPP logs, a page of them, or the download link
object
object
object
Cursor of the next page; null on the last page
object
Presigned URL of the log file
Validity of the URL in seconds
File size in bytes
Example
{ "expiresIn": 3600}Malformed request
Error response. Some rejections carry only message.
object
Error message
Error code
Failed validations, for requests checked against a schema
object
Path of the invalid field
Example
{ "message": "Bad Request", "errorCode": "ERR_API_BAD_REQUEST"}Missing, invalid or expired credentials
Error response. Some rejections carry only message.
object
Error message
Error code
Failed validations, for requests checked against a schema
object
Path of the invalid field
Example
{ "message": "Not authorized", "errorCode": "ERR_API_NOT_AUTHORIZED"}The caller may not perform this action
Error response. Some rejections carry only message.
object
Error message
Error code
Failed validations, for requests checked against a schema
object
Path of the invalid field
Example
{ "message": "Forbidden", "errorCode": "ERR_API_FORBIDDEN"}Result too large to return
Error response. Some rejections carry only message.
object
Error message
Error code
Failed validations, for requests checked against a schema
object
Path of the invalid field
Example
{ "message": "Content too large", "errorCode": "ERR_API_CONTENT_TOO_LARGE"}