History

The ABS keeps an log of all actions. The History API can be used to query this log.

History objects

History objects consist of the following properties:

id
The unique identifier of this event.
personId
The user that originated the event.
chargingStationId
The charging station that originated the event.
rfidID
The token that originated the event.
operation
The operation performed
resultCode
The result code of the operation
timeRaised
The timestamp of the operation
resourceString, resourceId
The resource affected by the operation.

Also for convenience the following data is included as well:

username
The username of the user.
chargingStationName
The name of the charging station.
rfidString
The tokenString of the token.
resourceString
A human-readable description of the resource.

Example object

In this example, somebody starts a charging session at station 10000 using token 10004. As a result a new chargingSession resource is created.

{
    "id": 19123,

    "chargingStationId": 10000,
    "chargingStationName": "Greenbridge Oostende",

    "rfidId": 10004,
    "rfidString": "57C392DD",

    "operation": "CreateSession",
    "timeRaised": 1355914031,
    "resultCode": 100,

    "resourceId": 10005,
    "resourceType": "CHARGING_SESSION",
    "resourceString": "Charging session 10005",
}

This example shows changing a charging station’s properties. chargingStationId is null here as the operation didn’t originate from the charging station.

{
    "id": 19134,

    "personId": 1,
    "username": "admin"

    "chargingStationId": null,
    "chargingStationName": null,

    "rfidId": null,
    "rfidString": null,

    "operation": "UpdateChargingStation",
    "resultCode": 100,
    "timeRaised": 1355917735,

    "resourceId": 10000,
    "resourceType": "CHARGING_STATION",
    "resourceString": "Greenbridge Oostende",
}

History services

GET /abs/frontend/history

Retrieve a list of charging station alerts. The returned list is ordered by timeRaised descending.

Role:

admin

Query Parameters:
 
  • limit? – The amount of history items to return (default=100).
  • username? – Limit the list to history relating to the provided username.
  • chargingStationId? – Limit the list to history relating to the provided charging station.
  • rfid? – Limit the list to history relating to the provided token string.
  • timeFrom? – Don’t return items before this timestamp.
  • timeTo? – Don’t return items after this timestamp.
Status Codes:
  • 204 – Unknown charging station.

Example response

{ "statusCode": "100", "history": [ ...list of history objects... ] }