IoT Integrator

Create Action Requests for CoAP Devices.

Initiate CoAP action on the devices.

post/v1/integrate/devices/actions/COAP

Request

  • Base URL
    https://api.1nce.com/management-api
  • Auth
    HTTP bearer

Request body

deviceIdsstring[] required

Devices that should receive the data

payloadstring

Data that should be sent to the devices

payloadType'STRING' | 'BASE64'

Type of the payload

portinteger required

Communication port number of the devices

pathstring required

Absolute path to the resource

requestType'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' required

CoAP request type that should be sent

requestMode'SEND_NOW' | 'SEND_WHEN_ACTIVE'

Action request execution mode

sendAttemptsnumber

The maximum number of attempts to send data to the devices

Example request

{
  "deviceIds": [
    "<device_id>"
  ],
  "payload": "enable_sensor",
  "port": 3000,
  "path": "example?param1=query_param_example"
}

Response

Message describing the result of operation

rejectedDevicesstring[] required

A list of devices for which it was not possible to send data.

messagestring required

Message describing the result of operation.

Example response

{
  "acceptedRequests": [
    {
      "deviceId": "<device_id>",
      "requestId": "<request_id>"
    }
  ],
  "rejectedDevices": [
    "<device_id>"
  ],
  "message": "Action write for resource /3/45/22 successfuly scheduled for device _vGxHeBL0dE9LG9EB2GHj."
}

Changes

No recorded changes to this operation across all 1 revision of this API.