Telemetry - Add Device (MQTT/BLE/HTTP/LoRa)
Adding a device that uses MQTT, BLE, HTTP, or LoRa protocol
Posthttps://api.iotstadium.com/ext/devices
Parameter
Field | Type | Description |
---|---|---|
name | Text |
Name of the devices (required) |
label | Text |
Label for your new device |
type | Text |
Set the type for your device |
device_type_id | Text |
The ID for your device type (Must be an integer) |
group_device | Number |
Set the group for your device |
description | Text |
Set the description for your device |
device_type_predefined | Number |
The code for your device type |
device_image_default | Text |
The code for your device image |
device_connectivity_type | Number |
The code for your device connectivity type (required) |
device_network | Number |
The code for your device network |
location_id | Text |
The ID for your the assigned location for your device |
location_custom_field | Text |
The additional field for your location |
hardware_id | Number |
ID for your hardware (Required if the connectivity type is BLE) |
device_network_id | Number |
The ID for your device network |
{
"message": "device created",
"data": {
"id": 584
},
"code": 200
}
{
"message": "Invalid Message",
"code": 400,
"errors": [
{
"field": "name",
"message": "The name field is required.."
},
{
"field": "hardware_id",
"message": "The hardware id must be at least 3 characters."
}
]
}
{
"message": "Invalid Message",
"code": 400,
"errors": [
{
"field": "device_type_id",
"message": "The selected device type id is invalid."
},
{
"field": "hardware_id",
"message": "hardware_id already registered on device id 584"
}
]
}