# Gateways
Manage gateways in your account using these endpoints.
# List gateways
List all gateways registered on the logged user account.
GET /gateways?version=lite&page={page}
Example request
$ curl --request GET 'https://console.radiobridge.com/api/visualization/v1/gateways?version=lite&page=1' \
--header 'organization: <organization id>' \
--header 'Authorization: Bearer <token>'
Example response
{
"data": [
{
"id": 5,
"name": "multitech",
"gateway_bridge": "multitech",
"gateway_ip": null,
"gateway_eui": null,
"region": null,
"bridge": "Multitech (For lora devices)",
"first_seen": null,
"last_seen": null,
"uplinks": null,
"downlinks": null,
"created_at": "Oct 28, 2022 03:20 PM"
}
],
"more": false
}
Parameter | Type | Description |
---|---|---|
id | integer | Unique ID assigned to the gateway |
name | string | Name of the Gateway |
gateway_bridge | integer | Network key used to register the gateway, e.g. multitech, senet, aws_iot_core etc |
gateway_ip | string | Gateway IP to access the Gateway console admin |
gateway_eui | string | 8 Bit Hexadecimal Gateway ID/EUI |
region | string | Gateway region. Options: US915, EU868, AU915, AS923, CN470, EU433, KR920, RU864, CN779, IN865 |
bridge | string | Indicates the network name Gateway is registered to |
first_seen | timestamp | When empty returns '--' else returns timestamp |
last_seen | timestamp | When empty returns '--' else returns timestamp |
uplinks | integer | Total uplinks count reported by network |
downlinks | integer | Total downlinks count reported by network |
created_at | string | Gateway registration date and time |
more | boolean | Works as pagination, if true then that means there are more records to retrieve |
# Gateway Configurations
returns configuration of gateway form of different network in json format
GET /configurations?network={network}&type=gateway
Property | Description |
---|---|
network | (Required) Allowed options: machineq, senet, thethingsnetwork, loriot, multitech, chirpstack, kerlink, helium, aws_iot_core |
Example Request
curl --request GET 'https://console.radiobridge.com/api/visualization/v1/configurations?network=kerlink&type=gateway' \
--header 'Organization: <organization id>' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>'
Example Response
{
"form": {
"fields": {
"gatewayName": {
"validation": "required",
"type": "text"
},
"gatewayIp": {
"validation": "optional",
"type": "text"
},
"description": "na",
"gatewayEui": {
"validation": "required",
"type": "text"
},
"loriotGateway": "na",
"concentrator": "na",
"bus": "na",
"card": "na",
"brand": "na",
"region": {
"validation": "required",
"type": "select",
"values": {
"EU868": "EU868",
"US915": "US915"
}
},
"fleet": "na",
"visibility": "na",
"frequencyPlans": "na",
"zoneId": "na",
"model": "na",
"ismBand": "na",
"serialNumber": "na"
},
"data": {
"description": "",
"models": []
}
}
}
Parameter | Type | Description |
---|---|---|
form | object | This object holds all the fields with their details. see more |
data | object | list of data that is required in some fields see more |
Form Fields Object
All the fields having "na" indicates that the field is not available for the selected gateway. While the field key indicates the field name to be used to pass the values for various fields to the API payload.
Parameter | Description |
---|---|
validation | This indicates if the field "required" or "optional" |
type | Indicates the field type |
values | Holds an array of values for the Select fields |
Data Object
Parameter | Type | Description |
---|---|---|
description | string | Description of the Gateway |
models | array | Models array list |
# Batch Gateway Request
Create, update and delete gateways in bulk
GET /batch-gateway-requests
Property | Required | Description |
---|---|---|
Create | ||
gatewayName | Yes | Name of your gateway |
gatewayIp | Yes | Local IP address of the gateway |
gatewayBridge | Yes | Name of bridge gateway |
description | No | Description for gateway |
gatewayEui | Yes | 16 digit hexadecimal value |
loriotGateway | No | Id of your gateway |
appRegion | Yes | Allowed options: US915,EU868,AU915,AS923,CN470,EU433,KR920,RU864,CN779,IN865 |
action | Yes | Create - create the gateway |
Update | ||
gatewayId | Yes | Id of gateway that is to be updated |
action | Yes | Update - update the device |
Delete | ||
gatewayId | Yes | Id of gateway that is to be updated |
action | Yes | Delete - delete the device |
Example Request
curl --request POST 'https://console.radiobridge.com/api/visualization/v1/batch-gateway-requests' \
--header 'Accept: application/json' \
--header 'Organization: <organization id>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"gateways": [
{
"gatewayName": "test gateway",
"gatewayIp": "192.56.89.34",
"gatewayBridge": "multitech",
"description": "<description>",
"gatewayEui": "1234567890ABC567",
"loriotGateway": "1",
"appRegion": "EU868",
"action": "create"
},
{
"gatewayId": 9,
"gatewayName": "Updated Gateway",
"action": "update"
},
{
"gatewayId": 9,
"action": "delete"
}
]
}'
Example Response
{
"data": [
{
"status": true,
"message": "Gateway has been created successfully.",
"gatewayEui": "1234567890ABC567",
"gatewayId": 6,
"action": "create"
},
{
"status": true,
"message": "Gateway updated successfully.",
"gatewayId": 5,
"action": "update"
},
{
"status": true,
"message": "Gateway has been deleted.",
"gatewayId": 5,
"action": "delete"
}
]
}
Parameter | Type | Description |
---|---|---|
status | boolean | "true" to indicate success and "false" to indicate failure |
message | string | Human readable message for the last action |
gatewayId | integer | Holds the Integer Gateway ID of the Gateway the action was performed on |
action | boolean | Action performed on the Gateway |
Example Error
{
"data": [
{
"status": false,
"message": "Gateway registration failed due to the validation errors.",
"errors": [
"The gateway name field is required.",
"The mac address field is required.",
"The app region field is required."
],
"gatewayEui": null,
"gatewayId": null,
"action": "create"
},
{
"status": false,
"message": "Gateway not found!",
"gatewayId": 9,
"action": "update"
},
{
"status": false,
"message": "Gateway not found!",
"gatewayId": 9,
"action": "delete"
}
]
}
Parameter | Type | Description |
---|---|---|
status | boolean | "true" to indicate success and "false" to indicate failure |
message | string | Human readable message for the last action |