IoT Stadium

API Documentation

Device

Device - POST Add Device (LoRaWAN)

Adding a device that uses LoRaWAN protocol

Post
https://api.iotstadium.com/ext/devices

Parameter

Field Type Description
name Text

Name of the devices (required)

label Text

The label ID for your new device

type Text

Set the type for your device

device_type_id Text

The ID of your device type (Must be an integer)

group_device Text

The group ID of your device

description Text

The description of 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

deveui Text

The DevEUI of your device

frequency_plan_id Text

The ID of the frequency plan of your device

lorawan_phy_version Text

The ID of the LoRaWAN phy version of your device

lorawan_version_mac Text

The MAC version of your device

downlink_encoder Text

The downlink encoder of your device

uplink_decoder Text

The uplink decoder of your device

location_id Text

The ID for your the assigned location for your device

location_custom_field Text

The additional detail of your location

device_connectivity_type_id Number

The ID of the connectivity type of your device

device_network_id Number

The ID for your device network

{
    "name": "[alwi] test submit JS 7",
    "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": "",
     "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"
        }
    ]
}