Forward Events

Forward Event Data of Devices

Make sure that event data, which shall be taken into consideration by MOOST Recommender Platform, are forwarded to MOOST via MOOST API.

See Event Types to get an overview which Events should be forwarded for which Devices in which periodicity.

Event Data Structure

Following example depicts an event structure of a energy consumption event.

{
  "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

id

The event ID on MOOST side (is generated when inserting a new event)

customerId

The ID of the customer (cannot be set or change)

customerBuildingId

The building ID on customer side

deviceId

deviceName

The name of the device which is producing this event. Remark: if devices have not an own name, the product name can be used.

source

The device which is related to this event. See Device Types Remark: device type GATEWAY is used, when this is a data point for the whole household / building.

type

The event type of this event. This value also implies the data unit. See Event Types

value

The value of the event datapoint. Remark: must be a number

timestamp

Time of the event (Epoch Time in seconds (UTC))

Add an Event

For sending new Events to the MOOST Recommender Platform the below Endpoint can be used.

Example with CURL

# make sure ACCESS_TOKEN is set and valid (see "Request Access Token")
curl -X POST "https://api.moost.io/events/v1" \
     -H  "Authorization: Bearer $ACCESS_TOKEN" \
     -H  "Content-Type: application/json" \
     -d "{\"timestamp\":1657029000,\"customerId\":\"656730be2bc9719e6e5ed51d\",\"customerBuildingId\":\"999000009C54AAAA\",\"deviceId\":\"17306deb97e0f94609f13e22\",\"deviceName\":\"Device Link Car\",\"value\":99.9,\"type\":\"STATE_OF_CHARGE_RATE\",\"source\":\"CAR\"}"

Last updated

© 2023 MOOST AG