Skip to content

CoAP API Specification

See examples for how to use this spec in code.

Endpoints

1. Time

  • Endpoint: /time
  • Method: GET
  • Description: Retrieves current server UTC time

2. Device Settings (Desired GET)

  • Endpoint: /device/{device_id}/settings
  • Method: GET
  • Description: Returns the current desired settings for the device.
  • Response:
  • 205 Content: Body is Device Settings
  • 404 Not Found

3. Device Settings (Reported)

  • Endpoint: /device/{device_id}/settings
  • Method: POST (PUT is accepted as an alias)
  • Description: Device reports its current settings.
  • Request body: Device Settings
  • Response:
  • 204 Changed

4. Device Telemetry

  • Endpoint: /device/{device_id}/telemetry
  • Method: POST
  • Description: Device sends telemetry JSON; broker enqueues it for storage.
  • Response:
  • 205 Content: Body contains "Telemetry Received"

5. Device Logs

  • Endpoint: /device/{device_id}/logs
  • Method: POST
  • Description: Free-form JSON logs for dev use.
  • Response:
  • 204 Changed

6. Device Status

  • Endpoint: /device/{device_id}/status
  • Method: POST
  • Description: Connectivity/health/status payload.
  • Response:
  • 204 Changed

Legacy Telemetry

  • Endpoint: /telemetry
  • Method: POST
  • Description: Legacy endpoint. Device identity is derived from DTLS certificate fingerprint.

Security

  • DTLS is required for all endpoints unless NO_DTLS_OK=1 is set (dev).