CoAP
This page describes the CoAP connectivity in more detail
If a device communicates over CoAP with akenza, a CoAP device connector has to be set up and assigned to a Data Flow.
After creation, a secret is generated which has to be provided in the request. Both the secret and the device ID are set as query params in the CoAP request.
NOTE: The akenza CoAP connector currently only supports JSON content format. Make sure to provide the appropriate header for it.
Send a CoAP Uplink
POST
coap://coap.akenza.io/v3/capture?secret={uplinkSecret}&deviceId={deviceId}
The body can be any JSON object.
Query Parameters
Name | Type | Description |
---|---|---|
timestamp | string | The timestamp of the event (ISO-8601 formatted - the current time will be used if not provided) |
topic | string | The data topic ("default" will be used if not provided) |
uplinkSecret | string | The uplink secret used to authenticate the request |
deviceId | string | The device ID |
Headers
Name | Type | Description |
---|---|---|
content_format | number | application/json |
Sample nodeJS Script
The below sample nodeJS script allows sending a CoAP uplink. It requires the node module coap to be installed.
Last updated