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 onhttps://api.datacake.cowith 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.
https://api.datacake.co/graphql/), and every preset query below was validated by the live API.
Authentication
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
400with anerrorsarray. Permission problems and unknown ids come back as200withnulldata orok: false. RecordMeasurementstakes"device_id"(the device UUID shown in the portal URL) and a JSON array body.IngestProductWebhooktakes"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)
cloud-iot/datacake/user/get)
cloud-iot/datacake/workspace/list)
Devices
ListDevices (
cloud-iot/datacake/device/list)
cloud-iot/datacake/device/get)
cloud-iot/datacake/device/create)
cloud-iot/datacake/device/update)
Measurements
GetCurrentMeasurements (
cloud-iot/datacake/measurement-current/get)
cloud-iot/datacake/measurement-history/get)
Products
ListProducts (
cloud-iot/datacake/product/list)
cloud-iot/datacake/product/get)
Values, configuration and downlinks
SetValue (
cloud-iot/datacake/field-value/set)
cloud-iot/datacake/config-value/set)
cloud-iot/datacake/downlink/send)
cloud-iot/datacake/api-downlink/send)
cloud-iot/datacake/mqtt-downlink/send)
Outgoing webhooks and exports
CreateWebhook (
cloud-iot/datacake/webhook/create)
cloud-iot/datacake/webhook/update)
cloud-iot/datacake/webhook-log/list)
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:
- 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. - 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. - Put a reverse proxy or tunnel with a public TLS certificate in front of port
9005, have it check the header, and forward tohttp://<broker>:9005/datacake/webhook/.... The connector itself does not check headers.
Examples
Read the latest values of one device: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 throughGraphqlMutation 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 reachesapi.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.
