Version 1.0¶
Summary¶
Resource |
Operation |
Description |
---|---|---|
Data |
Download meter data from the platform |
|
Upload meter data to the platform |
||
Public |
List available API versions |
|
Obtain an authentication token |
||
Obtain a service listing for this version |
API Details¶
- GET /api/¶
Public endpoint to list API versions.
- POST /api/requestAuthToken¶
API endpoint to get a fresh authentication access token. Be aware that this fresh token has a limited lifetime (which depends on the current system setting SECURITY_TOKEN_MAX_AGE).
Pass the email parameter to identify the user. Pass the password parameter to authenticate the user (if not already authenticated in current session)
- GET /api/v1/getMeterData¶
API endpoint to get meter data.
Optional fields
“resolution” (see Resolutions)
“horizon” (see Tracking the recording time of beliefs)
“prior” (see Tracking the recording time of beliefs)
“source” (see Sources)
Example request
This “GetMeterDataRequest” message requests measured consumption between 0.00am and 1.30am for charging station 1.
{ "type": "GetMeterDataRequest", "connection": "CS 1", "start": "2015-01-01T00:00:00Z", "duration": "PT1H30M", "unit": "MW" }
Example response
This “GetMeterDataResponse” message indicates that consumption for charging station 1 was measured in 15-minute intervals.
{ "type": "GetMeterDataResponse", "connection": "CS 1", "values": [ 306.66, 306.66, 0, 0, 306.66, 306.66 ], "start": "2015-01-01T00:00:00Z", "duration": "PT1H30M", "unit": "MW" }
- Request Headers
Authorization – The authentication token
Content-Type – application/json
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – PROCESSED
400 Bad Request – INVALID_DOMAIN, INVALID_MESSAGE_TYPE, INVALID_SOURCE, INVALID_TIMEZONE, INVALID_UNIT, UNRECOGNIZED_ASSET, or UNRECOGNIZED_CONNECTION_GROUP
401 Unauthorized – UNAUTHORIZED
403 Forbidden – INVALID_SENDER
405 Method Not Allowed – INVALID_METHOD
- POST /api/v1/getMeterData¶
API endpoint to get meter data.
Optional fields
“resolution” (see Resolutions)
“horizon” (see Tracking the recording time of beliefs)
“prior” (see Tracking the recording time of beliefs)
“source” (see Sources)
Example request
This “GetMeterDataRequest” message requests measured consumption between 0.00am and 1.30am for charging station 1.
{ "type": "GetMeterDataRequest", "connection": "CS 1", "start": "2015-01-01T00:00:00Z", "duration": "PT1H30M", "unit": "MW" }
Example response
This “GetMeterDataResponse” message indicates that consumption for charging station 1 was measured in 15-minute intervals.
{ "type": "GetMeterDataResponse", "connection": "CS 1", "values": [ 306.66, 306.66, 0, 0, 306.66, 306.66 ], "start": "2015-01-01T00:00:00Z", "duration": "PT1H30M", "unit": "MW" }
- Request Headers
Authorization – The authentication token
Content-Type – application/json
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – PROCESSED
400 Bad Request – INVALID_DOMAIN, INVALID_MESSAGE_TYPE, INVALID_SOURCE, INVALID_TIMEZONE, INVALID_UNIT, UNRECOGNIZED_ASSET, or UNRECOGNIZED_CONNECTION_GROUP
401 Unauthorized – UNAUTHORIZED
403 Forbidden – INVALID_SENDER
405 Method Not Allowed – INVALID_METHOD
- GET /api/v1/getService¶
API endpoint to get a service listing for this version.
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – PROCESSED
- POST /api/v1/postMeterData¶
API endpoint to post meter data.
Optional fields
“horizon” (see Setting the recording time)
Example request
This “PostMeterDataRequest” message posts measured consumption for 15-minute intervals between 0.00am and 1.30am for charging stations 1, 2 and 3 (negative values denote production).
{ "type": "PostMeterDataRequest", "groups": [ { "connections": [ "CS 1", "CS 3" ], "values": [ 306.66, 306.66, 0, 0, 306.66, 306.66 ] }, { "connections": [ "CS 2" ], "values": [ 306.66, 0, 0, 0, 306.66, 306.66 ] } ], "start": "2015-01-01T00:00:00Z", "duration": "PT1H30M", "unit": "MW" }
It is allowed to send higher resolutions (in this example for instance, 30 minutes) which will be upsampled.
Example response
This “PostMeterDataResponse” message indicates that the measurement has been processed without any error.
{ "type": "PostMeterDataResponse", "status": "PROCESSED", "message": "Request has been processed." }
- Request Headers
Authorization – The authentication token
Content-Type – application/json
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – PROCESSED
400 Bad Request – INVALID_DOMAIN, INVALID_MESSAGE_TYPE, INVALID_TIMEZONE, INVALID_UNIT, REQUIRED_INFO_MISSING, UNRECOGNIZED_ASSET or UNRECOGNIZED_CONNECTION_GROUP
401 Unauthorized – UNAUTHORIZED
403 Forbidden – INVALID_SENDER
405 Method Not Allowed – INVALID_METHOD