Knowledge Hub

Factora Academy

Integrations

HTTP and webhooks

Push a reading with the device ingest token. A webhook screen is not in the product yet.

Introduction

Who this is for. An integrator with a meter that can send HTTPS, or that exposes a JSON page Factora can poll.

LoRaWAN is not the only door. A device can POST a number to /api/ingest. Some connectors can poll an HTTP address on a timer. There is no screen named Webhooks.

Architecture

HTTP skips the gateway. The reading still lands in the same device row.

One job for each part
  1. Ingest tokenShown once when you create or rotate a device. Sent as a bearer token.
  2. POST /api/ingestAccepts a small JSON body and stores one reading.
  3. Poll connectorFor other protocol types, Broker / endpoint is an address Factora reads on a timer.

Step 0. Copy the ingest token

  1. Open Device registry as admin and choose Create device, or open an existing device and rotate the token if that control is shown.
  2. Copy the ingest token immediately. It is stored as a hash and is not shown again.
  3. A LoRaWAN sensor does not use this token. Use it for HTTP and for the built-in broker.
Create device shows an ingest token
Device registry. The ingest token appears when a device is created.

Step 1. POST a reading

  1. Send HTTPS POST /api/ingest with header Authorization: Bearer and the token.
  2. The body is JSON, for example a value field, and must be 16 KB or smaller.
  3. The device page states the same door: send readings to /api/ingest over HTTPS with this device's ingest token.
Device provisioning
Device provisioning. The token itself is shown on create, not stored in this guide.

Step 2. Poll an HTTP address

  1. On Industrial connectivity, a connector whose Type is not MQTT uses Broker / endpoint as the address to read.
  2. The placeholder on that field is an https address ending in readings.json.
  3. Choose Save connector. Test connection checks that connector.
Broker or endpoint field
Broker / endpoint is also the poll address when Type is not MQTT.