ABC Dust API (3.0.0)

Download OpenAPI specification:

API for the ABC Dust Platform — sensor data ingestion, health checks, and IoT device command control.

Sensor Data API

  • /{clientCode}/sensors (POST): Send sensor data for a specific customer
  • /test-connection (GET): Health check endpoint to verify database connectivity

IoT Device Commands API

  • /devices/{deviceType}/{deviceId}/commands (POST): Send MQTT commands to IoT devices

Authentication

  • Sensor endpoints: Require a valid API token passed as a token query parameter.
  • Command endpoints: Require a valid API key passed as an X-Api-Key header.

Sensors

Operations related to sensor data ingestion.

Use the /{clientCode}/sensors endpoint with your assigned client code. Authentication via token query parameter.

Send sensor data (Multi-tenant)

Accepts sensor data as JSON in the request body and stores it in ABC Dust Platform. The clientCode path parameter identifies the customer tenant.

Available Client Codes:

  • Contact ABC Dust support to obtain your assigned client code

Requires a valid token as a query parameter.

Authorizations:
ApiTokenQueryApiKeyHeader
path Parameters
clientCode
required
string^[A-Z0-9]{6}$
Example: CU01SG

Customer client code (6 alphanumeric characters). This identifies your tenant in the multi-tenant system. Contact ABC Dust support to obtain your assigned code.

query Parameters
token
required
string
Example: token=YOUR_API_TOKEN_HERE

API token for authentication. Obtain from ABC Dust support.

Request Body schema: application/json
required
Array
altitude
required
number <float>

Altitude reading in meters.

acceleration
required
number <float>

Acceleration reading.

required
object

Contains specific device-related sensor values.

gyroscope
required
number <float>

Gyroscope reading.

timestamp
required
integer <int64>

Timestamp of the reading (milliseconds since Unix epoch).

latitude
required
number <double>

Latitude coordinate (WGS84).

longitude
required
number <double>

Longitude coordinate (WGS84).

conf
required
string

Configuration identifier (e.g., device type like "Cloudgate-Mini").

temperature
required
number <float>

Temperature reading in Celsius.

speed
required
number <float>

Speed reading in km/h.

CGSerial
string

Cloudgate device serial number.

flowmeter1
number <float>

Flowmeter channel 1 reading (mA).

flowmeter2
number <float>

Flowmeter channel 2 reading (mA).

flowmeter3
number <float>

Flowmeter channel 3 reading (mA).

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "Data saved to MongoDB and PostgreSQL Lambda triggered",
  • "data": {
    }
}

Commands

Send MQTT commands to IoT devices (RaspberryPi, Cloudgate).

Use the /devices/{deviceType}/{deviceId}/commands endpoint. Authentication via X-Api-Key header.

Supported devices:

  • RaspberryPi — Output control (Fan, Motor, Water cannon, Auxiliary), system commands (reboot, shutdown, status, ping, publish_now, emergency_stop), config updates (publish interval)
  • Cloudgate — GO/STOP commands for dust measurement
  • AirSENCE — Not yet supported

Send command to IoT device

Publishes an MQTT command to a specific IoT device via AWS IoT Core. The device must be online and subscribed to its response topic to receive the command.

Supported device types:

RaspberryPi

Controls Iono Pi Max outputs, system operations, and configuration.

Output commands — Control physical outputs (OC1=Fan, OC2=Motor, OC3=Water cannon, OC4=Auxiliary):

{ "output": "OC1", "state": "on" }
{ "output": "ALL", "state": "off" }

System commands — Device management:

{ "system": "reboot" }
{ "system": "status" }
{ "system": "ping" }
{ "system": "emergency_stop" }

Config commands — Update device settings:

{ "config": "interval", "value": 30 }

Cloudgate

Start/stop dust measurement:

{ "command": "GO" }
{ "command": "STOP" }

AirSENCE

Commands not yet supported. Will return 400.


MQTT Topic: Commands are published to {deviceType}/abcdust-{env}/{deviceId}/response

Authorizations:
ApiKeyHeader
path Parameters
deviceType
required
string
Enum: "raspberrypi" "cloudgate" "airsence"

The device platform type. Determines which command schemas are valid.

deviceId
required
string
Example: RaspberryPi-001

The unique device identifier. Must match the device's MQTT client ID (e.g., RaspberryPi-001, Cloudgate-TX-001).

Request Body schema: application/json
required
One of
output
required
string
Enum: "OC1" "OC2" "OC3" "OC4" "ALL"

The output controller to target.

state
required
string
Enum: "on" "off"

Desired state of the output.

Responses

Request samples

Content type
application/json
Example
{
  • "output": "OC1",
  • "state": "on"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "Command published successfully",
  • "data": {
    }
}

Health

Service health and status endpoints

Test database connection

Returns the status of the database connection for health checks. This endpoint does not require authentication.

Authorizations:
ApiTokenQueryApiKeyHeader

Responses

Request samples

curl "https://api.abcdust.net/prod/test-connection"

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "Successfully connected to database",
  • "timestamp": "2026-01-07T12:00:00.000Z"
}