Add Events
Add Event Data of Devices
Event Data Structure
{
"id": "6703cfa2fa7bfc35eb1f74d0",
"customerId": "656730be2bc9719e6e5ed51d",
"customerBuildingId": "99900000C048ADA6",
"deviceId": "c8f09e83046c",
"deviceName": "Sinemaa main meter",
"source": "GATEWAY",
"type": "ENERGY_CONSUMPTION",
"value": 858.71,
"timestamp": 1727992800000
}Data Structure Attributes
Attribute Name
Description
Add an Event
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
timestampinteger · int64Optional
customerIdstringRequiredPattern:
^[a-zA-Z0-9]{24}$customerBuildingIdstringRequiredPattern:
^[a-zA-Z0-9:._-]{1,100}$deviceIdstringRequiredPattern:
^[a-zA-Z0-9:._-]{3,64}$deviceNamestringRequiredPattern:
^.{1,100}$valuenumber · floatRequired
typestring · enumRequiredPossible values:
sourcestring · enumOptionalPossible values:
forecastTimestampinteger · int64Optional
ingestionTimestampinteger · int64Optional
Responses
201
Success. Event accepted.
400
Invalid event data, e.g. because specified customerBuildingId is unknown.
post
/events/v1No content
Example with CURL
Add a batch of historical events
Inserts historical events to the database. I.e. these events are not processed by the rule engine when receiving these events.Event customerId has to be in-line with customerId of the JWT).
post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Bodyobject[]
timestampinteger · int64Optional
customerIdstringRequiredPattern:
^[a-zA-Z0-9]{24}$customerBuildingIdstringRequiredPattern:
^[a-zA-Z0-9:._-]{1,100}$deviceIdstringRequiredPattern:
^[a-zA-Z0-9:._-]{3,64}$deviceNamestringRequiredPattern:
^.{1,100}$valuenumber · floatRequired
typestring · enumRequiredPossible values:
sourcestring · enumOptionalPossible values:
forecastTimestampinteger · int64Optional
ingestionTimestampinteger · int64Optional
Responses
200
Success. All events have been inserted.
No content
400
Invalid event data.
*/*
500
Internal error. None or only part of the data could be written.
post
/events/historical/v1No content
Last updated

