Add endpoint for MQTT-SN device

This request allows the client application to create an MQTT-SN endpoint in IMPACT IoT.

For this API to work, the selected role must have device.read and device.manage ACLs assigned to it.

The operations that can be performed with device.read and device.manage ACLs are:
  • device.read: For read resource operation.
  • device.manage: For write/execute/delete resource operation and add/delete device operation.

The following table describes the API structure for adding MQTT-SN device to IMPACT IoT.

Table 1. Add MQTT-SN endpoint using API
Tile Add endpoint for MQTT-SN device
URL http://<Impact_URL>/m2m/endpoints
Method POST
Content-Type application/json
URL Params

The URL parameters are:

  • serialNumber:[string]: Specifies the serial number of MQTT-SN device. This parameter is mandatory.

  • protocol:[string]: Specifies the communication protocol of the device. For MQTT-SN device, use MQTT-SN. This parameter is mandatory.

  • groupName:[string]: Specifies the name of the IMPACT IoT group to which the device registers. This parameter is mandatory.

  • additionalParams:[composite]: Specifies the additional parameters for MQTT-SN Payload. Additional parameter can be either a valid externalId or scefmsisdn or imsi.

    • Payload for adding device over SCEF using External Id
      
      {
      "serialNumber":"urn:nai:20100775092020",
      "protocol":"MQTT-SN",
      "groupName":"sep.sepp",
      "additionalParams":{
      "externalId": "ext-3055500000091"
      }
      }

      Payload for adding device over SCEF using MSISDN

      {
      "serialNumber":"ntc-kjio",
      "protocol":"MQTT-SN",
      "groupName":"sep.sepp",
      "additionalParams":{
      "msisdn": "4044500000008"
      }
      }
      Payload for adding device over SGi using IMSI
      {
      "additionalParams":{},
      "groupName": "IMPACT",
      "protocol": "MQTT-SN",
      "serialNumber": "dht114044500000011",
      "imsi": "4044500000011"
      }
      Payload for adding device over SGi using External Id
      {
      "additionalParams":{},
      "groupName": "IMPACT",
      "protocol": "MQTT-SN",
      "serialNumber": "dht114044500000011",
      "externalId": "4044500000011"
      }
      Payload for adding device over SGi using MSISDN
      {
      "additionalParams":{},
      "groupName": "IMPACT",
      "protocol": "MQTT-SN",
      "serialNumber": "dht114044500000011",
      "msisdn": "4044500000011"
      }
Data Params msg:[string] - info/warning/error message
Success Code
Response Code: 200
Error Code
403  Forbidden 
401  Unauthorized 
404  Not Found 
Sample Call Curl:
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: Basic ZG9jdXNlcjpBc2RmMSM='
-d 
{
     "serialNumber": "urn:nai:20100775092020",
     "protocol": "MQTT-SN",
     "groupName": "Nokia",
     "additionalParams": 
     { "externalId": "ext-3055500000091" }
}
{"msg":"Device added successfully","code":3000}