Device - POST Add Device (LoRaWAN)
Adds a new LoRaWAN device using specific fields like DevEUI, AppKey, etc.
https://api.iotstadium.com/ext/devices
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{token}}"
}
Parameter
Field | Type | Description |
---|---|---|
name | Text |
Name of the devices (required) |
label | String |
The label ID for your new device |
type | String |
Set the type for your device |
device_type_id | Integer |
The ID of your device type (Must be an integer) |
group_device | String |
The group ID of your device |
description | Text |
The description of your device |
device_type_predefined | Integer |
The code for your device type |
device_image_default | Array |
The code for your device image |
device_connectivity_type | Integer |
The code for your device connectivity type (required) |
device_network | Integer |
The code for your device network |
deveui | String |
The DevEUI of your device |
frequency_plan_id | Integer |
The ID of the frequency plan of your device |
lorawan_phy_version | String |
The ID of the LoRaWAN phy version of your device |
lorawan_version_mac | String |
The MAC version of your device |
downlink_encoder | String |
The downlink encoder of your device |
uplink_decoder | String |
The uplink decoder of your device |
location_id | Integer |
The ID for your the assigned location for your device |
location_custom_field | Array |
The additional detail of your location |
device_connectivity_type_id | Integer |
The ID of the connectivity type of your device |
device_network_id | Integer |
The ID for your device network |
{
"name": XL260 Room 1",
"label": null,
"type": null,
"device_type_id" : "327",
"group_device": null,
"description": null,
"device_type_predefined" : 1,
"device_image_default": null,
"device_connectivity_type": 4,
"device_network": 1,
"deveui": "3231124aaa3dbc62", // must have 16 char
"frequency_plan_id": "AS_923_2",
"lorawan_phy_version": "RP002_V1_0_2",
"lorawan_version_mac": "MAC_V1_0_4",
"downlink_encoder": "",
"uplink_decoder": "",
"is_public": 2,
"location_id": null,
"location_custom_field": [],
"device_connectivity_type_id": 3,
"device_network_id": 1
}
{
"message": "device created",
"data": {
"id": 585
},
"code": 200
}
{
"message": "Invalid Message",
"code": 400,
"errors": [
{
"field": "name",
"message": "The name field is required.."
},
{
"field": "is_public",
"message": "The is public field is required.."
}
]
}
{
"message": "Invalid Message",
"code": 400,
"errors": [
{
"field": "name",
"message": "The name field is required.."
},
{
"field": "is_public",
"message": "The is public field is required.."
},
{
"field": "deveui",
"message": "The deveui must be at least 16 characters."
}
]
}
{
"message": "Invalid Message",
"code": 400,
"errors": [
{
"field": "device_type_id",
"message": "The selected device type id is invalid."
},
{
"field": "is_public",
"message": "The is public field is required.."
},
{
"field": "deveui",
"message": "DEVEUI already registered on device [alwi] test submit JS 7"
}
]
}