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.
- 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.
| 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:
|
| 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} |