Creating a Device using an IoT application

Note: This end point pre-provisioning step is optional. If performed, the Device will be created under the Tenant referenced by IMPACT IoT group ID linked to the Tenant. Along with the standard parameters, it is also possible to insert additional properties that can be used with Device parameters, such as security and additional identification

Following table describes the API structure for adding an endpoint for a HTTP Device.

Table 1. Add endpoint for HTTP Device
Parameters Description
URL http://<impact_hostname>:<port>/m2m/endpoints
Method POST
Content-Type application/json
Parameters

The parameters are:

  • IMSI: Specifies the IMSI of the Device.

  • address: Specifies the MSISDN of the Device.

  • groupName: Specifies the name of the group in IMPACT IoT to which the Device registers.

  • Identifier:[string]: Specifies the name which uniquely identifies the Device.

  • Protocol:[string]: Specifies the communication protocol of the Device. For HTTP Device, use HTTP.

  • serialNumber:[string]: Specifies the serial number of the Device.

  • AdaptationLayerName:[string]: Specifies the name of Adaptation Layer on which Device onboards. It is a mandatory parameter.

Data Params

msg:[string] : info/warning/error message

Sample Call Curl:
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json'  --header 'Authorization: Basic U3VtYTEyMzpTdW1hQDkzODE=' -d '{
  "additionalParams": {adaptationLayerName:bostoncamera},
  "address": "",
  "groupName": "DM.MFORM.MQTT",
  "identifier": "",
  "protocol": "HTTP",
  "serialNumber": "238965456"
}' 'http://mfussip02.mformation.com:9090/impact/m2m/endpoints'
Response Body:
{
"msg": "Device Added Successfully", "Code": 3000
}
Success Code
Response Code: 200
Error Code
400 : Bad Request 
401 : Unauthorized 
404 : Not Found

For the Application to populate the payload, use the additionalParams parameter in the Add Endpoint API. These parameters, both names and values will be sent to the Adapter.

When this API is invoked, the Device is added to IMPACT IoT in the Tenant as defined in the group ID, this an internal reference and may not be the Tenant that the Adapter is on-boarded to.