Maintenance windows

A maintenance window defines a period of time where errors send by the station will be ignored in the error reporting and error resolving. This endpoint offers a way to read, create, update and delete those maintenance windows.

Reading

The maintenance windows can be either read in the context of a station /cpoapi/v1/charging_stations/<station_uuid>/maintenance_windows/ or for the complete system /cpoapi/v1/maintenance_windows/.

The list endpoints both offer offset pagination. The maintenance windows can be filtered with filter[startDate] and filter[endDate]. Those values have to be ISO8601 formatted datetime strings.

Creating

The maintenance window can be created via POST requests. A maintenance window will always be attached to a charging station. A maintenance window might also be set specifically for a connector. If a connector is not set the maintenance window will be interpreted for the complete station. A maintenance window cannot be set for the past.

Sample request:

curl --location --request POST 'https://<slug>.beenergised.cloud/api/cpoapi/v1/charging_stations/77f715b0-3476-4bf1-8e9c-e72d3cf9bd23/maintenance_windows/' \
--header 'Authorization: <access_token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "startDate":"2021-04-25T15:46:20.000Z",
    "endDate":"2021-04-25T22:46:20.000Z",
    "comment":"My comment",
    "cpUuid":"77f715b0-3476-4bf1-8e9c-e72d3cf9bd23",
    "connectorUuid":"ce6f9f2e-ca33-4218-a932-d6e34004660a"
}'

Updating

Updates will be done via the PUT requests. A maintenance window which is in the past cannot be updated. The update can be partially. Example: A update request with the only the comment field in it, will keep all other fields like before and only update the given field.

Sample request:

curl --location --request PUT 'https://<slug>.beenergised.cloud/api/cpoapi/v1/charging_stations/77f715b0-3476-4bf1-8e9c-e72d3cf9bd23/maintenance_windows/1' \
--header 'Authorization: <access_token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "startDate":"2021-04-25T15:46:20.000Z",
    "endDate":"2021-04-25T22:46:20.000Z",
    "comment":"My comment",
    "cpUuid":"77f715b0-3476-4bf1-8e9c-e72d3cf9bd23",
    "connectorUuid":"ce6f9f2e-ca33-4218-a932-d6e34004660a"
}'

Deleting

A maintenance window in the future might be deleted. Currently running windows might only be updated but not deleted. A deletion must be send with a DELETE request.