IoT Stadium

API Documentation

LoRaWAN Gateway

LoRaWAN Gateway - POST Add LoRaWAN Gateway

Post

{{url_iot_backend}}/ext/ttn-gateway
{
	"key": "Content-Type",
	"value": "application/json"
},
{
	"key": "Authorization",
	"value": "Bearer {{token}}"
},

Parameter

Field Type Description
gateway_name String

Name of the LoRaWAN Gateway (required)

ttn_gateway_type_id Integer

The gateway type identifier (required)

gateway_eui String

The unique identifier for the LoRaWAN gateway

frequency_plan String

Your selected frequency plan

is_required_authenticated_connection String

Yes (1) or no (0)

status_public Boolean

location_public Boolean

{
    "message": "ttn_gateway created",
    "data": {
        "id": 101,
        "api_key_cups": "",
        "api_key_lns": ""
    },
    "code": 200
}
{
    "message": "ttn_gateway created",
    "data": {
        "id": 100,
        "api_key_cups": "Authorization: Bearer NNSXS.NAQQNYDR7UZXFAHQXGNOXX3HNOWJW6QOX4DNE3Q.ZK7HVHOJKFDKSPYX6CWEDWB6LVIR4HO3YCSXVCXVIAVUCE3XYYDQ",
        "api_key_lns": "Authorization: Bearer NNSXS.65WUSG3MZEAZVE7JZE7BVUPIXWMK4YJDTNQGCVA.B52I5L6BRL5GP3WTCHSJFXZGBNVBTSRD7I77CEXZNXMSNUPFJBLQ"
    },
    "code": 200
}
{
    "message": "Invalid Message",
    "code": 400,
    "errors": [
        {
            "field": "gateway_eui",
            "message": "The gateway eui has already been taken."
        }
    ]
}                                                
{
    "message": "Invalid Message",
    "code": 400,
    "errors": [
        {
            "field": "gateway_name",
            "message": "The gateway name field is required.."
        },
        {
            "field": "gateway_eui",
            "message": "The gateway eui has already been taken."
        }
    ]
}                                                
{
    "message": "TTN Profile not configured yet",
    "code": "400",
    "errors": [
        {
            "message": "TTN Profile not configured yet",
            "field": "ttn_gateway"
        }
    ]
}