Get analytics
#
DescriptionThis endpoint is used to retrieve some analytics data related to a given chargebox.
#
Request formatMethod: GET
Endpoint: https://api.thor.tools/latest/integration/analytics/{chargebox_id}
#
Response formatThe response is a JSON containing the information related to the requested chargebox with the following fields:
Field name | Type | Description |
---|---|---|
active_since | String | The ISO 8601 formatted date since the chargebox is online. |
charges | Object | |
charges.last_7 | Integer | The number of charges performed by the chargebox in the last 7 days. |
charges.last_30 | Integer | The number of charges performed by the chargebox in the last 30 days. |
charges.last_60 | Integer | The number of charges performed by the chargebox in the last 60 days. |
disconnections | Object | |
disconnections.last_7 | Integer | The number of disconnections the chargebox suffered in the last 7 days. |
disconnections.last_30 | Integer | The number of disconnections the chargebox suffered in the last 30 days. |
disconnections.last_60 | Integer | The number of disconnections the chargebox suffered in the last 60 days. |
energy | Object | |
energy.last_7 | Integer | The total energy (in Wh) delivered by the chargebox in the last 7 days. |
energy.last_30 | Integer | The total energy (in Wh) delivered by the chargebox in the last 30 days. |
energy.last_60 | Integer | The total energy (in Wh) delivered by the chargebox in the last 60 days. |
users | Object | |
users.last_7 | Integer | The number of unique users that charged their vehicles on this chargebox in the last 7 days. |
users.last_30 | Integer | The number of unique users that charged their vehicles on this chargebox in the last 30 days. |
users.last_60 | Integer | The number of unique users that charged their vehicles on this chargebox in the last 60 days. |
A succesful response is returned with an HTTP status code 200 - OK
caution
The energy fields might be equal to 0 if the chargebox does not provide metering data related to the charges.
#
Example response#
Error responseThe following errors are returned if something went wrong while processing the request:
HTTP status code | Message | Description |
---|---|---|
403 | APIKeyNotFound | An invalid API key was given in the header of the request. |
403 | RestAPINotEnabled | REST API integration is set as disabled in the administration dashboard. |
403 | InvalidSourceIPAddr | The request comes from an IP address that is different from the one given in the REST API integration configuration. |
404 | ChargeboxNotFound | No chargebox with the give identifier was found. |
500 | InternalServerError | Something unexpected went wrong while executing the request. |