Skip to main content
Technical Preview

Overview

Datacake is a low-code IoT platform for LoRaWAN, cellular, MQTT and HTTP devices, with dashboards, a rule engine and white-label portals. These connectors connect the Coreflux broker to the Datacake API, so plant logic can read sensor values, push broker data into Datacake devices, change set points and thresholds, and trigger downlinks over MQTT.
  • DatacakeApi (DatacakeRestApi.lot) is a client connector on https://api.datacake.co with 23 events: 21 on the GraphQL API and 2 REST endpoints (record measurements and the product HTTP ingest URL).
  • DatacakeWebhookReceiver (cloud-iot_datacake_webhook.lot, opt-in, server mode) receives Datacake outgoing webhooks and Rule Engine webhook actions, so new measurements, downlinks and alerts reach MQTT without polling.
Datacake publishes no OpenAPI definition. The GraphQL events were checked against the live schema (introspection of https://api.datacake.co/graphql/), and every preset query below was validated by the live API.

Authentication

A personal Datacake token carries every right you have in every workspace you belong to. Prefer an API User token scoped to the workspace and devices this connector needs, keep it in a Hub secret, map it in with GET SECRET, and never publish it on a topic other clients can read.
Every event except IngestProductWebhook takes "api_token" in its MQTT payload and sends Authorization: Token <api_token>. Store the token as the secret DATACAKE_API_TOKEN. An invalid token returns 401 with an empty body. A request without a token is treated as anonymous: reads return empty lists or null, and writes return ok: false. IngestProductWebhook sends no Authorization header. The product key in the URL is the credential, so treat it like a secret.

Payload conventions

  • GraphQL events POST "body" to /graphql/ unchanged. The body is {"query": "...", "variables": {...}}. The named events are topic presets on the same endpoint, so the query you send decides what comes back. Use the preset queries below as a starting point.
  • Validation errors come back as 400 with an errors array. Permission problems and unknown ids come back as 200 with null data or ok: false.
  • RecordMeasurements takes "device_id" (the device UUID shown in the portal URL) and a JSON array body.
  • IngestProductWebhook takes "product_key", "path" ("" or a custom sub-path ending in /, for example "status/") and any JSON body for the product’s payload decoder.

Account and workspaces

GraphqlMutation (cloud-iot/datacake/graphql/mutate)
GetUser (cloud-iot/datacake/user/get)
ListWorkspaces (cloud-iot/datacake/workspace/list)

Devices

ListDevices (cloud-iot/datacake/device/list)
GetDevice (cloud-iot/datacake/device/get)
CreateApiDevices (cloud-iot/datacake/device/create)
UpdateDevice (cloud-iot/datacake/device/update)

Measurements

GetCurrentMeasurements (cloud-iot/datacake/measurement-current/get)
GetDeviceHistory (cloud-iot/datacake/measurement-history/get)

Products

ListProducts (cloud-iot/datacake/product/list)
GetProduct (cloud-iot/datacake/product/get)
SetValue (cloud-iot/datacake/field-value/set)
SetDeviceConfigurationValue (cloud-iot/datacake/config-value/set)
SendDownlink (cloud-iot/datacake/downlink/send)
SendApiDownlink (cloud-iot/datacake/api-downlink/send)
SendMqttDownlink (cloud-iot/datacake/mqtt-downlink/send)

Outgoing webhooks and exports

CreateWebhook (cloud-iot/datacake/webhook/create)
UpdateWebhook (cloud-iot/datacake/webhook/update)
ListWebhookLogs (cloud-iot/datacake/webhook-log/list)
CreateManualExport (cloud-iot/datacake/export/create)

REST events

Datacake rate-limits recorded measurements to 1 write per second per field. Add an optional Unix timestamp to each item to backfill.

Webhook receiver

DatacakeWebhookReceiver listens on port 9005 and publishes each delivery on MQTT unchanged:
  1. In Datacake, open Integrations → Webhooks → Add Webhook (or publish on cloud-iot/datacake/webhook/create), use one webhook per event type, and point it at a public HTTPS URL.
  2. Add a request header with a shared secret, for example Authorization: Bearer <secret>. Datacake recommends this over IP allow lists because its infrastructure scales dynamically.
  3. Put a reverse proxy or tunnel with a public TLS certificate in front of port 9005, have it check the header, and forward to http://<broker>:9005/datacake/webhook/.... The connector itself does not check headers.
Deploying the receiver opens an HTTP port on the broker. Deploy it only where you need push delivery.

Examples

Read the latest values of one device:
Record a plant reading into a Datacake device:
Helper actions (poll a device every minute, forward a plant topic into Datacake, fan webhook events out to plant topics):

Writes

Write events: GraphqlMutation, CreateApiDevices, UpdateDevice, SetValue, SetDeviceConfigurationValue, SendDownlink, SendApiDownlink, SendMqttDownlink, CreateWebhook, UpdateWebhook, CreateManualExport, RecordMeasurements, IngestProductWebhook. GraphqlMutation can run any of the 266 mutations in the schema, including deletes, so restrict who may publish on cloud-iot/datacake/graphql/mutate with a broker rule. CreateApiDevices can add billed devices to the workspace. No preset deletes anything.

Not packaged

Account, billing, white-label, SSO, Node-RED (CakeRed) and organization mutations; product decoder and dashboard editing; LoRaWAN network server and gateway provisioning; rule creation; every delete. They stay reachable through GraphqlMutation if you need them. Datacake’s own MQTT broker (mqtt.datacake.co) is better reached with a Coreflux MQTT bridge connector than over REST.

Status

Technical preview, blocked on the authenticated live test. Every event reaches api.datacake.co, an invalid token returns 401 on every token event, every preset query validates against the live schema, and both REST paths answer as documented for unknown ids. A real token, workspace and test device are still needed for the GET and POST round trip.
Last modified on October 21, 2026