RUCKUS IoT 2.0.1.0 (MR) Controller REST API Guide

General notes

API documentation is a technical content deliverable, containing instructions about how to effectively use and integrate with an API. It’s a concise reference manual containing all the information required to work with the API, with details about the functions, classes, return types, arguments. This document provides interface to create, update, operate and manage Ruckus IoT Controller, Ruckus IoT Access Points and IoT Devices/Sensors. API communicates on secured mode (HTTPS/SSL) and needs valid credentials to authenticate to the system. APIs upon successful authentication, uses ACCESS and REFRESH token to communicate with the system.

Overview

The API follows the ReST API format and follows the protocol with respect to the API methods and the status codes returned after invoking the APIs.

API detail

Account Auth

Authenticate User

This endpoint is a basic-auth protected endpoint.

This endpoint authenticates the user. The user credentials needs to be provided as basic-auth in the http auth header.

The response on a successful request will be the details of the user.

Response Key Explanation

Key Explanation
company Name of the company of the user
email E-mail address of the user
send_notification User preference to receive notifications
is_enabled User is enabled
first_name Firstname of the User
password Encrypted password of the user
username Username of the user
last_name Lastname of the user

Expected status codes

Status Code Explanation
200 Request is processed successfully
401 Invalid user credentials
500 Critical Server Error
curl -X GET -H "Authorization: Basic YWRtaW46YWRtaW4=" "{{auth_host}}/v1/oauth/authenticate"
GET %7B%7Bauth_host%7D%7D/v1/oauth/authenticate HTTP/1.1
Host: 
Authorization: Basic YWRtaW46YWRtaW4=
Status401 Unauthorized
allowGET, HEAD, OPTIONS
connectionclose
content-length39
content-typeapplication/json
dateMon, 04 Sep 2017 05:39:26 GMT
servergunicorn/19.6.0
varyAccept
www-authenticateBasic realm="api"
x-frame-optionsSAMEORIGIN
{
    "detail": "Invalid username/password."
}
Status200 OK
allowGET, HEAD, OPTIONS
connectionclose
content-length296
content-typeapplication/json
dateMon, 04 Sep 2017 05:39:00 GMT
servergunicorn/19.6.0
varyAccept
x-frame-optionsSAMEORIGIN
{
    "is_enabled": true,
    "send_notification": false,
    "first_name": "Ed",
    "company": "Ruckus",
    "username": "admin",
    "last_name": "Sy",
    "_id": {
        "$oid": "59a798b040a1286ca3e46524"
    },
    "password": "$pbkdf2-sha256$29000$0bq3tjaGUOpdi5HSWosR4g$1EmpXGaCewvT7q47bF/RzZA5y6WLNGQpmxbbnHFCgAE",
    "email": "[email protected]"
}

Get Token

This endpoint is a basic-auth protected endpoint.

The response on a successful request will be the details of tokens. These tokens will be used to regenerate tokens and access the APIs.

Response Key Explanation

Key Explanation
access_token Token for accessing endpoints protected by token authentication
refresh_token Token to refresh the access token once it is expired

The validity of access_token is 1 Week. The refresh_token should be saved once the tokens are generated. The refresh_token should be used to generate the new access_token after their expiry.

Expected status codes

Status Code Explanation
200 Request is processed successfully
401 Invalid user credentials
500 Critical Server Error
curl -X GET -H "Authorization: Basic YWRtaW46YWRtaW4=" "{{auth_host}}/v1/oauth/login"
GET %7B%7Bauth_host%7D%7D/v1/oauth/login HTTP/1.1
Host: 
Authorization: Basic YWRtaW46YWRtaW4=
Status200 OK
allowGET, HEAD, OPTIONS
content-length115
content-typeapplication/json
dateMon, 04 Sep 2017 10:07:35 GMT
serverWSGIServer/0.2 CPython/3.5.2
varyAccept
x-frame-optionsSAMEORIGIN
{
    "refresh_token": "ba881b2d9e3c4906b4323d74b5993796",
    "access_token": "956a6e403f5c4e6fb8f6c7fe478a6b68"
}
Status401 Unauthorized
allowGET, HEAD, OPTIONS
content-length39
content-typeapplication/json
dateMon, 04 Sep 2017 10:12:11 GMT
serverWSGIServer/0.2 CPython/3.5.2
varyAccept
www-authenticateBasic realm="api"
x-frame-optionsSAMEORIGIN
{
    "detail": "Invalid username/password."
}

Refresh Token

This endpoint is a token-auth protected endpoint.

This endpoint is used to generate a refresh token. The validity of the refresh_token is 60 days. The refresh token retrieved during the Get Token should be passed in the header as token-auth. On successful refresh of the token a new refresh token will be provided.

Response Key Explanation

Key Explanation
refresh_token Token for accessing endpoints protected by token authentication

The new refresh_token should be saved and replaced with the previous refresh_token.

Expected status codes

Status Code Explanation
200 Request is processed successfully
401 Invalid token
500 Critical Server Error
curl -X GET -H "Authorization: Token 36ee6c711164485b9b2494c2e3b0efde" "{{auth_host}}/v1/oauth/refresh"
GET %7B%7Bauth_host%7D%7D/v1/oauth/refresh HTTP/1.1
Host: 
Authorization: Token 36ee6c711164485b9b2494c2e3b0efde
Status200 OK
allowGET, HEAD, OPTIONS
content-length58
content-typeapplication/json
dateMon, 04 Sep 2017 10:23:49 GMT
serverWSGIServer/0.2 CPython/3.5.2
varyAccept
x-frame-optionsSAMEORIGIN
{
    "access_token": "aa4c7236f4384aba832096538b127a9b"
}
Status401 Unauthorized
allowGET, HEAD, OPTIONS
content-length27
content-typeapplication/json
dateMon, 04 Sep 2017 10:25:42 GMT
serverWSGIServer/0.2 CPython/3.5.2
varyAccept
www-authenticatetoken
x-frame-optionsSAMEORIGIN
{
    "detail": "Invalid Token."
}

Accounts CRUD

These are the set of APIs to create the account with RIoT controller. Currently these API are in the basic state which will evolve over time.

Status: Experimental

All Accounts

This endpoint is used to retrieve all the accounts which are added in the controller.

curl -X GET -H "Authorization: Basic YWRtaW46YWRtaW4=" "{{auth_host}}/v1/account/ars"
GET %7B%7Bauth_host%7D%7D/v1/account/ars HTTP/1.1
Host: 
Authorization: Basic YWRtaW46YWRtaW4=
Status200 OK
AllowGET, POST, HEAD, OPTIONS
Connectionkeep-alive
Content-Length197
Content-Typeapplication/json
DateWed, 21 Nov 2018 10:36:38 GMT
Servernginx
Strict-Transport-Securitymax-age=63072000
VaryAccept
X-Frame-OptionsSAMEORIGIN
X-Frame-OptionsSAMEORIGIN
[
    {
        "last_name": "Sy",
        "first_name": "Ed",
        "email": "[email protected]",
        "_id": {
            "$oid": "5be95439a856d004ec65e09b"
        },
        "is_enabled": true,
        "username": "admin",
        "company": "Ruckus",
        "send_notification": false
    }
]

Single Account

This endpoint is used to retrieve the details of a specific username which are added in the controller.

curl -X GET -H "Authorization: Basic YWRtaW46YWRtaW4=" "{{auth_host}}/v1/account/username"
GET %7B%7Bauth_host%7D%7D/v1/account/username HTTP/1.1
Host: 
Authorization: Basic YWRtaW46YWRtaW4=
Status200 OK
AllowGET, PATCH, DELETE, HEAD, OPTIONS
Connectionkeep-alive
Content-Length195
Content-Typeapplication/json
DateWed, 21 Nov 2018 10:37:37 GMT
Servernginx
Strict-Transport-Securitymax-age=63072000
VaryAccept
X-Frame-OptionsSAMEORIGIN
X-Frame-OptionsSAMEORIGIN
{
    "last_name": "Sy",
    "first_name": "Ed",
    "email": "[email protected]",
    "_id": {
        "$oid": "5be95439a856d004ec65e09b"
    },
    "is_enabled": true,
    "username": "admin",
    "company": "Ruckus",
    "send_notification": false
}

Create Account

This endpoint is used to create an account in the controller.

curl -X POST -H "Content-Type: application/json" -H "Authorization: Basic YWRtaW46YWRtaW4=" -d '{
  "username": "admin1",
  "first_name": "John",
  "last_name": "Doe",
  "company": "RIoT Admin",
  "email": "[email protected]",
  "password": "admin1",
  "phone": "9876543210",
  "send_notification": false
}' "{{auth_host}}/v1/account"
POST %7B%7Bauth_host%7D%7D/v1/account HTTP/1.1
Host: 
Content-Type: application/json
Authorization: Basic YWRtaW46YWRtaW4=

{
  "username": "admin1",
  "first_name": "John",
  "last_name": "Doe",
  "company": "RIoT Admin",
  "email": "[email protected]",
  "password": "admin1",
  "phone": "9876543210",
  "send_notification": false
}
Status200 OK
AllowGET, POST, HEAD, OPTIONS
Connectionkeep-alive
Content-Length216
Content-Typeapplication/json
DateWed, 21 Nov 2018 10:39:05 GMT
Servernginx
Strict-Transport-Securitymax-age=63072000
VaryAccept
X-Frame-OptionsSAMEORIGIN
X-Frame-OptionsSAMEORIGIN
{
    "first_name": "John",
    "username": "admin1",
    "is_enabled": true,
    "_id": {
        "$oid": "5bf535c9e2082806210c339d"
    },
    "last_name": "Doe",
    "phone": "9876543210",
    "send_notification": false,
    "company": "RIoT Admin",
    "email": "[email protected]"
}

Authentication

All the APIs are protected with token-auth.To get a token for interacting with the APIs the token needs to be generated using basic-auth.

Basic Auth

The endpoints protected with a basic-auth accepts a username and password and returns a status code of 200 ok only if the same is provided. Otherwise it will return a status code 401 unauthorized.

Username: admin

Password: admin

To use this endpoint, send a request with the header Authorization: Basic YWRtaW46YWRtaW4=. The cryptic latter half of the header value is a base64 encoded concatenation of the default username and password. Using Postman, to send this request, you can simply fill in the username and password in the “Authorization” tab and Postman will do the rest for you.

To know more about basic authentication, refer to the Basic Access Authentication wikipedia article. The article on authentication helpers elaborates how to use the same within the Postman app.

Token Auth

The endpoints protected with a token-auth accepts a token and returns a status code of 200 ok only if the same is provided. Otherwise it will return a status code 401 unauthorized.

To use this endpoint, send a request with the header Authorization: Token 086a5de496084e1a8a46ff0ed18a6b10. The token has to be retrieved from the Get Token API and then has to be provided in the header of the API requests. Using Postman, to send this request, you can simply fill in the username and password in the “Authorization” tab and Postman will do the rest for you.

To know more about token authentication, refer to the Token Access Authentication wikipedia article. The article on authentication helpers elaborates how to use the same within the Postman app.

COEX

Gateway Management IOT_COEX

Gateway Management IOT_COEX

curl -X PUT -H "Content-Type: application/json" -H "Authorization: Token {{auth_token}}" -d '{
	"iot_coex": true,
	"network_mac":"90:FD:9F:FF:FE:7C:34:17"
}
	' "{{host}}/app/v1/gateway/D8:38:FC:25:C4:C0/management/IOT_COEX"
PUT %7B%7Bhost%7D%7D/app/v1/gateway/D8:38:FC:25:C4:C0/management/IOT_COEX HTTP/1.1
Host: 
Content-Type: application/json
Authorization: Token {{auth_token}}

{
	"iot_coex": true,
	"network_mac":"90:FD:9F:FF:FE:7C:34:17"
}
	

Gateway Management IOT_RESTAR

Gateway Management IOT_RESTAR

curl -X PATCH -H "Content-Type: application/json" -H "Authorization: Token {{auth_token}}" -d '[
    {
        "gateway_euid": "8C:FE:74:21:F5:30"
    }
]' "{{host}}/app/v1/gateway/management/IOT_RESTAR"
PATCH %7B%7Bhost%7D%7D/app/v1/gateway/management/IOT_RESTAR HTTP/1.1
Host: 
Content-Type: application/json
Authorization: Token {{auth_token}}

[
    {
        "gateway_euid": "8C:FE:74:21:F5:30"
    }
]

Gateway Management VLAN_ENABLE

Gateway Management VLAN_ENABLE

curl -X PATCH -H "Content-Type: application/json" -H "Authorization: Token {{auth_token}}" -d '[
    {
        "gateway_euid": "B4:79:C8:3E:75:40",
        "vlan_id": 3,
        "vlan_enable": true,
        "vlan_mode": "ONLINK"
    }
]' "{{host}}/app/v1/gateway/management/VLAN_ENABLE"
PATCH %7B%7Bhost%7D%7D/app/v1/gateway/management/VLAN_ENABLE HTTP/1.1
Host: 
Content-Type: application/json
Authorization: Token {{auth_token}}

[
    {
        "gateway_euid": "B4:79:C8:3E:75:40",
        "vlan_id": 3,
        "vlan_enable": true,
        "vlan_mode": "ONLINK"
    }
]

Gateway Management IOT_APPROVED

Gateway Management IOT_APPROVED

curl -X PATCH -H "Content-Type: application/json" -H "Authorization: Token {{auth_token}}" -d '[
    {
        "gateway_euid": "B4:79:C8:3E:75:40",
        "iot_approved": true
    }
]' "{{host}}/app/v1/gateway/management/IOT_APPROVED"
PATCH %7B%7Bhost%7D%7D/app/v1/gateway/management/IOT_APPROVED HTTP/1.1
Host: 
Content-Type: application/json
Authorization: Token {{auth_token}}

[
    {
        "gateway_euid": "B4:79:C8:3E:75:40",
        "iot_approved": true
    }
]

Device Aggregation

These are the set of APIs which group different devices together based on a set of conditions and return aggregated data. Each API response will consist of a list of dictionaries with data pertaining to that specific API.

Dashboard ALL

This endpoint is a token-auth protected endpoint.

This endpoint is be used to get dashboard information.

{{host}}app/v1/dashboard/all

This endpoint is be used to get the devicesbyprovision, devicesbybatterylevel, provisioned, devicesbyprotocol, devicetype, gatewaymode, topaps,devicesbylastseen endpoint response in single dictionary.

Expected status codes

Status Code Explanation
200 Request is processed successfully
404 Devices not found in RIoT
500 Critical Server Error
curl -X GET -H "Content-Type: application/json" -H "Authorization: Token {{auth_token}}" "{{host}}/app/v1/dashboard/all"
GET %7B%7Bhost%7D%7D/app/v1/dashboard/all HTTP/1.1
Host: 
Content-Type: application/json
Authorization: Token {{auth_token}}
Status200 OK
nginx
Wed, 14 Jul 2021 05:44:37 GMT
application/json
731
keep-alive
GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
Origin
SAMEORIGIN
SAMEORIGIN
max-age=63072000
{
    "devicesbybatterylevel": {
        "30percentage50percentage": 0,
        "morethen90percentage": 0,
        "NA": 0,
        "10percentage30percentage": 0,
        "50percentage90percentage": 1,
        "lessthan10percentage": 0
    },
    "devicesbyprotocol": [
        {
            "_id": "zigbee",
            "count": 1
        }
    ],
    "radiospanmode": {
        "zigbee_count": 1,
        "na_count": 0,
        "ble_count": 1,
        "zigbee_dk_count": 1,
        "zigbee_aa_count": 1
    },
    "devicetype": [
        {
            "_id": "0x0402",
            "count": 1
        }
    ],
    "gatewaymode": [
        {
            "_id": "{'network_type': 'zigbee'}",
            "count": 2
        }
    ],
    "topaps": [
        {
            "_id": "30:87:D9:14:6A:00",
            "count": 1,
            "gateway_name": "RuckusAP"
        }
    ],
    "devicesbylastseen": {
        "preapproved": 0,
        "greaterthan1day": 1,
        "5minutesto1hours": 0,
        "lessthan5minutes": 0,
        "1hourto1day": 0
    },
    "provisioned": [
        {
            "offlineApproved": 2
        },
        {
            "total_gateway_count": 2
        }
    ],
    "devicesbyprovision": [
        {
            "_id": "False",
            "count": 1
        }
    ]
}

Dashboard DevicesByProvision

This endpoint is a token-auth protected endpoint.

This endpoint is be used to get the count of provisioned devices.

{{host}}app/v1/dashboard/devicesbyprovision

All the provisioned (where is_enabled is 1) and non provisioned devices will be grouped and their count will be returned.

Response Key Explanation

Key Type Explanation
_id int has the value for provision (0 or 1)
count int quantifies the provisioned and non provsioned devices

Expected status codes

Status Code Explanation
200 Request is processed successfully
404 Devices not found in RIoT
500 Critical Server Error
curl -X GET -H "Content-Type: application/json" -H "Authorization: Token {{auth_token}}" "{{host}}/app/v1/dashboard/devicesbyprovision"
GET %7B%7Bhost%7D%7D/app/v1/dashboard/devicesbyprovision HTTP/1.1
Host: 
Content-Type: application/json
Authorization: Token {{auth_token}}

Dashboard GatewaysByProvision

This endpoint is a token-auth protected endpoint.

This endpoint is be used to get the count of provisioned gateways.

{{host}}app/v1/dashboard/provisioned

Response Key Explanation

Key Type Explanation
offlineApproved int has the value offline approved Aps
onlineApproved int has the value online approved APs
offlineUnapproved int has the value offline unapproved APs
onlineUnapproved int has the value online unapproved APs
total_gateway_count int has the value total count of the APs

Expected status codes

Status Code Explanation
200 Request is processed successfully
404 Devices not found in RIoT
500 Critical Server Error
curl -X GET -H "Content-Type: application/json" -H "Authorization: Token {{auth_token}}" "{{host}}/app/v1/dashboard/provisioned"
GET %7B%7Bhost%7D%7D/app/v1/dashboard/provisioned HTTP/1.1
Host: 
Content-Type: application/json
Authorization: Token {{auth_token}}

Dashboard DevicesByBatteryLevel

This endpoint is a token-auth protected endpoint.

This endpoint is be used to get the Battery level percentage of devices.

{{host}}app/v1/dashboard/devicesbybatterylevel

Response Key Explanation

Key Type Explanation
morethen90percentage int has the value of battery level is over 90%
50percentage90percentage int has the value of battery level is lie between 50% to 90%
30percentage50percentage int has the value of battery level is lie between 50% to 90%
10percentage30percentage int has the value of battery level is less 10%
NA int has the value of battery level is not updated

Expected status codes

Status Code Explanation
200 Request is processed successfully
404 Devices not found in RIoT
500 Critical Server Error
curl -X GET -H "Content-Type: application/json" -H "Authorization: Token {{auth_token}}" "{{host}}/app/v1/dashboard/devicesbybatterylevel"
GET %7B%7Bhost%7D%7D/app/v1/dashboard/devicesbybatterylevel HTTP/1.1
Host: 
Content-Type: application/json
Authorization: Token {{auth_token}}

Dashboard DevicesByProtocol

This endpoint is a token-auth protected endpoint.

This endpoint is be used to get the count of different modes of devices.

{{host}}app/v1/dashboard/devicesbyprotocol

Based on the gateway against which each device is mapped, and the network mode of that gateway (ZIGBEE, BLE), different devices are grouped together on their operating mode. The response is a list of dictionaries where each dictionary has the device_type and its related count.

Response Key Explanation

Key Type Explanation
_id int has the value for the network_mode
count int quantifies the devices against this network mode

Expected status codes

Status Code Explanation
200 Request is processed successfully
404 Devices not found in RIoT
500 Critical Server Error
curl -X GET -H "Content-Type: application/json" -H "Authorization: Token {{auth_token}}" "{{host}}/app/v1/dashboard/devicesbyprotocol"
GET %7B%7Bhost%7D%7D/app/v1/dashboard/devicesbyprotocol HTTP/1.1
Host: 
Content-Type: application/json
Authorization: Token {{auth_token}}

Dashboard DevicesType

This endpoint is a token-auth protected endpoint.

This endpoint is be used to get the count of different types of devices.

{{host}}app/v1/dashboard/devicetype

Based on the value of the device_type field for every document in the Device collection, different documents of the same device_type value will be grouped and their count will be returned along with the respective device_type value. The response is a list of dictionaries where each dictionary has the device_type and its related count.

Response Key Explanation

Key Type Explanation
_id int has the value for the device_type
count int quantifies the devices against this device_type

Expected status codes

Status Code Explanation
200 Request is processed successfully
404 Devices not found in RIoT
500 Critical Server Error
curl -X GET -H "Content-Type: application/json" -H "Authorization: Token {{auth_token}}" "{{host}}/app/v1/dashboard/devicetype"
GET %7B%7Bhost%7D%7D/app/v1/dashboard/devicetype HTTP/1.1
Host: 
Content-Type: application/json
Authorization: Token {{auth_token}}

Dashboard DevicesByLastSeen

This endpoint is a token-auth protected endpoint.

This endpoint is be used to get the count of provisioned devices.

{{host}}app/v1/dashboard/devicesbyprovision

All the provisioned (where is_enabled is 1) and non provisioned devices will be grouped and their count will be returned.

Response Key Explanation

Key Type Explanation
_id int has the value for provision (0 or 1)
count int quantifies the provisioned and non provsioned devices

Expected status codes

Status Code Explanation
200 Request is processed successfully
404 Devices not found in RIoT
500 Critical Server Error
curl -X GET -H "Content-Type: application/json" -H "Authorization: Token {{auth_token}}" "{{host}}/app/v1/dashboard/devicesbylastseen"
GET %7B%7Bhost%7D%7D/app/v1/dashboard/devicesbylastseen HTTP/1.1
Host: 
Content-Type: application/json
Authorization: Token {{auth_token}}

Dashboard GatewayByMode

This endpoint is a token-auth protected endpoint.

This endpoint is be used to get the count of different types of gateway modes.

{{host}}app/v1/dashboard/gatewaymode

Response Key Explanation

Key Type Explanation
_id int has the value for the device_type
count int quantifies the devices against this gatewaymode

Expected status codes

Status Code Explanation
200 Request is processed successfully
404 Devices not found in RIoT
500 Critical Server Error
curl -X GET -H "Content-Type: application/json" -H "Authorization: Token {{auth_token}}" "{{host}}/app/v1/dashboard/gatewaymode"
GET %7B%7Bhost%7D%7D/app/v1/dashboard/gatewaymode HTTP/1.1
Host: 
Content-Type: application/json
Authorization: Token {{auth_token}}

Dashboard TopAps

This endpoint is a token-auth protected endpoint.

This endpoint is be used to get the count of APs with most Devices.

{{host}}app/v1/dashboard/topaps

Response Key Explanation

Key Type Explanation
_id int has the value AP mac address
gateway_name string has the value AP name
count int quanhas the value of most devices connected to the AP

Expected status codes

Status Code Explanation
200 Request is processed successfully
404 Devices not found in RIoT
500 Critical Server Error
curl -X GET -H "Content-Type: application/json" -H "Authorization: Token {{auth_token}}" "{{host}}/app/v1/dashboard/topaps"
GET %7B%7Bhost%7D%7D/app/v1/dashboard/topaps HTTP/1.1
Host: 
Content-Type: application/json
Authorization: Token {{auth_token}}

Device CRUD

These are the set of APIs through which a device or a group of devices can be managed. The device(s) can be added, modified or deleted by these APIs.

All Devices

This endpoint is a token-auth protected endpoint.

This endpoint is used to get the detailed list of devices added under the account. These devices can be added manually from the Create Device API, or through scanning on gateways. All the devices which have communicated with RIoT will have extra details of the attributes which it supports, the type of device and other details.

Response Key Explanation

Key Type Explanation
device_tags Array Tags assigned to the device
device_name String Name given to the device
updated_on Timestamp The timestamp when the device was updated
created_on Timestamp The timestamp of when the device was created
connected Boolean The state whether the device is connected to RIoT
gateway_euid String The MAC address of the of the gateway under which the device is mapped
device_type String The type of device
blacklisted Boolean Whether the device is blacklisted by user
device_vdzg_info Array Information regarding group zone domain of the device
custom Array
network_mac String Mac address of the radio device is mapped
lqi Integer link quality index
wired_device Boolean Whether it is a wired device
network_type String Type of network of device
device_euid String Mac address of the device
rssi Integer singal strength
last_seen Integer epoch time when the device last communicated
has_install_code Integer Whether this device is secured with a network key

If the blacklisted value is true. Then there will be no communication between the device and the controller. By default the device type will be SENSOR. After the device communicates the device type will be updated to either LIGHT, LOCK, SWITCH, SMART_PLUG etc.

Expected status codes

Status Code Explanation
200 Request is processed successfully
401 Invalid token
404 Devices not found in RIoT
500 Critical Server Error
curl -X GET -H "Authorization: Token {{auth_token}}" "{{host}}/app/v1/device?limit=10&offset=0"
GET %7B%7Bhost%7D%7D/app/v1/device?limit=10&offset=0 HTTP/1.1
Host: 
Authorization: Token {{auth_token}}
Status200 OK
AllowGET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
Connectionkeep-alive
Content-Length17742
Content-Typeapplication/json
DateWed, 21 Nov 2018 11:14:08 GMT
Servernginx
Strict-Transport-Securitymax-age=63072000
X-Frame-OptionsSAMEORIGIN
X-Frame-OptionsSAMEORIGIN
{
    "meta": {
        "query": "",
        "offset": 0,
        "limit": 0,
        "total_count": 5
    },
    "data": [
        {
            "device_tags": [
                "00:24:46:00:00:0E:5D:96",
                "thermostat-apr"
            ],
            "gateway_euid": "30:87:D9:14:79:90",
            "last_seen": 1542793660,
            "connected": false,
            "lqi": 255,
            "has_install_code": 1,
            "device_name": "thermostat-apr",
            "device_type": "Thermostat",
            "network_mac": "90:FD:9F:FF:FE:0C:89:36",
            "network_type": "ble",
            "device_euid": "00:24:46:00:00:0E:5D:96",
            "updated_on": "2018-11-21T11:13:17.281000Z",
            "blacklisted": false,
            "rssi": -24,
            "created_on": "2018-11-21T09:10:07.345000Z"
        },
        {
            "device_tags": [
                "00:15:8D:00:01:A8:CD:83",
                "heiman-door-KR"
            ],
            "gateway_euid": "F0:3E:90:3F:89:00",
            "last_seen": 1542797335,
            "connected": true,
            "lqi": 255,
            "device_name": "heiman-door-KR",
            "device_type": "IAS Zone",
            "network_mac": "90:FD:9F:FF:FE:0C:89:36",
            "network_type": "ble",
            "device_euid": "00:15:8D:00:01:A8:CD:83",
            "updated_on": "2018-11-21T11:13:16.910000Z",
            "device_zcl_capability": {
                "1": {
                    "0x0001": {
                        "parent_command": "",
                        "cluster_name": "Power Configuration",
                        "attributes": [
                            {
                                "reported_value": {
                                    "value": "0x1E"
                                },
                                "ui_range_max": 0,
                                "reported_value_name": "NA",
                                "ui_range_min": 0,
                                "attribute_name": "BatteryRatedVoltage",
                                "ui_control_id": "0",
                                "ui_data_type": "int",
                                "ui_unit": "na",
                                "ui_is_show": false,
                                "ui_validator_regex": "na",
                                "attribute_id": "0x0034",
                                "access": 1
                            }
                        ],
                        "commands": {}
                    },
                    "0x0003": {
                        "parent_command": "zcl identify",
                        "cluster_name": "Identify",
                        "attributes": [],
                        "commands": {
                            "0x00": {
                                "params": [
                                    {
                                        "action": "10"
                                    }
                                ],
                                "sub_command": "ez-mode",
                                "ui_range_max": "0",
                                "ui_data_type": "string",
                                "ui_unit": "na",
                                "ui_is_show": "FALSE",
                                "ui_range_min": "0",
                                "ui_control_id": "12",
                                "ui_validator_regex": "na",
                                "ui_args": [
                                    {
                                        "ui_control_id": "11",
                                        "ui_range_max": "0",
                                        "name": "action",
                                        "ui_unit": "na",
                                        "ui_is_show": "FALSE",
                                        "ui_data_type": "int",
                                        "ui_range_min": "0",
                                        "ui_validator_regex": "na",
                                        "command_description": ""
                                    }
                                ],
                                "command_description": "Identify"
                            },
                            "0x01": {
                                "params": [],
                                "sub_command": "query",
                                "ui_range_max": "0",
                                "ui_data_type": "int",
                                "ui_unit": "na",
                                "ui_is_show": "FALSE",
                                "ui_range_min": "0",
                                "ui_control_id": "0",
                                "ui_validator_regex": "na",
                                "ui_args": [],
                                "command_description": "Identify Query"
                            }
                        }
                    },
                    "0x0000": {
                        "cluster_name": "Basic",
                        "commands": {
                            "0x00": {
                                "params": [],
                                "sub_command": "rtfd",
                                "ui_range_max": "0",
                                "ui_data_type": "string",
                                "ui_unit": "na",
                                "ui_is_show": "TRUE",
                                "ui_range_min": "0",
                                "ui_control_id": "11",
                                "ui_validator_regex": "na",
                                "ui_args": [],
                                "command_description": "Reset to Factory Defaults"
                            }
                        },
                        "parent_command": "zcl basic",
                        "attributes": [
                            {
                                "reported_value": {
                                    "value": "0x4845494D414E"
                                },
                                "ui_range_max": 0,
                                "reported_value_name": "NA",
                                "ui_range_min": 0,
                                "attribute_name": "Manufacturer Name",
                                "ui_control_id": "1",
                                "ui_data_type": "ascii",
                                "ui_unit": "na",
                                "ui_is_show": true,
                                "ui_validator_regex": "na",
                                "attribute_id": "0x0004",
                                "access": 0
                            },
                            {
                                "reported_value": {
                                    "value": "0x02"
                                },
                                "ui_range_max": 0,
                                "reported_value_name": "NA",
                                "ui_range_min": 0,
                                "attribute_name": "StackVersion",
                                "ui_control_id": "1",
                                "ui_data_type": "string",
                                "ui_unit": "na",
                                "ui_is_show": false,
                                "ui_validator_regex": "na",
                                "attribute_id": "0x0002",
                                "access": 0
                            },
                            {
                                "reported_value": {
                                    "value": "0x01"
                                },
                                "ui_range_max": 0,
                                "reported_value_name": "NA",
                                "ui_range_min": 0,
                                "attribute_name": "ZCL Version",
                                "ui_control_id": "1",
                                "ui_data_type": "int",
                                "ui_unit": "(Version)",
                                "ui_is_show": true,
                                "ui_validator_regex": "na",
                                "attribute_id": "0x0000",
                                "access": 0
                            },
                            {
                                "reported_value": {
                                    "value": "0x323031382E322E3237"
                                },
                                "ui_range_max": 0,
                                "reported_value_name": "NA",
                                "ui_range_min": 0,
                                "attribute_name": "DateCode",
                                "ui_control_id": "1",
                                "ui_data_type": "string",
                                "ui_unit": "na",
                                "ui_is_show": false,
                                "ui_validator_regex": "na",
                                "attribute_id": "0x0006",
                                "access": 0
                            },
                            {
                                "reported_value": {
                                    "value": "0x10"
                                },
                                "ui_range_max": 0,
                                "reported_value_name": "NA",
                                "ui_range_min": 0,
                                "attribute_name": "HWVersion",
                                "ui_control_id": "1",
                                "ui_data_type": "string",
                                "ui_unit": "na",
                                "ui_is_show": false,
                                "ui_validator_regex": "na",
                                "attribute_id": "0x0003",
                                "access": 0
                            },
                            {
                                "reported_value": {
                                    "value": "0x446F6F7253656E736F722D4E"
                                },
                                "ui_range_max": 0,
                                "reported_value_name": "NA",
                                "ui_range_min": 0,
                                "attribute_name": "ModelIdentifier",
                                "ui_control_id": "1",
                                "ui_data_type": "ascii",
                                "ui_unit": "na",
                                "ui_is_show": false,
                                "ui_validator_regex": "na",
                                "attribute_id": "0x0005",
                                "access": 0
                            },
                            {
                                "reported_value": {
                                    "value": "0x03"
                                },
                                "ui_range_max": 0,
                                "reported_value_name": "Battery",
                                "ui_range_min": 0,
                                "attribute_name": "PowerSource",
                                "ui_control_id": "1",
                                "ui_data_type": "int",
                                "ui_unit": "na",
                                "ui_is_show": true,
                                "ui_validator_regex": "na",
                                "attribute_id": "0x0007",
                                "access": 0
                            },
                            {
                                "reported_value": {
                                    "value": "0x20"
                                },
                                "ui_range_max": 0,
                                "reported_value_name": "NA",
                                "ui_range_min": 0,
                                "attribute_name": "Application Version",
                                "ui_control_id": "1",
                                "ui_data_type": "string",
                                "ui_unit": "na",
                                "ui_is_show": false,
                                "ui_validator_regex": "na",
                                "attribute_id": "0x0001",
                                "access": 0
                            }
                        ]
                    },
                    "0x0500": {
                        "cluster_name": "IAS Zone",
                        "commands": {
                            "0x00": {
                                "params": [
                                    {
                                        "enroll": "0"
                                    },
                                    {
                                        "zone id": "0"
                                    }
                                ],
                                "sub_command": "enroll",
                                "ui_range_max": "0",
                                "ui_data_type": "int",
                                "ui_unit": "na",
                                "ui_is_show": "FALSE",
                                "ui_range_min": "0",
                                "ui_control_id": "0",
                                "ui_validator_regex": "na",
                                "ui_args": [
                                    {
                                        "ui_control_id": "0",
                                        "ui_range_max": "0",
                                        "name": "enroll",
                                        "ui_unit": "na",
                                        "ui_is_show": "FALSE",
                                        "ui_data_type": "int",
                                        "ui_range_min": "0",
                                        "ui_validator_regex": "na",
                                        "command_description": "Zone Enroll Response "
                                    },
                                    {
                                        "ui_control_id": "0",
                                        "ui_range_max": "0",
                                        "name": "zone id",
                                        "ui_unit": "na",
                                        "ui_is_show": "FALSE",
                                        "ui_data_type": "int",
                                        "ui_range_min": "0",
                                        "ui_validator_regex": "na",
                                        "command_description": ""
                                    }
                                ],
                                "command_description": "Zone Enroll Response "
                            }
                        },
                        "parent_command": "zcl ias-zone",
                        "attributes": [
                            {
                                "reported_value": {
                                    "value": "0x0020",
                                    "mapped_value": [
                                        {
                                            "Supervision reports (Note 1)": "Does not report",
                                            "Battery Defect": "Sensor battery is functioning normally",
                                            "Tamper": "not tampered",
                                            "Trouble": "OK",
                                            "Restore reports (Note 2)": "Report restore",
                                            "Battery": "Battery OK",
                                            "Alarm2": "2nd portal Open-Close closed or not alarmed",
                                            "Test": "Sensor is in operation mode",
                                            "AC (mains)": "AC/Mains OK",
                                            "Alarm1": "1st portal Open-Close closed or not alarmed"
                                        }
                                    ]
                                },
                                "ui_range_max": 0,
                                "reported_value_name": "NA",
                                "ui_range_min": 0,
                                "attribute_name": "ZoneStatus",
                                "ui_control_id": "1",
                                "ui_data_type": "int",
                                "ui_unit": "na",
                                "ui_is_show": true,
                                "ui_validator_regex": "na",
                                "attribute_id": "0x0002",
                                "access": 0
                            },
                            {
                                "reported_value": {
                                    "value": "0x01"
                                },
                                "ui_range_max": 0,
                                "reported_value_name": "NA",
                                "ui_range_min": 0,
                                "attribute_name": "MeasurementType",
                                "ui_control_id": "1",
                                "ui_data_type": "string",
                                "ui_unit": "na",
                                "ui_is_show": true,
                                "ui_validator_regex": "na",
                                "attribute_id": "0x0000",
                                "access": 0
                            },
                            {
                                "reported_value": {
                                    "value": "0x0015"
                                },
                                "ui_range_max": 0,
                                "reported_value_name": "Contact switch",
                                "ui_range_min": 0,
                                "attribute_name": "ZoneType",
                                "ui_control_id": "0",
                                "ui_data_type": "int",
                                "ui_unit": "na",
                                "ui_is_show": true,
                                "ui_validator_regex": "na",
                                "attribute_id": "0x0001",
                                "access": 0
                            }
                        ]
                    }
                }
            },
            "blacklisted": false,
            "rssi": -35,
            "created_on": "2018-11-21T09:51:19.968000Z"
        },
        {
            "device_tags": [
                "00:15:8D:00:01:A8:CB:99",
                "heiman-temp-KR"
            ],
            "gateway_euid": "F0:3E:90:3F:89:00",
            "last_seen": 1542798564,
            "connected": true,
            "lqi": 252,
            "has_install_code": 1,
            "device_name": "heiman-temp-KR",
            "device_type": "Temperature Sensor",
            "network_mac": "90:FD:9F:FF:FE:0C:89:36",
            "network_type": "ble",
            "device_euid": "00:15:8D:00:01:A8:CB:99",
            "updated_on": "2018-11-21T11:13:16.957000Z",
            "device_zcl_capability": {
                "1": {
                    "0x0402": {
                        "parent_command": "",
                        "cluster_name": "Temperature Measurement",
                        "attributes": [
                            {
                                "reported_value": {
                                    "value": "0x09A6"
                                },
                                "ui_range_max": 0,
                                "reported_value_name": "NA",
                                "ui_range_min": 0,
                                "attribute_name": "MeasuredValue",
                                "ui_control_id": "1",
                                "ui_data_type": "int",
                                "ui_unit": "na",
                                "ui_is_show": true,
                                "ui_validator_regex": "na",
                                "attribute_id": "0x0000",
                                "access": 2
                            }
                        ],
                        "commands": {}
                    },
                    "0x0003": {
                        "parent_command": "zcl identify",
                        "cluster_name": "Identify",
                        "attributes": [],
                        "commands": {
                            "0x00": {
                                "params": [
                                    {
                                        "action": "10"
                                    }
                                ],
                                "sub_command": "ez-mode",
                                "ui_range_max": "0",
                                "ui_data_type": "string",
                                "ui_unit": "na",
                                "ui_is_show": "FALSE",
                                "ui_range_min": "0",
                                "ui_control_id": "12",
                                "ui_validator_regex": "na",
                                "ui_args": [
                                    {
                                        "ui_control_id": "11",
                                        "ui_range_max": "0",
                                        "name": "action",
                                        "ui_unit": "na",
                                        "ui_is_show": "FALSE",
                                        "ui_data_type": "int",
                                        "ui_range_min": "0",
                                        "ui_validator_regex": "na",
                                        "command_description": ""
                                    }
                                ],
                                "command_description": "Identify"
                            },
                            "0x01": {
                                "params": [],
                                "sub_command": "query",
                                "ui_range_max": "0",
                                "ui_data_type": "int",
                                "ui_unit": "na",
                                "ui_is_show": "FALSE",
                                "ui_range_min": "0",
                                "ui_control_id": "0",
                                "ui_validator_regex": "na",
                                "ui_args": [],
                                "command_description": "Identify Query"
                            }
                        }
                    },
                    "0x0000": {
                        "cluster_name": "Basic",
                        "commands": {
                            "0x00": {
                                "params": [],
                                "sub_command": "rtfd",
                                "ui_range_max": "0",
                                "ui_data_type": "string",
                                "ui_unit": "na",
                                "ui_is_show": "TRUE",
                                "ui_range_min": "0",
                                "ui_control_id": "11",
                                "ui_validator_regex": "na",
                                "ui_args": [],
                                "command_description": "Reset to Factory Defaults"
                            }
                        },
                        "parent_command": "zcl basic",
                        "attributes": [
                            {
                                "reported_value": {
                                    "value": "0x4845494D414E"
                                },
                                "ui_range_max": 0,
                                "reported_value_name": "NA",
                                "ui_range_min": 0,
                                "attribute_name": "Manufacturer Name",
                                "ui_control_id": "1",
                                "ui_data_type": "ascii",
                                "ui_unit": "na",
                                "ui_is_show": true,
                                "ui_validator_regex": "na",
                                "attribute_id": "0x0004",
                                "access": 0
                            },
                            {
                                "reported_value": {
                                    "value": "0x02"
                                },
                                "ui_range_max": 0,
                                "reported_value_name": "NA",
                                "ui_range_min": 0,
                                "attribute_name": "StackVersion",
                                "ui_control_id": "1",
                                "ui_data_type": "string",
                                "ui_unit": "na",
                                "ui_is_show": false,
                                "ui_validator_regex": "na",
                                "attribute_id": "0x0002",
                                "access": 0
                            },
                            {
                                "reported_value": {
                                    "value": "0x01"
                                },
                                "ui_range_max": 0,
                                "reported_value_name": "NA",
                                "ui_range_min": 0,
                                "attribute_name": "ZCL Version",
                                "ui_control_id": "1",
                                "ui_data_type": "int",
                                "ui_unit": "(Version)",
                                "ui_is_show": true,
                                "ui_validator_regex": "na",
                                "attribute_id": "0x0000",
                                "access": 0
                            },
                            {
                                "reported_value": {
                                    "value": "0x323031382E332E32"
                                },
                                "ui_range_max": 0,
                                "reported_value_name": "NA",
                                "ui_range_min": 0,
                                "attribute_name": "DateCode",
                                "ui_control_id": "1",
                                "ui_data_type": "string",
                                "ui_unit": "na",
                                "ui_is_show": false,
                                "ui_validator_regex": "na",
                                "attribute_id": "0x0006",
                                "access": 0
                            },
                            {
                                "reported_value": {
                                    "value": "0x10"
                                },
                                "ui_range_max": 0,
                                "reported_value_name": "NA",
                                "ui_range_min": 0,
                                "attribute_name": "HWVersion",
                                "ui_control_id": "1",
                                "ui_data_type": "string",
                                "ui_unit": "na",
                                "ui_is_show": false,
                                "ui_validator_regex": "na",
                                "attribute_id": "0x0003",
                                "access": 0
                            },
                            {
                                "reported_value": {
                                    "value": "0x343030302D30303031"
                                },
                                "ui_range_max": 0,
                                "reported_value_name": "NA",
                                "ui_range_min": 0,
                                "attribute_name": "SWBuildID",
                                "ui_control_id": "1",
                                "ui_data_type": "string",
                                "ui_unit": "na",
                                "ui_is_show": false,
                                "ui_validator_regex": "na",
                                "attribute_id": "0x4000",
                                "access": 0
                            },
                            {
                                "reported_value": {
                                    "value": "0x48542D4E"
                                },
                                "ui_range_max": 0,
                                "reported_value_name": "NA",
                                "ui_range_min": 0,
                                "attribute_name": "ModelIdentifier",
                                "ui_control_id": "1",
                                "ui_data_type": "ascii",
                                "ui_unit": "na",
                                "ui_is_show": false,
                                "ui_validator_regex": "na",
                                "attribute_id": "0x0005",
                                "access": 0
                            },
                            {
                                "reported_value": {
                                    "value": "0x03"
                                },
                                "ui_range_max": 0,
                                "reported_value_name": "Battery",
                                "ui_range_min": 0,
                                "attribute_name": "PowerSource",
                                "ui_control_id": "1",
                                "ui_data_type": "int",
                                "ui_unit": "na",
                                "ui_is_show": true,
                                "ui_validator_regex": "na",
                                "attribute_id": "0x0007",
                                "access": 0
                            },
                            {
                                "reported_value": {
                                    "value": "0x18"
                                },
                                "ui_range_max": 0,
                                "reported_value_name": "NA",
                                "ui_range_min": 0,
                                "attribute_name": "Application Version",
                                "ui_control_id": "1",
                                "ui_data_type": "string",
                                "ui_unit": "na",
                                "ui_is_show": false,
                                "ui_validator_regex": "na",
                                "attribute_id": "0x0001",
                                "access": 0
                            }
                        ]
                    },
                    "0x0001": {
                        "parent_command": "",
                        "cluster_name": "Power Configuration",
                        "attributes": [
                            {
                                "reported_value": {
                                    "value": "0x00"
                                },
                                "ui_range_max": 0,
                                "reported_value_name": "NA",
                                "ui_range_min": 0,
                                "attribute_name": "BatteryRatedVoltage",
                                "ui_control_id": "0",
                                "ui_data_type": "int",
                                "ui_unit": "na",
                                "ui_is_show": false,
                                "ui_validator_regex": "na",
                                "attribute_id": "0x0034",
                                "access": 1
                            }
                        ],
                        "commands": {}
                    }
                },
                "2": {
                    "0x0405": {
                        "parent_command": "",
                        "cluster_name": "Relative Humidity",
                        "attributes": [
                            {
                                "reported_value": {
                                    "value": "0x12F8"
                                },
                                "ui_range_max": 0,
                                "reported_value_name": "NA",
                                "ui_range_min": 0,
                                "attribute_name": "MeasuredValue",
                                "ui_control_id": "1",
                                "ui_data_type": "int",
                                "ui_unit": "na",
                                "ui_is_show": true,
                                "ui_validator_regex": "na",
                                "attribute_id": "0x0000",
                                "access": 2
                            }
                        ],
                        "commands": {}
                    }
                }
            },
            "blacklisted": false,
            "rssi": -37,
            "created_on": "2018-11-21T10:14:39.272000Z"
        },
        {
            "device_tags": [
                "heiman-gas-KR",
                "00:15:8D:00:01:A8:D6:E0"
            ],
            "gateway_euid": "F0:3E:90:3F:89:00",
            "last_seen": 1542798706,
            "connected": true,
            "lqi": 252,
            "has_install_code": 1,
            "device_name": "heiman-gas-KR",
            "device_type": "IAS Zone",
            "network_mac": "90:FD:9F:FF:FE:0C:89:36",
            "network_type": "ble",
            "device_euid": "00:15:8D:00:01:A8:D6:E0",
            "updated_on": "2018-11-21T11:13:16.928000Z",
            "device_zcl_capability": {
                "1": {
                    "0x0003": {
                        "parent_command": "zcl identify",
                        "cluster_name": "Identify",
                        "attributes": [],
                        "commands": {
                            "0x00": {
                                "params": [
                                    {
                                        "action": "10"
                                    }
                                ],
                                "sub_command": "ez-mode",
                                "ui_range_max": "0",
                                "ui_data_type": "string",
                                "ui_unit": "na",
                                "ui_is_show": "FALSE",
                                "ui_range_min": "0",
                                "ui_control_id": "12",
                                "ui_validator_regex": "na",
                                "ui_args": [
                                    {
                                        "ui_control_id": "11",
                                        "ui_range_max": "0",
                                        "name": "action",
                                        "ui_unit": "na",
                                        "ui_is_show": "FALSE",
                                        "ui_data_type": "int",
                                        "ui_range_min": "0",
                                        "ui_validator_regex": "na",
                                        "command_description": ""
                                    }
                                ],
                                "command_description": "Identify"
                            },
                            "0x01": {
                                "params": [],
                                "sub_command": "query",
                                "ui_range_max": "0",
                                "ui_data_type": "int",
                                "ui_unit": "na",
                                "ui_is_show": "FALSE",
                                "ui_range_min": "0",
                                "ui_control_id": "0",
                                "ui_validator_regex": "na",
                                "ui_args": [],
                                "command_description": "Identify Query"
                            }
                        }
                    },
                    "0x0000": {
                        "cluster_name": "Basic",
                        "commands": {
                            "0x00": {
                                "params": [],
                                "sub_command": "rtfd",
                                "ui_range_max": "0",
                                "ui_data_type": "string",
                                "ui_unit": "na",
                                "ui_is_show": "TRUE",
                                "ui_range_min": "0",
                                "ui_control_id": "11",
                                "ui_validator_regex": "na",
                                "ui_args": [],
                                "command_description": "Reset to Factory Defaults"
                            }
                        },
                        "parent_command": "zcl basic",
                        "attributes": [
                            {
                                "reported_value": {
                                    "value": "0x4845494D414E"
                                },
                                "ui_range_max": 0,
                                "reported_value_name": "NA",
                                "ui_range_min": 0,
                                "attribute_name": "Manufacturer Name",
                                "ui_control_id": "1",
                                "ui_data_type": "ascii",
                                "ui_unit": "na",
                                "ui_is_show": true,
                                "ui_validator_regex": "na",
                                "attribute_id": "0x0004",
                                "access": 0
                            },
                            {
                                "reported_value": {
                                    "value": "0x02"
                                },
                                "ui_range_max": 0,
                                "reported_value_name": "NA",
                                "ui_range_min": 0,
                                "attribute_name": "StackVersion",
                                "ui_control_id": "1",
                                "ui_data_type": "string",
                                "ui_unit": "na",
                                "ui_is_show": false,
                                "ui_validator_regex": "na",
                                "attribute_id": "0x0002",
                                "access": 0
                            },
                            {
                                "reported_value": {
                                    "value": "0x01"
                                },
                                "ui_range_max": 0,
                                "reported_value_name": "NA",
                                "ui_range_min": 0,
                                "attribute_name": "ZCL Version",
                                "ui_control_id": "1",
                                "ui_data_type": "int",
                                "ui_unit": "(Version)",
                                "ui_is_show": true,
                                "ui_validator_regex": "na",
                                "attribute_id": "0x0000",
                                "access": 0
                            },
                            {
                                "reported_value": {
                                    "value": "0x323031382E332E3130"
                                },
                                "ui_range_max": 0,
                                "reported_value_name": "NA",
                                "ui_range_min": 0,
                                "attribute_name": "DateCode",
                                "ui_control_id": "1",
                                "ui_data_type": "string",
                                "ui_unit": "na",
                                "ui_is_show": false,
                                "ui_validator_regex": "na",
                                "attribute_id": "0x0006",
                                "access": 0
                            },
                            {
                                "reported_value": {
                                    "value": "0x10"
                                },
                                "ui_range_max": 0,
                                "reported_value_name": "NA",
                                "ui_range_min": 0,
                                "attribute_name": "HWVersion",
                                "ui_control_id": "1",
                                "ui_data_type": "string",
                                "ui_unit": "na",
                                "ui_is_show": false,
                                "ui_validator_regex": "na",
                                "attribute_id": "0x0003",
                                "access": 0
                            },
                            {
                                "reported_value": {
                                    "value": "0x47415353656E736F722D4E"
                                },
                                "ui_range_max": 0,
                                "reported_value_name": "NA",
                                "ui_range_min": 0,
                                "attribute_name": "ModelIdentifier",
                                "ui_control_id": "1",
                                "ui_data_type": "ascii",
                                "ui_unit": "na",
                                "ui_is_show": false,
                                "ui_validator_regex": "na",
                                "attribute_id": "0x0005",
                                "access": 0
                            },
                            {
                                "reported_value": {
                                    "value": "0x01"
                                },
                                "ui_range_max": 0,
                                "reported_value_name": "Mains (single phase)",
                                "ui_range_min": 0,
                                "attribute_name": "PowerSource",
                                "ui_control_id": "1",
                                "ui_data_type": "int",
                                "ui_unit": "na",
                                "ui_is_show": true,
                                "ui_validator_regex": "na",
                                "attribute_id": "0x0007",
                                "access": 0
                            },
                            {
                                "reported_value": {
                                    "value": "0x12"
                                },
                                "ui_range_max": 0,
                                "reported_value_name": "NA",
                                "ui_range_min": 0,
                                "attribute_name": "Application Version",
                                "ui_control_id": "1",
                                "ui_data_type": "string",
                                "ui_unit": "na",
                                "ui_is_show": false,
                                "ui_validator_regex": "na",
                                "attribute_id": "0x0001",
                                "access": 0
                            }
                        ]
                    },
                    "0x0500": {
                        "cluster_name": "IAS Zone",
                        "commands": {
                            "0x00": {
                                "params": [
                                    {
                                        "enroll": "0"
                                    },
                                    {
                                        "zone id": "0"
                                    }
                                ],
                                "sub_command": "enroll",
                                "ui_range_max": "0",
                                "ui_data_type": "int",
                                "ui_unit": "na",
                                "ui_is_show": "FALSE",
                                "ui_range_min": "0",
                                "ui_control_id": "0",
                                "ui_validator_regex": "na",
                                "ui_args": [
                                    {
                                        "ui_control_id": "0",
                                        "ui_range_max": "0",
                                        "name": "enroll",
                                        "ui_unit": "na",
                                        "ui_is_show": "FALSE",
                                        "ui_data_type": "int",
                                        "ui_range_min": "0",
                                        "ui_validator_regex": "na",
                                        "command_description": "Zone Enroll Response "
                                    },
                                    {
                                        "ui_control_id": "0",
                                        "ui_range_max": "0",
                                        "name": "zone id",
                                        "ui_unit": "na",
                                        "ui_is_show": "FALSE",
                                        "ui_data_type": "int",
                                        "ui_range_min": "0",
                                        "ui_validator_regex": "na",
                                        "command_description": ""
                                    }
                                ],
                                "command_description": "Zone Enroll Response "
                            }
                        },
                        "parent_command": "zcl ias-zone",
                        "attributes": [
                            {
                                "reported_value": {
                                    "value": "0x0030",
                                    "mapped_value": [
                                        {
                                            "Supervision reports (Note 1)": "Reports",
                                            "Battery Defect": "Sensor battery is functioning normally",
                                            "Tamper": "not tampered",
                                            "Restore reports (Note 2)": "Report restore",
                                            "Battery": "Battery OK",
                                            "Alarm2": "Cooking indication closed or not alarmed",
                                            "Test": "Sensor is in operation mode",
                                            "Alarm1": "CO indication closed or not alarmed",
                                            "AC (mains)": "AC/Mains OK",
                                            "Trouble": "OK"
                                        }
                                    ]
                                },
                                "ui_range_max": 0,
                                "reported_value_name": "NA",
                                "ui_range_min": 0,
                                "attribute_name": "ZoneStatus",
                                "ui_control_id": "1",
                                "ui_data_type": "int",
                                "ui_unit": "na",
                                "ui_is_show": true,
                                "ui_validator_regex": "na",
                                "attribute_id": "0x0002",
                                "access": 0
                            },
                            {
                                "reported_value": {
                                    "value": "0x01"
                                },
                                "ui_range_max": 0,
                                "reported_value_name": "NA",
                                "ui_range_min": 0,
                                "attribute_name": "MeasurementType",
                                "ui_control_id": "1",
                                "ui_data_type": "string",
                                "ui_unit": "na",
                                "ui_is_show": true,
                                "ui_validator_regex": "na",
                                "attribute_id": "0x0000",
                                "access": 0
                            },
                            {
                                "reported_value": {
                                    "value": "0x002B"
                                },
                                "ui_range_max": 0,
                                "reported_value_name": "Carbon Monoxide (CO) sensor",
                                "ui_range_min": 0,
                                "attribute_name": "ZoneType",
                                "ui_control_id": "0",
                                "ui_data_type": "int",
                                "ui_unit": "na",
                                "ui_is_show": true,
                                "ui_validator_regex": "na",
                                "attribute_id": "0x0001",
                                "access": 0
                            }
                        ]
                    }
                }
            },
            "blacklisted": false,
            "rssi": -37,
            "created_on": "2018-11-21T10:24:38.605000Z"
        },
        {
            "device_tags": [
                "sengled",
                "B0:CE:18:14:03:02:CE:C5"
            ],
            "gateway_euid": "F0:3E:90:3F:89:00",
            "last_seen": 1542798634,
            "connected": true,
            "lqi": 132,
            "has_install_code": 1,
            "device_name": "sengled",
            "device_type": "Dimmable Light",
            "network_mac": "90:FD:9F:FF:FE:0C:89:36",
            "network_type": "ble",
            "device_euid": "B0:CE:18:14:03:02:CE:C5",
            "updated_on": "2018-11-21T11:13:16.943000Z",
            "device_zcl_capability": {},
            "blacklisted": false,
            "rssi": -67,
            "created_on": "2018-11-21T10:43:38.397000Z"
        }
    ]
}
Status404 Not Found
AllowGET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
Connectionclose
Content-Length103
Content-Typeapplication/json
DateWed, 26 Jul 2017 11:47:27 GMT
Servergunicorn/19.6.0
VaryCookie
X-Frame-OptionsSAMEORIGIN
{
    "code": 404,
    "http_code": 404,
    "developer_message": null,
    "message": "Devices not found",
    "http_message": null
}

Query Devices

This endpoint is a token-auth protected endpoint.

This endpoint is used to get the information related to a device.

Response Key Explanation

Key Type Explanation
device_tags Array Tags assigned to the device
device_name String Name given to the device
updated_on Timestamp The timestamp when the device was updated
created_on Timestamp The timestamp of when the device was created
connected Boolean The state whether the device is connected to RIoT
gateway_euid String The MAC address of the of the gateway under which the device is mapped
device_type String The type of device
blacklisted Boolean Whether the device is blacklisted by user
device_vdzg_info Array Information regarding group zone domain of the device
custom Array
network_mac String Mac address of the radio device is mapped
lqi Integer link quality index
wired_device Boolean Whether it is a wired device
network_type String Type of network of device
device_euid String Mac address of the device
rssi Integer singal strength
last_seen Integer epoch time when the device last communicated
has_install_code Integer Whether this device is secured with a network key
device_zcl_capability Dictionary Contains information of the Attributes supported by the device

The device zcl capability is available only after the device has communicated with the RIoT controller. The contents of the device capability is as below:

{ “device_zcl_capability”: { “device_endpoint”: { “cluster_id”: { “parent_command”: “Parent command of this zigbee cluster”, “attributes”: [ { “reported_value_name”: “Undefined”, “attribute_name”: “IdentifyTime “, “reported_value”: { “value”: “Value received by device” }, “attribute_id”: “0x0000” } ], “commands”: { “command_id”: { “sub_command”: “ez-mode”, “params”: [ { “parameter 1”: “default value “ } ], “command_description”: “Description of this command” } } } } } }

If the blacklisted value is true. Then there will be no communication between the device anf the controller. By default the device type will be SENSOR. After the device communicates the device type will be updated to either LIGHT, LOCK, SWITCH or SMART_PLUG.

Expected status codes

Status Code Explanation
200 Request is processed successfully
401 Invalid token
404 Devices not found in RIoT
500 Critical Server Error
curl -X GET -H "Authorization: Token {{auth_token}}" "{{host}}/app/v1/device?limit=10&offset=0&gateway_euid=D8:38:FC:25:BB:60&connected=true&device_type=sensor&device_tags=assa abloy"
GET %7B%7Bhost%7D%7D/app/v1/device?limit=10&offset=0&gateway_euid=D8:38:FC:25:BB:60&connected=true&device_type=sensor&device_tags=assa abloy HTTP/1.1
Host: 
Authorization: Token {{auth_token}}
Status200 OK
AllowGET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Length1144
Content-Typeapplication/json
DateTue, 25 Jul 2017 10:53:17 GMT
ServerWSGIServer/0.2 CPython/3.5.2
VaryCookie
X-Frame-OptionsSAMEORIGIN
[
    {
        "device_name": "Demo Test Device",
        "device_type": "SENSOR",
        "device_capability": {
            "LIGHT": {
                "attributes": {
                    "BRIGHTNESS": {
                        "configured_value": {
                            "level": 255
                        },
                        "reported_value": {
                            "level": 254
                        }
                    },
                    "STATE": {
                        "configured_value": {
                            "on": 0
                        },
                        "reported_value": {
                            "on": 1
                        }
                    }
                }
            }
        },
        "created_on": "2017-05-31T12:34:31.400000Z",
        "updated_on": "2017-06-02T11:02:26.059000Z",
        "connected": true,
        "device_euid": "84:18:26:00:00:07:AB:55",
        "device_tags": [
            "121",
            "some-tag"
        ],
        "gateway_euid": "D8:38:FC:25:BB:60"
    },
    {
        "device_name": "Light",
        "device_type": "SENSOR",
        "created_on": "2017-07-21T13:10:02.693000Z",
        "updated_on": "Never",
        "connected": false,
        "device_euid": "84:18:26:00:00:07:AB:56",
        "device_tags": [
            "Osram"
        ],
        "gateway_euid": "D8:38:FC:25:BB:60"
    },
    {
        "device_name": "Light",
        "device_type": "SENSOR",
        "created_on": "2017-07-21T13:10:24.681000Z",
        "updated_on": "Never",
        "connected": false,
        "device_euid": "84:18:26:00:00:07:AB:57",
        "device_tags": [
            "Osram"
        ],
        "gateway_euid": "D8:38:FC:25:BB:60"
    },
    {
        "device_name": "Light",
        "device_type": "SENSOR",
        "created_on": "2017-07-21T13:11:38.660000Z",
        "updated_on": "Never",
        "connected": false,
        "device_euid": "84:18:26:00:00:07:AB:58",
        "device_tags": [
            "Osram"
        ],
        "gateway_euid": "D8:38:FC:25:BB:60"
    }
]
Status404 Not Found
AllowGET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
Connectionclose
Content-Length103
Content-Typeapplication/json
DateWed, 26 Jul 2017 11:47:27 GMT
Servergunicorn/19.6.0
VaryCookie
X-Frame-OptionsSAMEORIGIN
{
    "code": 404,
    "http_code": 404,
    "developer_message": null,
    "message": "Devices not found",
    "http_message": null
}

Search Devices

This endpoint is a token-auth protected endpoint.

This endpoint is used to get the devices based on the search string provided by the user.

Response Key Explanation

Key Type Explanation
device_tags Array Tags assigned to the device
device_name String Name given to the device
updated_on Timestamp The timestamp when the device was updated
created_on Timestamp The timestamp of when the device was created
connected Boolean The state whether the device is connected to RIoT
gateway_euid String The MAC address of the of the gateway under which the device is mapped
device_type String The type of device
blacklisted Boolean Whether the device is blacklisted by user
device_vdzg_info Array Information regarding group zone domain of the device
custom Array
network_mac String Mac address of the radio device is mapped
lqi Integer link quality index
wired_device Boolean Whether it is a wired device
network_type String Type of network of device
device_euid String Mac address of the device
rssi Integer singal strength
last_seen Integer epoch time when the device last communicated
has_install_code Integer Whether this device is secured with a network key

If the blacklisted value is true. Then there will be no communication between the device anf the controller. By default the device type will be SENSOR. After the device communicates the device type will be updated to either LIGHT, LOCK, SWITCH or SMART_PLUG.

Expected status codes

Status Code Explanation
200 Request is processed successfully
401 Invalid token
404 Devices not found in RIoT
500 Critical Server Error
curl -X GET -H "Authorization: Token {{auth_token}}" "{{host}}/app/v1/device/search?search_string=bl&limit=10"
GET %7B%7Bhost%7D%7D/app/v1/device/search?search_string=bl&limit=10 HTTP/1.1
Host: 
Authorization: Token {{auth_token}}
Status404 Not Found
AllowGET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
Connectionclose
Content-Length103
Content-Typeapplication/json
DateWed, 26 Jul 2017 11:47:27 GMT
Servergunicorn/19.6.0
VaryCookie
X-Frame-OptionsSAMEORIGIN
{
    "code": 404,
    "http_code": 404,
    "developer_message": null,
    "message": "Devices not found",
    "http_message": null
}
Status200 OK
AllowGET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Length1144
Content-Typeapplication/json
DateTue, 25 Jul 2017 10:53:17 GMT
ServerWSGIServer/0.2 CPython/3.5.2
VaryCookie
X-Frame-OptionsSAMEORIGIN
{
    "meta": {
        "total_count": 1,
        "offset": 0,
        "limit": 10,
        "query": "{'search_string': ['plu']}"
    },
    "data": [
        {
            "device_vdzg_info": [
                {
                    "gateway_iot_networks": [
                        {
                            "set_network_type": "zigbee",
                            "get_network_type": "zigbee"
                        }
                    ],
                    "gateway_ip_networks": [
                        {
                            "domain_id": "NA",
                            "ctl_host": "NA",
                            "zone_id": "NA",
                            "apgroup_id": "NA"
                        }
                    ]
                }
            ],
            "device_type": "Smart plug",
            "device_euid": "00:0B:57:FF:FE:1B:3B:64",
            "device_name": "plug",
            "device_zcl_capability": {
                "1": {
                    "0x0000": {
                        "attributes": [
                            {
                                "ui_is_show": true,
                                "ui_control_id": "0",
                                "access": 0,
                                "reported_value": "0x00",
                                "ui_unit": "na",
                                "attribute_name": "PowerSource",
                                "ui_range_max": 0.0,
                                "attribute_id": "0x0007",
                                "ui_validator_regex": "na",
                                "ui_data_type": "string",
                                "ui_range_min": 0.0
                            },
                            {
                                "ui_is_show": false,
                                "ui_control_id": "1",
                                "access": 0,
                                "reported_value": "0x53696C69636F6E4C616273",
                                "ui_unit": "na",
                                "attribute_name": "Manufacturer Name",
                                "ui_range_max": 0.0,
                                "attribute_id": "0x0004",
                                "ui_validator_regex": "na",
                                "ui_data_type": "string",
                                "ui_range_min": 0.0
                            },
                            {
                                "ui_is_show": false,
                                "ui_control_id": "1",
                                "access": 0,
                                "reported_value": "0x00",
                                "ui_unit": "na",
                                "attribute_name": "HWVersion",
                                "ui_range_max": 0.0,
                                "attribute_id": "0x0003",
                                "ui_validator_regex": "na",
                                "ui_data_type": "int",
                                "ui_range_min": 0.0
                            },
                            {
                                "ui_is_show": false,
                                "ui_control_id": "1",
                                "access": 0,
                                "reported_value": "0x536D6172744F75746C6574",
                                "ui_unit": "na",
                                "attribute_name": "ModelIdentifier",
                                "ui_range_max": 0.0,
                                "attribute_id": "0x0005",
                                "ui_validator_regex": "na",
                                "ui_data_type": "string",
                                "ui_range_min": 0.0
                            }
                        ],
                        "parent_command": "zcl basic",
                        "commands": {
                            "0x00": {
                                "ui_is_show": "TRUE",
                                "ui_control_id": "11",
                                "params": [],
                                "ui_unit": "na",
                                "ui_args": [],
                                "command_description": "Reset to Factory Defaults",
                                "ui_validator_regex": "na",
                                "sub_command": "rtfd",
                                "ui_data_type": "string",
                                "ui_range_min": "0",
                                "ui_range_max": "0"
                            }
                        }
                    },
                    "0x0702": {
                        "0x0000": {
                            "reported_value": {
                                "value": "0x000000000000"
                            },
                            "reported_on": "2018-10-23T09:43:58.003000"
                        }
                    },
                    "0x0B04": {
                        "0x0505": {
                            "reported_value": {
                                "value": "0xCE08"
                            },
                            "reported_on": "2018-10-23T09:44:47.767000"
                        },
                        "0x0508": {
                            "reported_value": {
                                "value": "0x0000"
                            },
                            "reported_on": "2018-10-23T09:43:42.478000"
                        }
                    },
                    "0x0400": {
                        "attributes": [
                            {
                                "ui_is_show": true,
                                "ui_control_id": "1",
                                "access": 0,
                                "reported_value": "0xD369",
                                "ui_unit": "na",
                                "attribute_name": "MeasuredValue",
                                "ui_range_max": 0.0,
                                "attribute_id": "0x0000",
                                "ui_validator_regex": "na",
                                "ui_data_type": "string",
                                "ui_range_min": 0.0
                            }
                        ],
                        "parent_command": "",
                        "commands": []
                    },
                    "0x0405": {
                        "attributes": [
                            {
                                "ui_is_show": true,
                                "ui_control_id": "1",
                                "access": 2,
                                "reported_value": "0x4310",
                                "ui_unit": "na",
                                "attribute_name": "MeasuredValue",
                                "ui_range_max": 0.0,
                                "attribute_id": "0x0000",
                                "ui_validator_regex": "na",
                                "ui_data_type": "string",
                                "ui_range_min": 0.0
                            }
                        ],
                        "parent_command": "",
                        "commands": []
                    },
                    "0x0402": {
                        "attributes": [
                            {
                                "ui_is_show": true,
                                "ui_control_id": "1",
                                "access": 2,
                                "reported_value": "0x570B",
                                "ui_unit": "na",
                                "attribute_name": "MeasuredValue",
                                "ui_range_max": 0.0,
                                "attribute_id": "0x0000",
                                "ui_validator_regex": "na",
                                "ui_data_type": "string",
                                "ui_range_min": 0.0
                            }
                        ],
                        "parent_command": "",
                        "commands": []
                    }
                }
            },
            "lqi": 255,
            "last_seen": 1540287843,
            "updated_on": "2018-10-23T09:44:06.361000",
            "gateway_euid": "D8:38:FC:22:22:10",
            "blacklisted": false,
            "created_on": "2018-10-23T09:06:55.036000",
            "device_tags": [
                "plug",
                "00:0B:57:FF:FE:1B:3B:64"
            ],
            "rssi": -31,
            "connected": true
        }
    ]
}

Single Device

This endpoint is a token-auth protected endpoint.

This endpoint is used to get the details of a device requested under the account. The URL should contain the device’s euid.

{{host}}app/v1/device/{device_euid}

Response Key Explanation

Key Type Explanation
device_tags Array Tags assigned to the device
device_name String Name given to the device
updated_on Timestamp The timestamp when the device was updated
created_on Timestamp The timestamp of when the device was created
connected Boolean The state whether the device is connected to RIoT
gateway_euid String The MAC address of the of the gateway under which the device is mapped
device_type String The type of device
blacklisted Boolean Whether the device is blacklisted by user
device_vdzg_info Array Information regarding group zone domain of the device
custom Array
network_mac String Mac address of the radio device is mapped
lqi Integer link quality index
wired_device Boolean Whether it is a wired device
network_type String Type of network of device
device_euid String Mac address of the device
rssi Integer singal strength
last_seen Integer epoch time when the device last communicated
has_install_code Integer Whether this device is secured with a network key
device_zcl_capability Dictionary Contains information of the Attributes supported by the device

The device zcl capability is available only after the device has communicated with the RIoT controller. The contents of the device capability is as below:

{ “device_zcl_capability”: { “device_endpoint”: { “cluster_id”: { “parent_command”: “Parent command of this zigbee cluster”, “attributes”: [ { “reported_value_name”: “Undefined”, “attribute_name”: “IdentifyTime “, “reported_value”: { “value”: “Value received by device” }, “attribute_id”: “0x0000” } ], “commands”: { “command_id”: { “sub_command”: “ez-mode”, “params”: [ { “parameter 1”: “default value “ } ], “command_description”: “Description of this command” } } } } } }

If the blacklisted value is true. Then there will be no communication between the device anf the controller. By default the device type will be SENSOR. After the device communicates the device type will be updated to either LIGHT, LOCK, SWITCH or SMART_PLUG.

Expected status codes

Status Code Explanation
200 Request is processed successfully
401 Invalid token
404 Devices not found in RIoT
500 Critical Server Error
curl -X GET -H "Authorization: Token {{auth_token}}" "{{host}}/app/v1/device/84:18:26:00:00:07:AB:55"
GET %7B%7Bhost%7D%7D/app/v1/device/84:18:26:00:00:07:AB:55 HTTP/1.1
Host: 
Authorization: Token {{auth_token}}
Status200 OK
AllowGET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Length1144
Content-Typeapplication/json
DateTue, 25 Jul 2017 10:53:17 GMT
ServerWSGIServer/0.2 CPython/3.5.2
VaryCookie
X-Frame-OptionsSAMEORIGIN
{
    "device_name": "Demo Test Device",
    "device_type": "SENSOR",
    "device_capability": {
        "LIGHT": {
            "attributes": {
                "BRIGHTNESS": {
                    "configured_value": {
                        "level": 255
                    },
                    "reported_value": {
                        "level": 254
                    }
                },
                "STATE": {
                    "configured_value": {
                        "on": 0
                    },
                    "reported_value": {
                        "on": 1
                    }
                }
            }
        }
    },
    "created_on": "2017-05-31T12:34:31.400000Z",
    "updated_on": "2017-06-02T11:02:26.059000Z",
    "connected": true,
    "device_euid": "84:18:26:00:00:07:AB:55",
    "device_tags": [
        "121",
        "some-tag"
    ],
    "gateway_euid": "D8:38:FC:25:BB:60"
}
Status404 Not Found
AllowGET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Length126
Content-Typeapplication/json
DateTue, 25 Jul 2017 11:42:08 GMT
ServerWSGIServer/0.2 CPython/3.5.2
VaryCookie
X-Frame-OptionsSAMEORIGIN
{
    "http_message": null,
    "message": "Device 84:18:26:00:00:07:AB:89 not found",
    "http_code": 404,
    "code": 404,
    "developer_message": null
}

Create Device

This endpoint is a token-auth protected endpoint.

This endpoint is used to manually add a single device by providing required details for the device.

Request Key Explanation

Key Type Explanation
device_tags Array (optional) Tags to be assigned to the device
device_name String Name given to the device
device_euid String The MAC address or the identifier of the device
gateway_euid String The MAC address of the gateway under which the device is mapped
network_mac String (optional)The MAC address of the radio under which the device is mapped
network_type String (optional)Network type of device
blacklist Boolean (optional)Whether device is blacklisted
install_code String (optional)Network key of this device

The device_name field can accept only a-zA-Z0-9 .:_- characters. By default, the device_name and the device_euid of the gateway will be added to the tags. The gateway_euid is mandatory while adding the device. It should be a valid gateway which exists in RIoT controller.network_mac, blacklist, install_code and network_type are optional fields. If any other fields are passed the endpoint will return error 400 Bad Request.

Response Key Explanation

Key Type Explanation
device_tags Array Tags assigned to the device
device_name String Name given to the device
updated_on Timestamp The timestamp when the device was updated
created_on Timestamp The timestamp of when the device was created
connected Boolean The state whether the device is connected to RIoT
gateway_euid String The MAC address of the gateway under which the device is mapped
device_type String The type of device
blacklisted Boolean Whether the device is blacklisted by user

After the device communicates with it’s attributes to RIoT, the details of the device will be available as seen in the All Devices API.

Expected status codes

Status Code Explanation
201 Device created successfully
400 Error in API body or validation failed for data provided
401 Invalid token
409 Device already exists with same device_euid
500 Critical Server Error
curl -X POST -H "Content-Type: application/json" -H "Authorization: Token {{auth_token}}" -d '{
  "device_euid":"00:0D:6F:00:05:24:20:CE",
  "device_name":"IBM Bulb 1",
  "install_code":"MTEgMDEgMDMgNTMgNTQgOTAgMDQgRDM=",
  "gateway_euid":"D8:38:FC:25:BB:60",
  "device_tags":["Sample Tag"],
  "network_mac":"90:FD:9F:FF:FE:0C:89:36",
  "network_type":"zigbee"
}' "{{host}}/app/v1/device"
POST %7B%7Bhost%7D%7D/app/v1/device HTTP/1.1
Host: 
Content-Type: application/json
Authorization: Token {{auth_token}}

{
  "device_euid":"00:0D:6F:00:05:24:20:CE",
  "device_name":"IBM Bulb 1",
  "install_code":"MTEgMDEgMDMgNTMgNTQgOTAgMDQgRDM=",
  "gateway_euid":"D8:38:FC:25:BB:60",
  "device_tags":["Sample Tag"],
  "network_mac":"90:FD:9F:FF:FE:0C:89:36",
  "network_type":"zigbee"
}
Status400 Bad Request
Access-Control-Allow-Origin*
AllowGET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Length189
Content-Typeapplication/json
DateTue, 25 Jul 2017 12:10:30 GMT
ServerWSGIServer/0.2 CPython/3.5.2
VaryCookie
X-Frame-OptionsSAMEORIGIN
{
    "http_message": null,
    "http_code": 400,
    "message": "Invalid data for fields {'device_euid': ['Device EUID invalid'], 'gateway_euid': ['Gateway not found']}",
    "developer_message": null,
    "code": 400
}
Status201 Created
Access-Control-Allow-Origin*
AllowGET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Length239
Content-Typeapplication/json
DateTue, 25 Jul 2017 12:09:46 GMT
ServerWSGIServer/0.2 CPython/3.5.2
VaryCookie
X-Frame-OptionsSAMEORIGIN
{
    "device_type": "SENSOR",
    "device_name": "Sample Device",
    "device_euid": "84:18:26:00:00:07:AB:50",
    "gateway_euid": "D8:38:FC:25:BB:60",
    "device_tags": [
        "Sample Tag"
    ],
    "created_on": "2017-07-25T12:09:46.271772",
    "connected": false,
    "updated_on": "Never"
}

Update Device

This endpoint is a token-auth protected endpoint.

This endpoint is used to edit a single device by providing required details for the device. The URL should contain the devices’ euid

{{host}}app/v1/device/{device_euid}

Once the device is added the device_euid field cannot be modified. If any wrong device_euid is added then delete the particular device and add it again.

Request Key Explanation

Key Type Explanation
device_tags Array (optional) Tags to be assigned to the device
device_name String (optional) Name given to the device
gateway_euid String (optional) The new gateway under which the device should be shifted to
blacklist Boolean (optional) To blacklist the particular device from any communication with RIoT

The device_name field can accept only a-zA-Z0-9 .:_- characters. Only the field which need to be edited can be passed to the endpoint. There are no mandatory fields.

If device tags are not mentioned in the body it will retain the previous tags else it will overwrite the previous tags.

The endpoint accepts only device_tags, device_name, blacklist and gateway_euid. If any other fields are passed the endpoint will return error 400 Bad Request.

Response Key Explanation

Key Type Explanation
device_tags Array Tags assigned to the device
device_name String Name given to the device
updated_on Timestamp The timestamp when the device was updated
created_on Timestamp The timestamp of when the device was created
connected Boolean The state whether the device is connected to RIoT
gateway_euid String The MAC address of the gateway under which the device is mapped

After the device communicates with it’s settings to RIoT, the details of the device will be available as seen in the All Devices API.

Expected status codes

Status Code Explanation
200 Device edited successfully
400 Error in API body or validation failed for data provided
404 Device not found
401 Invalid token
500 Critical Server Error
curl -X PUT -H "Content-Type: application/json" -H "Authorization: Token {{auth_token}}" -d '{
  "device_name": "Light",
  "gateway_euid": "EC:8C:A2:37:03:A0",
  "device_tags":["123","some-tag"],
  "blacklist": false
}' "{{host}}/app/v1/device/84:18:26:00:00:07:AB:58"
PUT %7B%7Bhost%7D%7D/app/v1/device/84:18:26:00:00:07:AB:58 HTTP/1.1
Host: 
Content-Type: application/json
Authorization: Token {{auth_token}}

{
  "device_name": "Light",
  "gateway_euid": "EC:8C:A2:37:03:A0",
  "device_tags":["123","some-tag"],
  "blacklist": false
}
Status404 Not Found
Access-Control-Allow-Origin*
AllowGET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Length126
Content-Typeapplication/json
DateTue, 25 Jul 2017 12:22:01 GMT
ServerWSGIServer/0.2 CPython/3.5.2
VaryCookie
X-Frame-OptionsSAMEORIGIN
{
    "http_message": null,
    "http_code": 404,
    "message": "Device 84:18:26:00:00:07:AB:52 not found",
    "developer_message": null,
    "code": 404
}
Status200 OK
Access-Control-Allow-Origin*
AllowGET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Length236
Content-Typeapplication/json
DateTue, 25 Jul 2017 12:12:28 GMT
ServerWSGIServer/0.2 CPython/3.5.2
VaryCookie
X-Frame-OptionsSAMEORIGIN
{
    "device_type": "SENSOR",
    "device_name": "Light",
    "device_euid": "84:18:26:00:00:07:AB:58",
    "gateway_euid": "D8:38:FC:25:BB:60",
    "device_tags": [
        "123",
        "some-tag"
    ],
    "created_on": "2017-07-21T13:11:38.660000Z",
    "connected": false,
    "updated_on": "Never"
}
Status404 Not Found
Access-Control-Allow-Origin*
AllowGET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Length121
Content-Typeapplication/json
DateTue, 25 Jul 2017 12:15:07 GMT
ServerWSGIServer/0.2 CPython/3.5.2
VaryCookie
X-Frame-OptionsSAMEORIGIN
{
    "http_message": null,
    "http_code": 404,
    "message": "Gateway D8:38:FC:25:BB:62 not found",
    "developer_message": null,
    "code": 404
}

Delete Device

This endpoint is a token-auth protected endpoint.

This endpoint is used to delete a single device by providing required details for the device. The URL should contain the gateways’ euid

{{host}}app/v1/device/{device_euid}

Once the device is deleted it will be available to all the gateways in the network to join again. The device can join only the gateway with the network supported by the device.

Devices once deleted cannot be retrieved.

The endpoint accepts nothing in the API body.

Expected status codes

Status Code Explanation
204 Device deleted successfully
404 Device not found
401 Invalid token
500 Critical Server Error
curl -X DELETE -H "Authorization: Token {{auth_token}}" -H "Content-Type: application/json" "{{host}}/app/v1/device/00:0D:6F:00:03:1D:85:5F"
DELETE %7B%7Bhost%7D%7D/app/v1/device/00:0D:6F:00:03:1D:85:5F HTTP/1.1
Host: 
Authorization: Token {{auth_token}}
Content-Type: application/json
Status200 OK
Access-Control-Allow-Origin*
AllowGET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Length0
DateTue, 25 Jul 2017 12:19:25 GMT
ServerWSGIServer/0.2 CPython/3.5.2
VaryCookie
X-Frame-OptionsSAMEORIGIN
Status404 Not Found
Access-Control-Allow-Origin*
AllowGET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Length126
Content-Typeapplication/json
DateTue, 25 Jul 2017 12:20:10 GMT
ServerWSGIServer/0.2 CPython/3.5.2
VaryCookie
X-Frame-OptionsSAMEORIGIN
{
    "http_message": null,
    "http_code": 404,
    "message": "Device 84:18:26:00:00:07:AB:52 not found",
    "developer_message": null,
    "code": 404
}

Patch Add Device

curl -X PATCH -H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW" -H "Authorization: Token {{auth_token}}" -F "filename=" "{{host}}/app/v1/device?op=add"
PATCH %7B%7Bhost%7D%7D/app/v1/device?op=add HTTP/1.1
Host: 
Authorization: Token {{auth_token}}
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW

----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="filename"


----WebKitFormBoundary7MA4YWxkTrZu0gW

Patch Update Device

curl -X PATCH -H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW" -H "Authorization: Token {{auth_token}}" -F "filename=" "{{host}}/app/v1/device?op=update"
PATCH %7B%7Bhost%7D%7D/app/v1/device?op=update HTTP/1.1
Host: 
Authorization: Token {{auth_token}}
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW

----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="filename"


----WebKitFormBoundary7MA4YWxkTrZu0gW

Patch Delete Device

curl -X PATCH -H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW" -H "Authorization: Token {{auth_token}}" -F "filename=" "{{host}}/app/v1/device?op=delete"
PATCH %7B%7Bhost%7D%7D/app/v1/device?op=delete HTTP/1.1
Host: 
Authorization: Token {{auth_token}}
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW

----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="filename"


----WebKitFormBoundary7MA4YWxkTrZu0gW

Device Capability

These are the set of APIs which control the IoT devices via the RIoT gateway.

Device Management

These are the set of APIs to do operations on the device. In RIoT, devices refer to the IoT devices/endpoints in the IoT network environment. These device APIs can be used to control a single device or a group of devices. These API accept a set of values in the HTTP body. Every value is validated and then processed by the API.

Device Scan

These are the set of APIs which communicate to the RIoT gateway for scan related operations. Using these APIs we can start and stop scanning for devices.

Get Scan List

This endpoint is a token-auth protected endpoint.

This endpoint is used to get the list of devices scanned by the gateway during the device scan operation. The URL should contain the gateways’ euid.

{{host}}app/v1/gateway/scan

The API will return the list of devices scanned. The scan list will get refreshed every 4 minutes. The devices will be removed from the list once they are discovered after a duration of 12 hours. For adding more devices, initiate the device scan operation for the gateway again. Expected status codes

Status Code Explanation
200 Gateway command queued successfully
404 Gateway not found
401 Invalid token
500 Critical Server Error
curl -X GET -H "Authorization: Token {{auth_token}}" "{{host}}/app/v1/gateway/scan"
GET %7B%7Bhost%7D%7D/app/v1/gateway/scan HTTP/1.1
Host: 
Authorization: Token {{auth_token}}
Status200 OK
{
    "device_list": {
        "0C:F4:D5:1C:52:50": [
            {
                "device_euid": "7C:B0:3E:AA:00:A4:50:08",
                "gateway_euid": "0C:F4:D5:1C:52:50",
                "manufacturer_name": "OSRAM",
                "device_serial": "11111111"
            }
        ]
    },
    "gateway_names": [
        "RuckusAP_02"
    ],
    "is_scanning": true,
    "scan_duration": 720,
    "scan_start_time": "1531131353.056579"
}

Start Scan for Device

This endpoint is a token-auth protected endpoint.

This endpoint is used initiate the device scan operation for one or more gateways.

{{host}}app/v1/gateway/scan/start

The API will start the device scan operation for the specified gateway(s). Once the command is initiated, new devices which are not in RIoT will respond to the particular gateway.

Request Key Explanation

Key Type Explanation
gateway_euid String Mac address of the gateway
value String On

Expected status codes

Status Code Explanation
200 Gateway command queued successfully
400 Error in the data provided
404 Gateway not found
401 Invalid token
500 Critical Server Error
curl -X PATCH -H "Content-Type: application/json" -H "Authorization: Token {{auth_token}}" -d '[{
"gateway_euid":"EC:8C:A2:37:03:A0",
"value":"ON"
},
{
"gateway_euid":"0C:F4:D5:1C:52:50",
"value":"ON"
}]' "{{host}}/app/v1/gateway/scan/start"
PATCH %7B%7Bhost%7D%7D/app/v1/gateway/scan/start HTTP/1.1
Host: 
Content-Type: application/json
Authorization: Token {{auth_token}}

[{
"gateway_euid":"EC:8C:A2:37:03:A0",
"value":"ON"
},
{
"gateway_euid":"0C:F4:D5:1C:52:50",
"value":"ON"
}]

Stop Scan for Device

This endpoint is a token-auth protected endpoint.

This endpoint is used stop the device scan operation for all gateways.

Expected status codes

Status Code Explanation
200 Gateway command queued successfully
400 Error in the data provided
404 Gateway not found
401 Invalid token
500 Critical Server Error
curl -X POST -H "Content-Type: application/json" -H "Authorization: Token {{auth_token}}" "{{host}}/app/v1/gateway/scan/stop"
POST %7B%7Bhost%7D%7D/app/v1/gateway/scan/stop HTTP/1.1
Host: 
Content-Type: application/json
Authorization: Token {{auth_token}}

Device ZCL Capablity

Get ZCL Capabilites

This endpoint is a token-auth protected endpoint.

This endpoint is used to get the capabilities supported by the device which have communicated with the RIoT controller. The URL should contain the device’s euid

{{host}}app/v1/device/{device_euid}/capability

Response Key Explanation

Key Type Explanation
supported_capabilities Array Capabilities supported by the device

{ “supported_zcl_capability”: [ { “endpoint”: [ “Array of supported clusters” ] } ] }

If the device has not communicated with the RIoT controller, an empty list will be returned.

The endpoint accepts nothing in the API body.

Expected status codes

Status Code Explanation
200 Device capabilities read successfully
401 Invalid token
500 Critical Server Error
curl -X GET -H "Authorization: Token {{auth_token}}" "{{host}}/app/v1/device/84:18:26:00:00:07:AB:55/capability"
GET %7B%7Bhost%7D%7D/app/v1/device/84:18:26:00:00:07:AB:55/capability HTTP/1.1
Host: 
Authorization: Token {{auth_token}}
Status200 OK
AllowGET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Length47
Content-Typeapplication/json
DateTue, 25 Jul 2017 12:23:46 GMT
ServerWSGIServer/0.2 CPython/3.5.2
VaryCookie
X-Frame-OptionsSAMEORIGIN
{
    "supported_zcl_capability": [
        {
            "0x0008": [
                "0x00",
                "0x01"
            ]
        }
    ]
}

Set ZCL Capability

This endpoint is a token-auth protected endpoint.

This endpoint is used to control the device. The URL should contain the device’s euid

{{host}}app/v1/device/{device_euid}/zclcapability/

The device can be controlled by this API. The device should have communicated prior of controlling the state. Also the capability should be supported by the device for the operation to happen.

Request Key Explanation

Key Type Explanation
endpoint_id String Endpoint ID of the device
cluster_id String Cluster ID of the device on which operation is being carried out
parent_command String Parent Command of the cluster on which operation is being carried out
command_id String Command ID of the command which is being carried out
params Dict Params needed for this command
sub_command String This field is optional for those commands which are defined in the RIoT specification. User needs to provide the sub_command in the request payload only for those commands which are alien to the RIoT specification.

The endpoint accepts only the above mentioned fields in the body. If any other fields are passed the endpoint will return error 400 Bad Request.

Expected status codes

Status Code Explanation
200 Device command queued successfully
400 Error in API body or validation failed for data provided
404 Device not found
401 Invalid token
500 Critical Server Error
curl -X PUT -H "Content-Type: application/json" -H "Authorization: Token {{auth_token}}" -d '{
  "endpoint_id": "1",
  "cluster_id": "0x0101",
  "command_id": "0x00",
  "parent_command": "zcl lock",
  "params": {
    "pin": "{1234}"
  }
}' "{{host}}/app/v1/device/00:0D:6F:00:05:24:20:CE/zclcapability"
PUT %7B%7Bhost%7D%7D/app/v1/device/00:0D:6F:00:05:24:20:CE/zclcapability HTTP/1.1
Host: 
Content-Type: application/json
Authorization: Token {{auth_token}}

{
  "endpoint_id": "1",
  "cluster_id": "0x0101",
  "command_id": "0x00",
  "parent_command": "zcl lock",
  "params": {
    "pin": "{1234}"
  }
}
Status200 OK
Access-Control-Allow-Origin*
AllowGET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Length21
Content-Typeapplication/json
DateTue, 25 Jul 2017 12:46:23 GMT
ServerWSGIServer/0.2 CPython/3.5.2
VaryCookie
X-Frame-OptionsSAMEORIGIN
{
    "parent_command": "zcl level-control",
    "command_id": "0x00",
    "endpoint_id": "1",
    "cluster_id": "0x0008",
    "params": {
        "level": 100
    }
}
Status400 Bad Request
{
    "http_message": null,
    "http_code": 400,
    "message": "STATE capability is not supported by this device",
    "developer_message": null,
    "code": 400
}

ZCL Attribute Read Value

This endpoint is a token-auth protected endpoint.

This endpoint is used to get the last updated value of a cluster_id-attribute_id combination of a device which has communicated with the RIoT controller. This also requests the device to read the latest value for a cluster_id-attribute_id combination. The URL should contain the device’s euid

{{host}}app/v1/device/{device_euid}/zclattribute?clust_id=0x0000&attr_id=0x0000&endpoint_id=1

Response Key Explanation

Key Type Explanation
endpoint_id String endpoint supported by the device
cluster_id String hexadecimal string of the cluster Id
attribute_id String hexadecimal string of the attribute Id
reported_value Dictionary dictionary has device reported value
reported_value_name String name of the reported value
{
“endpoint_id”: “1”,
“reported_value_name”: “Undefined”,
“attribute_id”: “0x0000”,
“cluster_id”: “0x0000”,
“reported_value”: {
“value”: “0x02”
}
}

The endpoint accepts nothing in the API body.

Expected status codes

Status Code Explanation
200 Device capabilities read successfully
401 Invalid token
500 Critical Server Error
curl -X GET -H "Content-Type: application/json" -H "Authorization: Token {{auth_token}}" "{{host}}/app/v1/device/28:6D:97:00:01:08:38:4B/zclattribute?clust_id=0x0000&attr_id=0x0000&endpoint_id=1"
GET %7B%7Bhost%7D%7D/app/v1/device/28:6D:97:00:01:08:38:4B/zclattribute?clust_id=0x0000&attr_id=0x0000&endpoint_id=1 HTTP/1.1
Host: 
Content-Type: application/json
Authorization: Token {{auth_token}}

ZCL Attribute Write Value

This endpoint is a token-auth protected endpoint.

This endpoint is used to control the device by writing on a particular Cluster ID-Attribute ID combination. The URL should contain the device’s euid

{{host}}app/v1/device/{device_euid}/zclattribute

The device can be controlled by this API. The device should have communicated prior of controlling the state. Also the capability should be supported by the device for the operation to happen.

Request Key Explanation

Key Type Explanation
endpoint_id String Endpoint ID of the device
cluster_id String Cluster ID of the device on which operation is being carried out
attribute_id String Attribute ID of the cluster on which operation is being carried out
data String Value which is being set for this Cluster ID- Attribute ID combination
is_private Boolean It is False by default for standard ZigBee commands. For executing private ZigBee commands on a device, user needs to pass this field with value True.
data_type String This field is optional for those Cluster ID- Attribute ID combinations which are defined in the RIoT specification. User needs to provide the data_type of the attribute for writing data on those Cluster ID- Attribute ID combinations which are alien to the RIoT specification.
data_type_id String This field is optional for those Cluster ID- Attribute ID combinations which are defined in the RIoT specification. User needs to provide the data_type_id of the attribute for writing data on those Cluster ID- Attribute ID combinations which are alien to the RIoT specification.

The endpoint accepts only the above mentioned fields in the body. If any other fields are passed the endpoint will return error 400 Bad Request.

Expected status codes

Status Code Explanation
200 Device command queued successfully
400 Error in API body or validation failed for data provided
404 Device not found
401 Invalid token
500 Critical Server Error
curl -X PUT -H "Content-Type: application/json" -H "Authorization: Token {{auth_token}}" -d '{
    "endpoint_id": "1",
    "cluster_id": "0x0202",
    "attribute_id": "0x0000",
    "data": "0x06",
    "is_private": false
}


' "{{host}}/app/v1/device/24:FD:5B:00:01:08:74:FE/zclattribute"
PUT %7B%7Bhost%7D%7D/app/v1/device/24:FD:5B:00:01:08:74:FE/zclattribute HTTP/1.1
Host: 
Content-Type: application/json
Authorization: Token {{auth_token}}

{
    "endpoint_id": "1",
    "cluster_id": "0x0202",
    "attribute_id": "0x0000",
    "data": "0x06",
    "is_private": false
}



Events

Events serach string

curl -X GET -H "Authorization: Token {{auth_token}}" "{{host}}/app/v1/insights?line_num=100&search_string=responding"
GET %7B%7Bhost%7D%7D/app/v1/insights?line_num=100&search_string=responding HTTP/1.1
Host: 
Authorization: Token {{auth_token}}
Status0
{
    "data": [
        {
            "gateway_euid": "EC:8C:A2:33:B6:30",
            "event_name": "vSZ Link Status",
            "event_id": "2",
            "datetime": "2019-06-10 05:23:12.157128",
            "event_message": "Reboot of AP"
        },
        {
            "gateway_euid": "30:87:D9:14:79:90",
            "event_name": "vSZ Link Status",
            "event_id": "2",
            "datetime": "2019-06-10 12:56:03.471436",
            "event_message": "Reboot of AP"
        },
        {
            "gateway_euid": "EC:8C:A2:33:B6:30",
            "event_name": "vSZ Link Status",
            "event_id": "2",
            "datetime": "2019-06-10 12:56:55.355791",
            "event_message": "Reboot of AP"
        },
        {
            "gateway_euid": "EC:8C:A2:33:B6:30",
            "event_name": "vSZ Link Status",
            "event_id": "2",
            "datetime": "2019-06-10 13:34:25.290113",
            "event_message": "Reboot of AP"
        },
        {
            "gateway_euid": "30:87:D9:14:79:90",
            "event_name": "Radio Message Delivery Failed",
            "event_id": "5",
            "datetime": "2019-06-10 13:52:14.713744",
            "event_message": "B6:8A:CF:78:B6:86:A8:38 is not responding for command '0xFF'"
        },
        {
            "gateway_euid": "30:87:D9:14:79:90",
            "event_name": "Radio Message Delivery Failed",
            "event_id": "5",
            "datetime": "2019-06-10 14:52:27.112691",
            "event_message": "B6:8A:CF:78:B6:86:A8:38 is not responding for command '0xFF'"
        },
        {
            "gateway_euid": "30:87:D9:14:79:90",
            "event_name": "Radio Message Delivery Failed",
            "event_id": "5",
            "datetime": "2019-06-10 15:42:37.477305",
            "event_message": "B6:8A:CF:78:B6:86:A8:38 is not responding for command '0xFF'"
        },
        {
            "gateway_euid": "30:87:D9:14:79:90",
            "event_name": "Radio Message Delivery Failed",
            "event_id": "5",
            "datetime": "2019-06-10 16:02:41.636623",
            "event_message": "B6:8A:CF:78:B6:86:A8:38 is not responding for command '0xFF'"
        },
        {
            "gateway_euid": "30:87:D9:14:79:90",
            "event_name": "Radio Message Delivery Failed",
            "event_id": "5",
            "datetime": "2019-06-10 17:33:00.334113",
            "event_message": "B6:8A:CF:78:B6:86:A8:38 is not responding for command '0xFF'"
        },
        {
            "gateway_euid": "30:87:D9:14:79:90",
            "event_name": "Radio Message Delivery Failed",
            "event_id": "5",
            "datetime": "2019-06-10 17:43:02.256218",
            "event_message": "B6:8A:CF:78:B6:86:A8:38 is not responding for command '0xFF'"
        },
        {
            "gateway_euid": "30:87:D9:14:79:90",
            "event_name": "Radio Message Delivery Failed",
            "event_id": "5",
            "datetime": "2019-06-10 18:43:14.641785",
            "event_message": "B6:8A:CF:78:B6:86:A8:38 is not responding for command '0xFF'"
        },
        {
            "gateway_euid": "30:87:D9:14:79:90",
            "event_name": "Radio Message Delivery Failed",
            "event_id": "5",
            "datetime": "2019-06-10 19:33:25.052287",
            "event_message": "B6:8A:CF:78:B6:86:A8:38 is not responding for command '0xFF'"
        },
        {
            "gateway_euid": "30:87:D9:14:79:90",
            "event_name": "Radio Message Delivery Failed",
            "event_id": "5",
            "datetime": "2019-06-10 20:03:31.215961",
            "event_message": "B6:8A:CF:78:B6:86:A8:38 is not responding for command '0xFF'"
        },
        {
            "gateway_euid": "30:87:D9:14:79:90",
            "event_name": "Radio Message Delivery Failed",
            "event_id": "5",
            "datetime": "2019-06-10 20:13:33.304536",
            "event_message": "B6:8A:CF:78:B6:86:A8:38 is not responding for command '0xFF'"
        },
        {
            "gateway_euid": "30:87:D9:14:79:90",
            "event_name": "Radio Message Delivery Failed",
            "event_id": "5",
            "datetime": "2019-06-10 20:23:35.345548",
            "event_message": "B6:8A:CF:78:B6:86:A8:38 is not responding for command '0xFF'"
        },
        {
            "gateway_euid": "30:87:D9:14:79:90",
            "event_name": "Radio Message Delivery Failed",
            "event_id": "5",
            "datetime": "2019-06-10 21:23:47.818735",
            "event_message": "B6:8A:CF:78:B6:86:A8:38 is not responding for command '0xFF'"
        },
        {
            "gateway_euid": "30:87:D9:14:79:90",
            "event_name": "Radio Message Delivery Failed",
            "event_id": "5",
            "datetime": "2019-06-10 23:04:08.497176",
            "event_message": "B6:8A:CF:78:B6:86:A8:38 is not responding for command '0xFF'"
        },
        {
            "gateway_euid": "30:87:D9:14:79:90",
            "event_name": "Radio Message Delivery Failed",
            "event_id": "5",
            "datetime": "2019-06-10 23:14:10.615031",
            "event_message": "B6:8A:CF:78:B6:86:A8:38 is not responding for command '0xFF'"
        },
        {
            "gateway_euid": "30:87:D9:14:79:90",
            "event_name": "Radio Message Delivery Failed",
            "event_id": "5",
            "datetime": "2019-06-11 01:04:33.318291",
            "event_message": "B6:8A:CF:78:B6:86:A8:38 is not responding for command '0xFF'"
        },
        {
            "gateway_euid": "EC:8C:A2:33:B6:30",
            "event_name": "vSZ Link Status",
            "event_id": "2",
            "datetime": "2019-06-11 07:47:56.322431",
            "event_message": "Reboot of AP"
        },
        {
            "gateway_euid": "EC:8C:A2:33:B6:30",
            "event_name": "vSZ Link Status",
            "event_id": "2",
            "datetime": "2019-06-11 07:50:28.191604",
            "event_message": "Reboot of AP"
        },
        {
            "gateway_euid": "30:87:D9:14:79:90",
            "event_name": "Radio Message Delivery Failed",
            "event_id": "5",
            "datetime": "2019-06-11 08:18:09.429762",
            "event_message": "B6:8F:0F:78:B6:8A:E8:38 is not responding for command '0xFF'"
        },
        {
            "gateway_euid": "30:87:D9:14:79:90",
            "event_name": "Radio Message Delivery Failed",
            "event_id": "5",
            "datetime": "2019-06-11 08:28:12.027576",
            "event_message": "B6:8F:0F:78:B6:8A:E8:38 is not responding for command '0xFF'"
        }
    ]
}

Events by line num

Events by line num

curl -X GET -H "Authorization: Token {{auth_token}}" "{{host}}/app/v1/insights?line_num=100"
GET %7B%7Bhost%7D%7D/app/v1/insights?line_num=100 HTTP/1.1
Host: 
Authorization: Token {{auth_token}}
Status0
{
    "data": [
        {
            "gateway_euid": "EC:8C:A2:33:B6:30",
            "event_name": "vSZ Link Status",
            "event_id": "2",
            "datetime": "2019-06-10 05:23:12.157128",
            "event_message": "Reboot of AP"
        },
        {
            "gateway_euid": "30:87:D9:14:79:90",
            "event_name": "vSZ Link Status",
            "event_id": "2",
            "datetime": "2019-06-10 12:56:03.471436",
            "event_message": "Reboot of AP"
        },
        {
            "gateway_euid": "EC:8C:A2:33:B6:30",
            "event_name": "vSZ Link Status",
            "event_id": "2",
            "datetime": "2019-06-10 12:56:55.355791",
            "event_message": "Reboot of AP"
        },
        {
            "gateway_euid": "EC:8C:A2:33:B6:30",
            "event_name": "vSZ Link Status",
            "event_id": "2",
            "datetime": "2019-06-10 13:34:25.290113",
            "event_message": "Reboot of AP"
        },
        {
            "gateway_euid": "30:87:D9:14:79:90",
            "event_name": "Radio Message Delivery Failed",
            "event_id": "5",
            "datetime": "2019-06-10 13:52:14.713744",
            "event_message": "B6:8A:CF:78:B6:86:A8:38 is not responding for command '0xFF'"
        },
        {
            "gateway_euid": "30:87:D9:14:79:90",
            "event_name": "Radio Message Delivery Failed",
            "event_id": "5",
            "datetime": "2019-06-10 14:52:27.112691",
            "event_message": "B6:8A:CF:78:B6:86:A8:38 is not responding for command '0xFF'"
        },
        {
            "gateway_euid": "30:87:D9:14:79:90",
            "event_name": "Radio Message Delivery Failed",
            "event_id": "5",
            "datetime": "2019-06-10 15:42:37.477305",
            "event_message": "B6:8A:CF:78:B6:86:A8:38 is not responding for command '0xFF'"
        },
        {
            "gateway_euid": "30:87:D9:14:79:90",
            "event_name": "Radio Message Delivery Failed",
            "event_id": "5",
            "datetime": "2019-06-10 16:02:41.636623",
            "event_message": "B6:8A:CF:78:B6:86:A8:38 is not responding for command '0xFF'"
        },
        {
            "gateway_euid": "30:87:D9:14:79:90",
            "event_name": "Radio Message Delivery Failed",
            "event_id": "5",
            "datetime": "2019-06-10 17:33:00.334113",
            "event_message": "B6:8A:CF:78:B6:86:A8:38 is not responding for command '0xFF'"
        },
        {
            "gateway_euid": "30:87:D9:14:79:90",
            "event_name": "Radio Message Delivery Failed",
            "event_id": "5",
            "datetime": "2019-06-10 17:43:02.256218",
            "event_message": "B6:8A:CF:78:B6:86:A8:38 is not responding for command '0xFF'"
        },
        {
            "gateway_euid": "30:87:D9:14:79:90",
            "event_name": "Radio Message Delivery Failed",
            "event_id": "5",
            "datetime": "2019-06-10 18:43:14.641785",
            "event_message": "B6:8A:CF:78:B6:86:A8:38 is not responding for command '0xFF'"
        },
        {
            "gateway_euid": "30:87:D9:14:79:90",
            "event_name": "Radio Message Delivery Failed",
            "event_id": "5",
            "datetime": "2019-06-10 19:33:25.052287",
            "event_message": "B6:8A:CF:78:B6:86:A8:38 is not responding for command '0xFF'"
        },
        {
            "gateway_euid": "30:87:D9:14:79:90",
            "event_name": "Radio Message Delivery Failed",
            "event_id": "5",
            "datetime": "2019-06-10 20:03:31.215961",
            "event_message": "B6:8A:CF:78:B6:86:A8:38 is not responding for command '0xFF'"
        },
        {
            "gateway_euid": "30:87:D9:14:79:90",
            "event_name": "Radio Message Delivery Failed",
            "event_id": "5",
            "datetime": "2019-06-10 20:13:33.304536",
            "event_message": "B6:8A:CF:78:B6:86:A8:38 is not responding for command '0xFF'"
        },
        {
            "gateway_euid": "30:87:D9:14:79:90",
            "event_name": "Radio Message Delivery Failed",
            "event_id": "5",
            "datetime": "2019-06-10 20:23:35.345548",
            "event_message": "B6:8A:CF:78:B6:86:A8:38 is not responding for command '0xFF'"
        },
        {
            "gateway_euid": "30:87:D9:14:79:90",
            "event_name": "Radio Message Delivery Failed",
            "event_id": "5",
            "datetime": "2019-06-10 21:23:47.818735",
            "event_message": "B6:8A:CF:78:B6:86:A8:38 is not responding for command '0xFF'"
        },
        {
            "gateway_euid": "30:87:D9:14:79:90",
            "event_name": "Radio Message Delivery Failed",
            "event_id": "5",
            "datetime": "2019-06-10 23:04:08.497176",
            "event_message": "B6:8A:CF:78:B6:86:A8:38 is not responding for command '0xFF'"
        },
        {
            "gateway_euid": "30:87:D9:14:79:90",
            "event_name": "Radio Message Delivery Failed",
            "event_id": "5",
            "datetime": "2019-06-10 23:14:10.615031",
            "event_message": "B6:8A:CF:78:B6:86:A8:38 is not responding for command '0xFF'"
        },
        {
            "gateway_euid": "30:87:D9:14:79:90",
            "event_name": "Radio Message Delivery Failed",
            "event_id": "5",
            "datetime": "2019-06-11 01:04:33.318291",
            "event_message": "B6:8A:CF:78:B6:86:A8:38 is not responding for command '0xFF'"
        },
        {
            "gateway_euid": "EC:8C:A2:33:B6:30",
            "event_name": "vSZ Link Status",
            "event_id": "2",
            "datetime": "2019-06-11 07:47:56.322431",
            "event_message": "Reboot of AP"
        },
        {
            "gateway_euid": "EC:8C:A2:33:B6:30",
            "event_name": "vSZ Link Status",
            "event_id": "2",
            "datetime": "2019-06-11 07:50:28.191604",
            "event_message": "Reboot of AP"
        },
        {
            "gateway_euid": "30:87:D9:14:79:90",
            "event_name": "Radio Message Delivery Failed",
            "event_id": "5",
            "datetime": "2019-06-11 08:18:09.429762",
            "event_message": "B6:8F:0F:78:B6:8A:E8:38 is not responding for command '0xFF'"
        },
        {
            "gateway_euid": "30:87:D9:14:79:90",
            "event_name": "Radio Message Delivery Failed",
            "event_id": "5",
            "datetime": "2019-06-11 08:28:12.027576",
            "event_message": "B6:8F:0F:78:B6:8A:E8:38 is not responding for command '0xFF'"
        }
    ]
}

Gateway CRUD

These are the set of APIs which enable CRUD operations for the gateways in RIoT controller.

All Gateways

curl -X GET -H "Authorization: Token {{auth_token}}" "{{host}}/app/v1/gateway"
GET %7B%7Bhost%7D%7D/app/v1/gateway HTTP/1.1
Host: 
Authorization: Token {{auth_token}}
Status200 OK
nginx
Wed, 14 Jul 2021 05:58:44 GMT
application/json
5494
keep-alive
GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
Origin
SAMEORIGIN
SAMEORIGIN
max-age=63072000
{
    "meta": {
        "total_count": 2,
        "offset": 0,
        "query": "",
        "limit": 0
    },
    "data": [
        {
            "created_on": "2021-06-09T07:26:05.190000Z",
            "updated_on": "2021-07-09T08:02:55.066000Z",
            "st_dongle_status": false,
            "gateway_name": "RuckusAP",
            "st_hub_status": false,
            "gateway_tags": [
                "RuckusAP"
            ],
            "st_serial_number": "NA",
            "connected": false,
            "gateway_euid": "30:87:D9:14:6A:00",
            "diagnostics_info": [
                {
                    "network_stack": "EZSP",
                    "cpu_usage": "9.210000%",
                    "memory_usage": "4008 bytes",
                    "gateway_up_time": "0 days, 7:39:00",
                    "network_stack_ver": "6.9.2.256",
                    "network_type": "zigbee",
                    "ap_up_time": "NA",
                    "interface_name": "/dev/ttyUSB100",
                    "mqtt_qos": "2",
                    "network_mac": "90:FD:9F:FF:FE:7C:2D:0B"
                }
            ],
            "network_info": [
                {
                    "zb_max": 16,
                    "network_stack_version": "6.9.2.256",
                    "network_index": 2,
                    "set_network_id": "0x0000",
                    "get_network_type": "zigbee",
                    "ncp_stack_version": "6.9.2.256",
                    "dual_pan_capable": 1,
                    "iot_module": "i100",
                    "get_radio_channel": 18,
                    "legacy_zigbee_support": true,
                    "set_network_type": "zigbee",
                    "get_network_id": "0x0000",
                    "get_iot_coex": false,
                    "iot_model": "EFR32MG12",
                    "set_radio_tx_power": 16,
                    "scan_capable": false,
                    "mode_change": 1,
                    "get_radio_tx_power": 16,
                    "network_mac": "90:FD:9F:FF:FE:7C:2D:0B",
                    "get_network_ids": [
                        {
                            "legacy_zigbee_support": 1,
                            "pan_mode": "zigbee",
                            "pan_id": "0x1234",
                            "pan_index": 0,
                            "network_ext_panid": "7D:8A:74:3A:2C:27:27:96"
                        },
                        {
                            "legacy_zigbee_support": 0,
                            "pan_mode": "zigbee_aa",
                            "pan_id": "0x4E37",
                            "pan_index": 1,
                            "network_ext_panid": "1E:BE:DF:DB:68:B4:EB:C1"
                        }
                    ],
                    "set_radio_channel": 18,
                    "network_ext_id": "00:00:00:00:00:00:00:00",
                    "set_iot_coex": false,
                    "ble_max": 10,
                    "set_network_ids": [
                        {
                            "pan_id": "0x1234",
                            "legacy_zigbee_support": 1,
                            "scan_capable": false,
                            "network_ext_panid": "E6:73:0D:B2:D9:D8:EC:47",
                            "pan_index": 0,
                            "pan_mode": "zigbee"
                        },
                        {
                            "legacy_zigbee_support": 0,
                            "pan_mode": "zigbee_aa",
                            "pan_id": "0x4E37",
                            "pan_index": 1,
                            "network_ext_panid": "NA"
                        }
                    ],
                    "network_status": "Available",
                    "supported_modes": [
                        "BLE",
                        "ZIGBEE",
                        "ZIGBEE_AA",
                        "ZIGBEE_DK"
                    ]
                }
            ],
            "st_hw_version": "NA",
            "iot_firmware": [
                "1.7.2.0.17004"
            ],
            "approved": true,
            "is_supported": true,
            "device_info": {
                "rssi": 0,
                "network_id": "0x1234",
                "lqi": 0,
                "last_seen": 1625817775,
                "auth_state": 0,
                "network_mac": "90:FD:9F:FF:FE:7C:2D:0B",
                "pan_index": 0,
                "device_euid": "28:6D:97:00:01:08:38:4B"
            },
            "ip_network_info": {
                "ip": "192.168.1.4",
                "domain_id": "NA",
                "0x893E": {
                    "aggregation_interval": 2000
                },
                "set_vlan_enable": 0,
                "get_vlan_mode": "ONLINK",
                "0xFEAA": {
                    "aggregation_interval": 2000
                },
                "zone_id": "NA",
                "0x10000": {
                    "adv_interval": 200,
                    "custom_config": "01:03",
                    "vendor_type": 1,
                    "adv_beacon_type": 2
                },
                "set_vlan_mode": "ONLINK",
                "apgroup_name": "NA",
                "zone_name": "NA",
                "country_code": "US",
                "get_vlan_enable": 0,
                "0x004C": {
                    "aggregation_interval": 2000
                },
                "mac": "30:87:D9:14:6A:00",
                "domain_name": "NA",
                "ctl_host": "NA",
                "gateway_name": "RuckusAP",
                "get_vlan_id": 1,
                "dns": [
                    " 202.88.156.8"
                ],
                "netmask": "255.255.255.0",
                "model": "H510",
                "usb_power": 1,
                "apgroup_id": "NA",
                "gateway": "192.168.1.1",
                "set_vlan_id": 1,
                "0x11000": {
                    "aggregation_interval": 1000
                },
                "ap_firmware": "5.2.2.0.301"
            }
        },
        {
            "created_on": "2021-06-09T07:26:05.190000Z",
            "updated_on": "2021-07-14T05:32:27.963000Z",
            "st_dongle_status": false,
            "gateway_name": "RuckusAP",
            "st_hub_status": false,
            "gateway_tags": [
                "RuckusAP"
            ],
            "st_serial_number": "NA",
            "connected": false,
            "gateway_euid": "30:87:D9:14:6A:01",
            "diagnostics_info": [
                {
                    "network_stack": "EZSP",
                    "network_mac": "90:FD:9F:FF:FE:7C:2D:0B",
                    "interface_name": "/dev/ttyUSB100",
                    "ap_up_time": "NA",
                    "network_type": "ble",
                    "network_stack_ver": "6.9.2.256",
                    "gateway_up_time": "0 days, 7:39:00",
                    "memory_usage": "4008 bytes",
                    "mqtt_qos": "2",
                    "cpu_usage": "9.210000%"
                }
            ],
            "network_info": [
                {
                    "zb_max": 16,
                    "network_stack_version": "6.9.2.256",
                    "network_index": 2,
                    "set_network_id": "0x0000",
                    "get_network_type": "zigbee",
                    "ncp_stack_version": "6.9.2.256",
                    "dual_pan_capable": 1,
                    "get_radio_channel": 18,
                    "legacy_zigbee_support": true,
                    "set_network_type": "zigbee_dk",
                    "get_network_id": "0x0000",
                    "get_iot_coex": false,
                    "iot_model": "EFR32MG12",
                    "set_radio_tx_power": 16,
                    "scan_capable": false,
                    "mode_change": 1,
                    "iot_module": "i100",
                    "network_mac": "90:FD:9F:FF:FE:7C:2D:0B",
                    "get_network_ids": [
                        {
                            "pan_id": "0x1234",
                            "pan_mode": "zigbee_dk",
                            "legacy_zigbee_support": 1,
                            "pan_index": 0,
                            "network_ext_panid": "7D:8A:74:3A:2C:27:27:96"
                        },
                        {
                            "pan_id": "0x4E37",
                            "pan_mode": "ble",
                            "legacy_zigbee_support": 0,
                            "pan_index": 1,
                            "network_ext_panid": "1E:BE:DF:DB:68:B4:EB:C1"
                        }
                    ],
                    "set_radio_channel": 18,
                    "supported_modes": [
                        "BLE",
                        "ZIGBEE",
                        "ZIGBEE_AA",
                        "ZIGBEE_DK"
                    ],
                    "set_iot_coex": false,
                    "ble_max": 10,
                    "network_ext_id": "00:00:00:00:00:00:00:10",
                    "set_network_ids": [
                        {
                            "pan_id": "0x1214",
                            "legacy_zigbee_support": 1,
                            "scan_capable": false,
                            "network_ext_panid": "E6:73:0D:B2:D9:D8:EC:17",
                            "pan_index": 0,
                            "pan_mode": "ble"
                        },
                        {
                            "pan_id": "0x4E31",
                            "pan_mode": "zigbee_aa",
                            "legacy_zigbee_support": 0,
                            "pan_index": 1,
                            "network_ext_panid": "NA"
                        }
                    ],
                    "get_radio_tx_power": 16,
                    "network_status": "Available"
                }
            ],
            "st_hw_version": "NA",
            "iot_firmware": [
                "1.7.2.0.17004"
            ],
            "approved": true,
            "is_supported": true,
            "device_info": [],
            "ip_network_info": {
                "ip": "192.168.1.4",
                "domain_id": "NA",
                "0x893E": {
                    "aggregation_interval": 2000
                },
                "set_vlan_enable": true,
                "get_vlan_mode": "ONLINK",
                "0xFEAA": {
                    "aggregation_interval": 2000
                },
                "zone_id": "NA",
                "0x10000": {
                    "adv_interval": 200,
                    "custom_config": "01:03",
                    "vendor_type": 1,
                    "adv_beacon_type": 2
                },
                "set_vlan_mode": "ONLINK",
                "apgroup_name": "NA",
                "zone_name": "NA",
                "country_code": "US",
                "get_vlan_enable": 0,
                "0x004C": {
                    "aggregation_interval": 2000
                },
                "mac": "30:87:D9:14:6A:00",
                "domain_name": "NA",
                "ctl_host": "NA",
                "gateway_name": "RuckusAP",
                "get_vlan_id": 1,
                "dns": [
                    " 202.88.156.8"
                ],
                "netmask": "255.255.255.0",
                "model": "H510",
                "usb_power": 1,
                "apgroup_id": "NA",
                "gateway": "192.168.1.1",
                "set_vlan_id": 4,
                "0x11000": {
                    "aggregation_interval": 1000
                },
                "ap_firmware": "5.2.2.0.301"
            }
        }
    ]
}
Status401 Unauthorized
allowGET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
content-length63
content-typeapplication/json
dateMon, 04 Sep 2017 15:44:19 GMT
serverWSGIServer/0.2 CPython/3.5.2
www-authenticatetoken
x-frame-optionsSAMEORIGIN
{
    "detail": "Access Token Expired. Please refresh Access token."
}

Query Gateways

This endpoint is a token-auth protected endpoint.

This endpoint is used to get the list of gateways based on certain parameters. Any gateway(s) conforming with these parameters will be returned in the response of this endpoint.

Response Key Explanation

Key Type Explanation
gateway_tags Array Tags assigned to the gateway
gateway_name String Name given to the gateway
updated_on Timestamp The timestamp when the gateway was updated
created_on Timestamp The timestamp of when the gateway was created
connected Boolean The state whether the gateway is connected to RIoT
gateway_euid String The MAC address or the identifier of the gateway
ip_network_info Array Contains the information of the IP network
netmask String Netmask Address of the Access point
ip String IP Address of the Access point
mac String MAC Address of the Access point
dns Array Array of DNS servers of the Access point
gateway String Gateway Address of the Access point
set_vlan_id Integer Vlan ID configured by the user
domain_name String Domain Name where the Gateway is configured
country_code String Tx Power conforms values to this country
ctl_host String CTL Host where the Gateway is configured
gateway_name String Name of the gateway
domain_id String Domain Id where the Gateway is configured
zone_id String Zone ID where the Gateway is configured
set_vlan_enable Integer Whether Vlan is enabled by the user
model String Ruckus Model of the Gateway
zone_name String Zone name where the Gateway is configured
ap_firmware String AP version
usb_power Integer Whether Gateway can supply enough power for dongle
legacy_zigbee_support Boolean Whether legacy zigbee devices are supported by this AP
apgroup_name String Group Name where the Gateway is configured
get_vlan_id Integer Vlan Id of Gateway
apgroup_id String Group Id where the Gateway is configured
get_vlan_enable Integer If Vlan is enabled
network_info Array Contains information of the IoT Network
get_radio_tx_power Integer The radio TX power of the IoT Dongle
network_mac String The MAC address of the IoT Dongle
network_type String The type of IoT network either ble or zigbee
set_radio_channel Integer The radio channel of the IoT Dongle
network_id String The IoT radio network address
set_radio_tx_power Integer The radio TX power of the IoT Dongle
get_radio_channel Integer The radio channel of the IoT Dongle
get_iot_coex Boolean Whether Coex is enabled
iot_module String IoT Module of this radio
set_network_type String Network Type of this radio configured by the user
set_ble_plugins Array Plugins configured by User
zb_max Integer Max txpower value for zigbee which can be set on this radio
set_iot_coex Boolean Coex as configured by the user
mode_change Integer Whether mode can be changed for this radio
scan_capable Boolean Whether scanning is allowed for this radio
iot_model String Model of dongle for this radio
get_network_id String Network Id of this radio
ble_max Integer Max txpower value for ble which can be set on this radio
get_ble_plugins Array Ble plugins active on this radio
network_status String Whether the radio is available or not
get_network_type String Network Type of this radio
plugin_capable Boolean Wheter plugin can be enabled
set_network_id String Network Id configured by User
diagnostics_info Array Contains the diagnostics information of the gateway
memory_usage String RAM usage of the gateway
mqtt_qos String MQTT QoS set for communication to the MQTT Broker
network_type String Type of IoT network initiated
network_stack String The name of the IoT network stack
network_stack_ver String The version of the IoT network stack
ap_up_time String Time lapsed from the AP bootup
interface_name String The interface through which the IoT network is initiated
cpu_usage String The percentage use of the CPU
gateway_up_time String Time lapsed from the IoT Gateway bootup

Expected status codes

Status Code Explanation
200 Request is processed successfully
401 Invalid token
404 Gateways not found in RIoT
500 Critical Server Error
curl -X GET -H "Authorization: Token {{auth_token}}" "{{host}}/app/v1/gateway?limit=10&offset=0&connected=true&gateway_tags=auto created 0c:f4:d5:1e:3c:40&gateway_name=Auto Created 0C:F4:D5:1E:3C:40"
GET %7B%7Bhost%7D%7D/app/v1/gateway?limit=10&offset=0&connected=true&gateway_tags=auto created 0c:f4:d5:1e:3c:40&gateway_name=Auto Created 0C:F4:D5:1E:3C:40 HTTP/1.1
Host: 
Authorization: Token {{auth_token}}
Status401 Unauthorized
allowGET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
content-length63
content-typeapplication/json
dateMon, 04 Sep 2017 15:44:19 GMT
serverWSGIServer/0.2 CPython/3.5.2
www-authenticatetoken
x-frame-optionsSAMEORIGIN
{
    "detail": "Access Token Expired. Please refresh Access token."
}
Status200 OK
allowGET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
content-length3172
content-typeapplication/json
dateMon, 04 Sep 2017 15:23:47 GMT
serverWSGIServer/0.2 CPython/3.5.2
x-frame-optionsSAMEORIGIN
[
    {
        "ip_network_info": {
            "netmask": "255.255.254.0",
            "ip": "172.19.150.57",
            "mac": "EC:8C:A2:33:B6:30",
            "dns": [
                " 172.19.0.5"
            ],
            "gateway": "172.19.150.1"
        },
        "gateway_tags": [
            "Auto Created EC:8C:A2:33:B6:30",
            "EC:8C:A2:33:B6:30"
        ],
        "gateway_name": "Auto Created EC:8C:A2:33:B6:30",
        "network_info": {
            "get_radio_tx_power": "NA",
            "network_mac": "00:00:00:0B:57:1B:4F:7D",
            "network_type": "ble",
            "set_radio_channel": 0,
            "network_id": "0xFFFF",
            "set_radio_tx_power": 0,
            "get_radio_channel": "NA"
        },
        "updated_on": "2017-09-04T06:45:14.518000Z",
        "created_on": "2017-09-01T06:12:21.339000Z",
        "diagnostics_info": {
            "memory_usage": "1652 bytes",
            "mqtt_qos": "0",
            "network_type": "BLE",
            "network_stack": "SILABS",
            "network_stack_ver": "2.4",
            "ap_up_time": "0 days, 0:02:31",
            "interface_name": "/dev/ttyUSB0",
            "cpu_usage": "4.070000%",
            "gateway_up_time": "0 days, 0:00:06"
        },
        "connected": true,
        "gateway_euid": "EC:8C:A2:33:B6:30"
    },
    {
        "ip_network_info": {
            "netmask": "255.255.254.0",
            "ip": "172.19.150.52",
            "mac": "D8:38:FC:25:BB:60",
            "dns": [
                " 172.19.0.5"
            ],
            "gateway": "172.19.150.1"
        },
        "gateway_tags": [
            "Auto Created D8:38:FC:25:BB:60",
            "D8:38:FC:25:BB:60"
        ],
        "gateway_name": "Auto Created D8:38:FC:25:BB:60",
        "network_info": {
            "get_radio_tx_power": 8,
            "network_mac": "00:22:A3:00:00:17:06:E3",
            "network_type": "zigbee",
            "set_radio_channel": 0,
            "network_id": "0xAE09",
            "set_radio_tx_power": 0,
            "get_radio_channel": 15
        },
        "updated_on": "2017-09-04T06:33:37.211000Z",
        "created_on": "2017-09-04T06:25:55.980000Z",
        "diagnostics_info": {
            "memory_usage": "1908 bytes",
            "mqtt_qos": "0",
            "network_type": "ZIGBEE",
            "network_stack": "EZSP",
            "network_stack_ver": "5.10.0-36",
            "ap_up_time": "3 days, 2:03:09",
            "interface_name": "/dev/ttyUSB0",
            "cpu_usage": "0.000000%",
            "gateway_up_time": "0 days, 0:00:07"
        },
        "connected": true,
        "gateway_euid": "D8:38:FC:25:BB:60"
    },
    {
        "gateway_tags": [
            "tag",
            "Gateway Test",
            "00:0D:6F:00:33:5E"
        ],
        "gateway_name": "Gateway Test",
        "updated_on": "Never",
        "created_on": "2017-09-04T09:22:00.294000Z",
        "connected": false,
        "gateway_euid": "00:0D:6F:00:33:5E"
    },
    {
        "gateway_tags": [
            "Gateway Test 1",
            "00:0D:6F:00:33:0E"
        ],
        "gateway_name": "Gateway Test 1",
        "updated_on": "Never",
        "created_on": "2017-09-04T09:22:19.633000Z",
        "connected": false,
        "gateway_euid": "00:0D:6F:00:33:0E"
    },
    {
        "gateway_tags": [
            "Gateway Test 3",
            "00:0D:6F:00:33:AE"
        ],
        "gateway_name": "Gateway Test 3",
        "updated_on": "Never",
        "created_on": "2017-09-04T09:22:49.426000Z",
        "connected": false,
        "gateway_euid": "00:0D:6F:00:33:AE"
    },
    {
        "gateway_tags": [
            "tag3",
            "Gateway Test 4",
            "00:0D:6F:00:33:6E"
        ],
        "gateway_name": "Gateway Test 4",
        "updated_on": "Never",
        "created_on": "2017-09-04T09:23:10.395000Z",
        "connected": false,
        "gateway_euid": "00:0D:6F:00:33:6E"
    },
    {
        "gateway_tags": [
            "tag1",
            "dummy gateway",
            "08:38:FC:25:BA:60"
        ],
        "gateway_name": "dummy gateway",
        "updated_on": "Never",
        "created_on": "2017-09-04T11:11:31.716000Z",
        "connected": false,
        "gateway_euid": "08:38:FC:25:BA:60"
    },
    {
        "gateway_tags": [
            "dummy gateway 2",
            "08:38:FC:25:BA:00"
        ],
        "gateway_name": "dummy gateway 2",
        "updated_on": "Never",
        "created_on": "2017-09-04T11:11:46.901000Z",
        "connected": false,
        "gateway_euid": "08:38:FC:25:BA:00"
    },
    {
        "gateway_tags": [
            "tag4",
            "dummy gateway 2",
            "08:38:FC:25:B0:00"
        ],
        "gateway_name": "dummy gateway 2",
        "updated_on": "Never",
        "created_on": "2017-09-04T11:11:57.646000Z",
        "connected": false,
        "gateway_euid": "08:38:FC:25:B0:00"
    }
]
Status200 OK
nginx
Wed, 14 Jul 2021 05:59:22 GMT
application/json
5497
keep-alive
GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
Origin
SAMEORIGIN
SAMEORIGIN
max-age=63072000
{
    "meta": {
        "total_count": 2,
        "offset": 0,
        "query": "{}",
        "limit": 10
    },
    "data": [
        {
            "created_on": "2021-06-09T07:26:05.190000Z",
            "updated_on": "2021-07-09T08:02:55.066000Z",
            "st_dongle_status": false,
            "gateway_name": "RuckusAP",
            "st_hub_status": false,
            "gateway_tags": [
                "RuckusAP"
            ],
            "st_serial_number": "NA",
            "connected": false,
            "gateway_euid": "30:87:D9:14:6A:00",
            "diagnostics_info": [
                {
                    "network_stack": "EZSP",
                    "cpu_usage": "9.210000%",
                    "memory_usage": "4008 bytes",
                    "gateway_up_time": "0 days, 7:39:00",
                    "network_stack_ver": "6.9.2.256",
                    "network_type": "zigbee",
                    "ap_up_time": "NA",
                    "interface_name": "/dev/ttyUSB100",
                    "mqtt_qos": "2",
                    "network_mac": "90:FD:9F:FF:FE:7C:2D:0B"
                }
            ],
            "network_info": [
                {
                    "zb_max": 16,
                    "network_stack_version": "6.9.2.256",
                    "network_index": 2,
                    "set_network_id": "0x0000",
                    "get_network_type": "zigbee",
                    "ncp_stack_version": "6.9.2.256",
                    "dual_pan_capable": 1,
                    "iot_module": "i100",
                    "get_radio_channel": 18,
                    "legacy_zigbee_support": true,
                    "set_network_type": "zigbee",
                    "get_network_id": "0x0000",
                    "get_iot_coex": false,
                    "iot_model": "EFR32MG12",
                    "set_radio_tx_power": 16,
                    "scan_capable": false,
                    "mode_change": 1,
                    "get_radio_tx_power": 16,
                    "network_mac": "90:FD:9F:FF:FE:7C:2D:0B",
                    "get_network_ids": [
                        {
                            "legacy_zigbee_support": 1,
                            "pan_mode": "zigbee",
                            "pan_id": "0x1234",
                            "pan_index": 0,
                            "network_ext_panid": "7D:8A:74:3A:2C:27:27:96"
                        },
                        {
                            "legacy_zigbee_support": 0,
                            "pan_mode": "zigbee_aa",
                            "pan_id": "0x4E37",
                            "pan_index": 1,
                            "network_ext_panid": "1E:BE:DF:DB:68:B4:EB:C1"
                        }
                    ],
                    "set_radio_channel": 18,
                    "network_ext_id": "00:00:00:00:00:00:00:00",
                    "set_iot_coex": false,
                    "ble_max": 10,
                    "set_network_ids": [
                        {
                            "pan_id": "0x1234",
                            "legacy_zigbee_support": 1,
                            "scan_capable": false,
                            "network_ext_panid": "E6:73:0D:B2:D9:D8:EC:47",
                            "pan_index": 0,
                            "pan_mode": "zigbee"
                        },
                        {
                            "legacy_zigbee_support": 0,
                            "pan_mode": "zigbee_aa",
                            "pan_id": "0x4E37",
                            "pan_index": 1,
                            "network_ext_panid": "NA"
                        }
                    ],
                    "network_status": "Available",
                    "supported_modes": [
                        "BLE",
                        "ZIGBEE",
                        "ZIGBEE_AA",
                        "ZIGBEE_DK"
                    ]
                }
            ],
            "st_hw_version": "NA",
            "iot_firmware": [
                "1.7.2.0.17004"
            ],
            "approved": true,
            "is_supported": true,
            "device_info": {
                "rssi": 0,
                "network_id": "0x1234",
                "lqi": 0,
                "last_seen": 1625817775,
                "auth_state": 0,
                "network_mac": "90:FD:9F:FF:FE:7C:2D:0B",
                "pan_index": 0,
                "device_euid": "28:6D:97:00:01:08:38:4B"
            },
            "ip_network_info": {
                "ip": "192.168.1.4",
                "domain_id": "NA",
                "0x893E": {
                    "aggregation_interval": 2000
                },
                "set_vlan_enable": 0,
                "get_vlan_mode": "ONLINK",
                "0xFEAA": {
                    "aggregation_interval": 2000
                },
                "zone_id": "NA",
                "0x10000": {
                    "adv_interval": 200,
                    "custom_config": "01:03",
                    "vendor_type": 1,
                    "adv_beacon_type": 2
                },
                "set_vlan_mode": "ONLINK",
                "apgroup_name": "NA",
                "zone_name": "NA",
                "country_code": "US",
                "get_vlan_enable": 0,
                "0x004C": {
                    "aggregation_interval": 2000
                },
                "mac": "30:87:D9:14:6A:00",
                "domain_name": "NA",
                "ctl_host": "NA",
                "gateway_name": "RuckusAP",
                "get_vlan_id": 1,
                "dns": [
                    " 202.88.156.8"
                ],
                "netmask": "255.255.255.0",
                "model": "H510",
                "usb_power": 1,
                "apgroup_id": "NA",
                "gateway": "192.168.1.1",
                "set_vlan_id": 1,
                "0x11000": {
                    "aggregation_interval": 1000
                },
                "ap_firmware": "5.2.2.0.301"
            }
        },
        {
            "created_on": "2021-06-09T07:26:05.190000Z",
            "updated_on": "2021-07-14T05:32:27.963000Z",
            "st_dongle_status": false,
            "gateway_name": "RuckusAP",
            "st_hub_status": false,
            "gateway_tags": [
                "RuckusAP"
            ],
            "st_serial_number": "NA",
            "connected": false,
            "gateway_euid": "30:87:D9:14:6A:01",
            "diagnostics_info": [
                {
                    "network_stack": "EZSP",
                    "network_mac": "90:FD:9F:FF:FE:7C:2D:0B",
                    "interface_name": "/dev/ttyUSB100",
                    "ap_up_time": "NA",
                    "network_type": "ble",
                    "network_stack_ver": "6.9.2.256",
                    "gateway_up_time": "0 days, 7:39:00",
                    "memory_usage": "4008 bytes",
                    "mqtt_qos": "2",
                    "cpu_usage": "9.210000%"
                }
            ],
            "network_info": [
                {
                    "zb_max": 16,
                    "network_stack_version": "6.9.2.256",
                    "network_index": 2,
                    "set_network_id": "0x0000",
                    "get_network_type": "zigbee",
                    "ncp_stack_version": "6.9.2.256",
                    "dual_pan_capable": 1,
                    "get_radio_channel": 18,
                    "legacy_zigbee_support": true,
                    "set_network_type": "zigbee_dk",
                    "get_network_id": "0x0000",
                    "get_iot_coex": false,
                    "iot_model": "EFR32MG12",
                    "set_radio_tx_power": 16,
                    "scan_capable": false,
                    "mode_change": 1,
                    "iot_module": "i100",
                    "network_mac": "90:FD:9F:FF:FE:7C:2D:0B",
                    "get_network_ids": [
                        {
                            "pan_id": "0x1234",
                            "pan_mode": "zigbee_dk",
                            "legacy_zigbee_support": 1,
                            "pan_index": 0,
                            "network_ext_panid": "7D:8A:74:3A:2C:27:27:96"
                        },
                        {
                            "pan_id": "0x4E37",
                            "pan_mode": "ble",
                            "legacy_zigbee_support": 0,
                            "pan_index": 1,
                            "network_ext_panid": "1E:BE:DF:DB:68:B4:EB:C1"
                        }
                    ],
                    "set_radio_channel": 18,
                    "supported_modes": [
                        "BLE",
                        "ZIGBEE",
                        "ZIGBEE_AA",
                        "ZIGBEE_DK"
                    ],
                    "set_iot_coex": false,
                    "ble_max": 10,
                    "network_ext_id": "00:00:00:00:00:00:00:10",
                    "set_network_ids": [
                        {
                            "pan_id": "0x1214",
                            "legacy_zigbee_support": 1,
                            "scan_capable": false,
                            "network_ext_panid": "E6:73:0D:B2:D9:D8:EC:17",
                            "pan_index": 0,
                            "pan_mode": "ble"
                        },
                        {
                            "pan_id": "0x4E31",
                            "pan_mode": "zigbee_aa",
                            "legacy_zigbee_support": 0,
                            "pan_index": 1,
                            "network_ext_panid": "NA"
                        }
                    ],
                    "get_radio_tx_power": 16,
                    "network_status": "Available"
                }
            ],
            "st_hw_version": "NA",
            "iot_firmware": [
                "1.7.2.0.17004"
            ],
            "approved": true,
            "is_supported": true,
            "device_info": [],
            "ip_network_info": {
                "ip": "192.168.1.4",
                "domain_id": "NA",
                "0x893E": {
                    "aggregation_interval": 2000
                },
                "set_vlan_enable": true,
                "get_vlan_mode": "ONLINK",
                "0xFEAA": {
                    "aggregation_interval": 2000
                },
                "zone_id": "NA",
                "0x10000": {
                    "adv_interval": 200,
                    "custom_config": "01:03",
                    "vendor_type": 1,
                    "adv_beacon_type": 2
                },
                "set_vlan_mode": "ONLINK",
                "apgroup_name": "NA",
                "zone_name": "NA",
                "country_code": "US",
                "get_vlan_enable": 0,
                "0x004C": {
                    "aggregation_interval": 2000
                },
                "mac": "30:87:D9:14:6A:00",
                "domain_name": "NA",
                "ctl_host": "NA",
                "gateway_name": "RuckusAP",
                "get_vlan_id": 1,
                "dns": [
                    " 202.88.156.8"
                ],
                "netmask": "255.255.255.0",
                "model": "H510",
                "usb_power": 1,
                "apgroup_id": "NA",
                "gateway": "192.168.1.1",
                "set_vlan_id": 4,
                "0x11000": {
                    "aggregation_interval": 1000
                },
                "ap_firmware": "5.2.2.0.301"
            }
        }
    ]
}

Beacons

This endpoint is a token-auth protected endpoint.

This API returns the details of different beacons pertaining to different vendors which have advertised themselves to an IoT Gateway

{{host}}/app/v1/beacon?gateway_euid=D8:87:32:E7:1A:00

Response Key Explanation

Key Type Explanation
gateway_euid string Mac address of the gateway
data Array array contains the gateway_beacons

{ “meta”: { “limit”: 10, “offset”: 0, “query”: “{‘gateway_euid’: [‘D8:87:32:E7:1A:00’]}“, “total_count”: 11 }, “data”: [ { “gateway_beacons”: [ { “latitude”: “0”, “longitude”: “0”, “vendor_id”: “0x004C”, “events”: [ { “data”: “0201061AFF4C000215E2C56DB5DFFB48D2B060D0F5A710893E88AB0401C3”, “rssi”: “-88”, “deviceAddress”: “00:00:90:FD:9F:7C:2C:C2”, “timestamp”: 1606300392486 }, { “data”: “0201061AFF4C0002150047E70A5DC147258799830544AE04F60102000000”, “rssi”: “-60”, “deviceAddress”: “00:00:90:FD:9F:7C:33:41”, “timestamp”: 1606300392102 }

      ]
    }
  ],
  "gateway_euid": "D8:87:32:E7:1A:00"
}

] }

Expected status codes

Status Code Explanation
200 Request is processed successfully
401 Invalid token
404 Gateways not found in RIoT
500 Critical Server Error
curl -X GET -H "Authorization: Token {{auth_token}}" "{{host}}/app/v1/beacon?gateway_euid=D8:87:32:E7:1A:00"
GET %7B%7Bhost%7D%7D/app/v1/beacon?gateway_euid=D8:87:32:E7:1A:00 HTTP/1.1
Host: 
Authorization: Token {{auth_token}}
Status401 Unauthorized
allowGET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
content-length63
content-typeapplication/json
dateMon, 04 Sep 2017 15:44:19 GMT
serverWSGIServer/0.2 CPython/3.5.2
www-authenticatetoken
x-frame-optionsSAMEORIGIN
{
    "detail": "Access Token Expired. Please refresh Access token."
}
Status200 OK
allowGET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
content-length3172
content-typeapplication/json
dateMon, 04 Sep 2017 15:23:47 GMT
serverWSGIServer/0.2 CPython/3.5.2
x-frame-optionsSAMEORIGIN
[
    {
        "ip_network_info": {
            "netmask": "255.255.254.0",
            "ip": "172.19.150.57",
            "mac": "EC:8C:A2:33:B6:30",
            "dns": [
                " 172.19.0.5"
            ],
            "gateway": "172.19.150.1"
        },
        "gateway_tags": [
            "Auto Created EC:8C:A2:33:B6:30",
            "EC:8C:A2:33:B6:30"
        ],
        "gateway_name": "Auto Created EC:8C:A2:33:B6:30",
        "network_info": {
            "get_radio_tx_power": "NA",
            "network_mac": "00:00:00:0B:57:1B:4F:7D",
            "network_type": "ble",
            "set_radio_channel": 0,
            "network_id": "0xFFFF",
            "set_radio_tx_power": 0,
            "get_radio_channel": "NA"
        },
        "updated_on": "2017-09-04T06:45:14.518000Z",
        "created_on": "2017-09-01T06:12:21.339000Z",
        "diagnostics_info": {
            "memory_usage": "1652 bytes",
            "mqtt_qos": "0",
            "network_type": "BLE",
            "network_stack": "SILABS",
            "network_stack_ver": "2.4",
            "ap_up_time": "0 days, 0:02:31",
            "interface_name": "/dev/ttyUSB0",
            "cpu_usage": "4.070000%",
            "gateway_up_time": "0 days, 0:00:06"
        },
        "connected": true,
        "gateway_euid": "EC:8C:A2:33:B6:30"
    },
    {
        "ip_network_info": {
            "netmask": "255.255.254.0",
            "ip": "172.19.150.52",
            "mac": "D8:38:FC:25:BB:60",
            "dns": [
                " 172.19.0.5"
            ],
            "gateway": "172.19.150.1"
        },
        "gateway_tags": [
            "Auto Created D8:38:FC:25:BB:60",
            "D8:38:FC:25:BB:60"
        ],
        "gateway_name": "Auto Created D8:38:FC:25:BB:60",
        "network_info": {
            "get_radio_tx_power": 8,
            "network_mac": "00:22:A3:00:00:17:06:E3",
            "network_type": "zigbee",
            "set_radio_channel": 0,
            "network_id": "0xAE09",
            "set_radio_tx_power": 0,
            "get_radio_channel": 15
        },
        "updated_on": "2017-09-04T06:33:37.211000Z",
        "created_on": "2017-09-04T06:25:55.980000Z",
        "diagnostics_info": {
            "memory_usage": "1908 bytes",
            "mqtt_qos": "0",
            "network_type": "ZIGBEE",
            "network_stack": "EZSP",
            "network_stack_ver": "5.10.0-36",
            "ap_up_time": "3 days, 2:03:09",
            "interface_name": "/dev/ttyUSB0",
            "cpu_usage": "0.000000%",
            "gateway_up_time": "0 days, 0:00:07"
        },
        "connected": true,
        "gateway_euid": "D8:38:FC:25:BB:60"
    },
    {
        "gateway_tags": [
            "tag",
            "Gateway Test",
            "00:0D:6F:00:33:5E"
        ],
        "gateway_name": "Gateway Test",
        "updated_on": "Never",
        "created_on": "2017-09-04T09:22:00.294000Z",
        "connected": false,
        "gateway_euid": "00:0D:6F:00:33:5E"
    },
    {
        "gateway_tags": [
            "Gateway Test 1",
            "00:0D:6F:00:33:0E"
        ],
        "gateway_name": "Gateway Test 1",
        "updated_on": "Never",
        "created_on": "2017-09-04T09:22:19.633000Z",
        "connected": false,
        "gateway_euid": "00:0D:6F:00:33:0E"
    },
    {
        "gateway_tags": [
            "Gateway Test 3",
            "00:0D:6F:00:33:AE"
        ],
        "gateway_name": "Gateway Test 3",
        "updated_on": "Never",
        "created_on": "2017-09-04T09:22:49.426000Z",
        "connected": false,
        "gateway_euid": "00:0D:6F:00:33:AE"
    },
    {
        "gateway_tags": [
            "tag3",
            "Gateway Test 4",
            "00:0D:6F:00:33:6E"
        ],
        "gateway_name": "Gateway Test 4",
        "updated_on": "Never",
        "created_on": "2017-09-04T09:23:10.395000Z",
        "connected": false,
        "gateway_euid": "00:0D:6F:00:33:6E"
    },
    {
        "gateway_tags": [
            "tag1",
            "dummy gateway",
            "08:38:FC:25:BA:60"
        ],
        "gateway_name": "dummy gateway",
        "updated_on": "Never",
        "created_on": "2017-09-04T11:11:31.716000Z",
        "connected": false,
        "gateway_euid": "08:38:FC:25:BA:60"
    },
    {
        "gateway_tags": [
            "dummy gateway 2",
            "08:38:FC:25:BA:00"
        ],
        "gateway_name": "dummy gateway 2",
        "updated_on": "Never",
        "created_on": "2017-09-04T11:11:46.901000Z",
        "connected": false,
        "gateway_euid": "08:38:FC:25:BA:00"
    },
    {
        "gateway_tags": [
            "tag4",
            "dummy gateway 2",
            "08:38:FC:25:B0:00"
        ],
        "gateway_name": "dummy gateway 2",
        "updated_on": "Never",
        "created_on": "2017-09-04T11:11:57.646000Z",
        "connected": false,
        "gateway_euid": "08:38:FC:25:B0:00"
    }
]

Search Gateways

This endpoint is a token-auth protected endpoint.

This endpoint is used to search the detailed list of gateways added under the account based on the search string provided by the user. Response Key Explanation

Key Type Explanation
gateway_tags Array Tags assigned to the gateway
gateway_name String Name given to the gateway
updated_on Timestamp The timestamp when the gateway was updated
created_on Timestamp The timestamp of when the gateway was created
connected Boolean The state whether the gateway is connected to RIoT
gateway_euid String The MAC address or the identifier of the gateway
ip_network_info Array Contains the information of the IP network
netmask String Netmask Address of the Access point
ip String IP Address of the Access point
mac String MAC Address of the Access point
dns Array Array of DNS servers of the Access point
gateway String Gateway Address of the Access point
set_vlan_id Integer Vlan ID configured by the user
domain_name String Domain Name where the Gateway is configured
country_code String Tx Power conforms values to this country
ctl_host String CTL Host where the Gateway is configured
gateway_name String Name of the gateway
domain_id String Domain Id where the Gateway is configured
zone_id String Zone ID where the Gateway is configured
set_vlan_enable Integer Whether Vlan is enabled by the user
model String Ruckus Model of the Gateway
zone_name String Zone name where the Gateway is configured
ap_firmware String AP version
usb_power Integer Whether Gateway can supply enough power for dongle
legacy_zigbee_support Boolean Whether legacy zigbee devices are supported by this AP
apgroup_name String Group Name where the Gateway is configured
get_vlan_id Integer Vlan Id of Gateway
apgroup_id String Group Id where the Gateway is configured
get_vlan_enable Integer If Vlan is enabled
network_info Array Contains information of the IoT Network
get_radio_tx_power Integer The radio TX power of the IoT Dongle
network_mac String The MAC address of the IoT Dongle
network_type String The type of IoT network either ble or zigbee
set_radio_channel Integer The radio channel of the IoT Dongle
network_id String The IoT radio network address
set_radio_tx_power Integer The radio TX power of the IoT Dongle
get_radio_channel Integer The radio channel of the IoT Dongle
get_iot_coex Boolean Whether Coex is enabled
iot_module String IoT Module of this radio
set_network_type String Network Type of this radio configured by the user
set_ble_plugins Array Plugins configured by User
zb_max Integer Max txpower value for zigbee which can be set on this radio
set_iot_coex Boolean Coex as configured by the user
mode_change Integer Whether mode can be changed for this radio
scan_capable Boolean Whether scanning is allowed for this radio
iot_model String Model of dongle for this radio
get_network_id String Network Id of this radio
ble_max Integer Max txpower value for ble which can be set on this radio
get_ble_plugins Array Ble plugins active on this radio
network_status String Whether the radio is available or not
get_network_type String Network Type of this radio
plugin_capable Boolean Wheter plugin can be enabled
set_network_id String Network Id configured by User
diagnostics_info Array Contains the diagnostics information of the gateway
memory_usage String RAM usage of the gateway
mqtt_qos String MQTT QoS set for communication to the MQTT Broker
network_type String Type of IoT network initiated
network_stack String The name of the IoT network stack
network_stack_ver String The version of the IoT network stack
ap_up_time String Time lapsed from the AP bootup
interface_name String The interface through which the IoT network is initiated
cpu_usage String The percentage use of the CPU
gateway_up_time String Time lapsed from the IoT Gateway bootup

Expected status codes

Status Code Explanation
200 Request is processed successfully
401 Invalid token
404 Gateways not found in RIoT
500 Critical Server Error
curl -X GET -H "Authorization: Token {{auth_token}}" "{{host}}/app/v1/gateway/search?search_string=bl&limit=10"
GET %7B%7Bhost%7D%7D/app/v1/gateway/search?search_string=bl&limit=10 HTTP/1.1
Host: 
Authorization: Token {{auth_token}}
Status200 OK
nginx
Wed, 14 Jul 2021 05:59:39 GMT
application/json
2908
keep-alive
GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
Origin
SAMEORIGIN
SAMEORIGIN
max-age=63072000
{
    "meta": {
        "total_count": 1,
        "offset": 0,
        "query": "{'search_string': ['30:87:D9:14:6A:00']}",
        "limit": 10
    },
    "data": [
        {
            "created_on": "2021-06-09T07:26:05.190000Z",
            "updated_on": "2021-07-09T08:02:55.066000Z",
            "st_dongle_status": false,
            "gateway_name": "RuckusAP",
            "st_hub_status": false,
            "gateway_tags": [
                "RuckusAP"
            ],
            "st_serial_number": "NA",
            "connected": false,
            "gateway_euid": "30:87:D9:14:6A:00",
            "diagnostics_info": [
                {
                    "network_stack": "EZSP",
                    "cpu_usage": "9.210000%",
                    "memory_usage": "4008 bytes",
                    "gateway_up_time": "0 days, 7:39:00",
                    "network_stack_ver": "6.9.2.256",
                    "network_type": "zigbee",
                    "ap_up_time": "NA",
                    "interface_name": "/dev/ttyUSB100",
                    "mqtt_qos": "2",
                    "network_mac": "90:FD:9F:FF:FE:7C:2D:0B"
                }
            ],
            "network_info": [
                {
                    "zb_max": 16,
                    "network_stack_version": "6.9.2.256",
                    "network_index": 2,
                    "set_network_id": "0x0000",
                    "get_network_type": "zigbee",
                    "ncp_stack_version": "6.9.2.256",
                    "dual_pan_capable": 1,
                    "iot_module": "i100",
                    "get_radio_channel": 18,
                    "legacy_zigbee_support": true,
                    "set_network_type": "zigbee",
                    "get_network_id": "0x0000",
                    "get_iot_coex": false,
                    "iot_model": "EFR32MG12",
                    "set_radio_tx_power": 16,
                    "scan_capable": false,
                    "mode_change": 1,
                    "get_radio_tx_power": 16,
                    "network_mac": "90:FD:9F:FF:FE:7C:2D:0B",
                    "get_network_ids": [
                        {
                            "legacy_zigbee_support": 1,
                            "pan_mode": "zigbee",
                            "pan_id": "0x1234",
                            "pan_index": 0,
                            "network_ext_panid": "7D:8A:74:3A:2C:27:27:96"
                        },
                        {
                            "legacy_zigbee_support": 0,
                            "pan_mode": "zigbee_aa",
                            "pan_id": "0x4E37",
                            "pan_index": 1,
                            "network_ext_panid": "1E:BE:DF:DB:68:B4:EB:C1"
                        }
                    ],
                    "set_radio_channel": 18,
                    "network_ext_id": "00:00:00:00:00:00:00:00",
                    "set_iot_coex": false,
                    "ble_max": 10,
                    "set_network_ids": [
                        {
                            "pan_id": "0x1234",
                            "legacy_zigbee_support": 1,
                            "scan_capable": false,
                            "network_ext_panid": "E6:73:0D:B2:D9:D8:EC:47",
                            "pan_index": 0,
                            "pan_mode": "zigbee"
                        },
                        {
                            "legacy_zigbee_support": 0,
                            "pan_mode": "zigbee_aa",
                            "pan_id": "0x4E37",
                            "pan_index": 1,
                            "network_ext_panid": "NA"
                        }
                    ],
                    "network_status": "Available",
                    "supported_modes": [
                        "BLE",
                        "ZIGBEE",
                        "ZIGBEE_AA",
                        "ZIGBEE_DK"
                    ]
                }
            ],
            "st_hw_version": "NA",
            "iot_firmware": [
                "1.7.2.0.17004"
            ],
            "approved": true,
            "is_supported": true,
            "device_info": {
                "rssi": 0,
                "network_id": "0x1234",
                "lqi": 0,
                "last_seen": 1625817775,
                "auth_state": 0,
                "network_mac": "90:FD:9F:FF:FE:7C:2D:0B",
                "pan_index": 0,
                "device_euid": "28:6D:97:00:01:08:38:4B"
            },
            "ip_network_info": {
                "ip": "192.168.1.4",
                "domain_id": "NA",
                "0x893E": {
                    "aggregation_interval": 2000
                },
                "set_vlan_enable": 0,
                "get_vlan_mode": "ONLINK",
                "0xFEAA": {
                    "aggregation_interval": 2000
                },
                "zone_id": "NA",
                "0x10000": {
                    "adv_interval": 200,
                    "custom_config": "01:03",
                    "vendor_type": 1,
                    "adv_beacon_type": 2
                },
                "set_vlan_mode": "ONLINK",
                "apgroup_name": "NA",
                "zone_name": "NA",
                "country_code": "US",
                "get_vlan_enable": 0,
                "0x004C": {
                    "aggregation_interval": 2000
                },
                "mac": "30:87:D9:14:6A:00",
                "domain_name": "NA",
                "ctl_host": "NA",
                "gateway_name": "RuckusAP",
                "get_vlan_id": 1,
                "dns": [
                    " 202.88.156.8"
                ],
                "netmask": "255.255.255.0",
                "model": "H510",
                "usb_power": 1,
                "apgroup_id": "NA",
                "gateway": "192.168.1.1",
                "set_vlan_id": 1,
                "0x11000": {
                    "aggregation_interval": 1000
                },
                "ap_firmware": "5.2.2.0.301"
            }
        }
    ]
}
Status401 Unauthorized
allowGET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
content-length63
content-typeapplication/json
dateMon, 04 Sep 2017 15:44:19 GMT
serverWSGIServer/0.2 CPython/3.5.2
www-authenticatetoken
x-frame-optionsSAMEORIGIN
{
    "meta": {
        "query": "{'search_string': ['bl']}",
        "offset": 0,
        "limit": 10,
        "total_count": 1
    },
    "data": [
        {
            "gateway_euid": "30:87:D9:14:6A:00",
            "gateway_name": "cable-ble",
            "approved": true,
            "connected": false,
            "gateway_tags": [
                "kontakt:2aeg9",
                "cable-ble",
                "30:87:D9:14:6A:00"
            ],
            "network_info": {
                "get_radio_channel": "NA",
                "get_network_type": "ble",
                "set_radio_channel": "NA",
                "set_network_id": "0xFFFF",
                "set_iot_coex": true,
                "network_mac": "90:FD:9F:FF:FE:7C:32:B3",
                "get_network_id": "0xFFFF",
                "set_network_type": "ble",
                "get_radio_tx_power": 8,
                "set_radio_tx_power": 8,
                "get_iot_coex": true
            },
            "diagnostics_info": {
                "mqtt_qos": "2",
                "network_type": "ble",
                "ap_up_time": "1 days, 21:39:12",
                "gateway_up_time": "0 days, 2:38:24",
                "memory_usage": "5832 bytes",
                "interface_name": "/dev/ttyUSB0",
                "network_stack": "SILABS",
                "cpu_usage": "0.670000%",
                "network_stack_ver": "2.10.0.385"
            },
            "updated_on": "2018-11-14T09:09:56.999000Z",
            "ip_network_info": {
                "country_code": "WW",
                "ctl_host": "clust",
                "domain_name": "H510",
                "zone_id": "2757b80b-5ffa-44f9-9467-ab53fee882e8",
                "domain_id": "6dc2a7f1-41c3-4494-b787-bbc8ac438cef",
                "gateway": "10.22.139.254",
                "apgroup_name": "H510-group",
                "mac": "30:87:D9:14:6A:00",
                "get_vlan_enable": 0,
                "set_vlan_id": 1,
                "gateway_name": "cable-ble",
                "zone_name": "H510-desk-zone",
                "netmask": "255.255.252.0",
                "set_vlan_enable": 0,
                "ip": "10.22.136.253",
                "get_vlan_id": 1,
                "apgroup_id": "0e92343b-89fb-418e-ab22-7884acb4271f",
                "dns": [
                    " 10.10.10.10"
                ]
            },
            "device_info": [],
            "created_on": "2018-11-12T11:40:39.341000Z"
        }
    ]
}

Single Gateway

This endpoint is a token-auth protected endpoint.

This endpoint is used to get the details of a gateway requested under the account. The URL should contain the gateways’ euid.

{{host}}app/v1/gateway/{gateway_euid}

Response Key Explanation

Key Type Explanation
gateway_tags Array Tags assigned to the gateway
gateway_name String Name given to the gateway
updated_on Timestamp The timestamp when the gateway was updated
created_on Timestamp The timestamp of when the gateway was created
connected Boolean The state whether the gateway is connected to RIoT
gateway_euid String The MAC address or the identifier of the gateway
ip_network_info Array Contains the information of the IP network
netmask String Netmask Address of the Access point
ip String IP Address of the Access point
mac String MAC Address of the Access point
dns Array Array of DNS servers of the Access point
gateway String Gateway Address of the Access point
set_vlan_id Integer Vlan ID configured by the user
domain_name String Domain Name where the Gateway is configured
country_code String Tx Power conforms values to this country
ctl_host String CTL Host where the Gateway is configured
gateway_name String Name of the gateway
domain_id String Domain Id where the Gateway is configured
zone_id String Zone ID where the Gateway is configured
set_vlan_enable Integer Whether Vlan is enabled by the user
model String Ruckus Model of the Gateway
zone_name String Zone name where the Gateway is configured
ap_firmware String AP version
usb_power Integer Whether Gateway can supply enough power for dongle
legacy_zigbee_support Boolean Whether legacy zigbee devices are supported by this AP
apgroup_name String Group Name where the Gateway is configured
get_vlan_id Integer Vlan Id of Gateway
apgroup_id String Group Id where the Gateway is configured
get_vlan_enable Integer If Vlan is enabled
network_info Array Contains information of the IoT Network
get_radio_tx_power Integer The radio TX power of the IoT Dongle
network_mac String The MAC address of the IoT Dongle
network_type String The type of IoT network either ble or zigbee
set_radio_channel Integer The radio channel of the IoT Dongle
network_id String The IoT radio network address
set_radio_tx_power Integer The radio TX power of the IoT Dongle
get_radio_channel Integer The radio channel of the IoT Dongle
get_iot_coex Boolean Whether Coex is enabled
iot_module String IoT Module of this radio
set_network_type String Network Type of this radio configured by the user
set_ble_plugins Array Plugins configured by User
zb_max Integer Max txpower value for zigbee which can be set on this radio
set_iot_coex Boolean Coex as configured by the user
mode_change Integer Whether mode can be changed for this radio
scan_capable Boolean Whether scanning is allowed for this radio
iot_model String Model of dongle for this radio
get_network_id String Network Id of this radio
ble_max Integer Max txpower value for ble which can be set on this radio
get_ble_plugins Array Ble plugins active on this radio
network_status String Whether the radio is available or not
get_network_type String Network Type of this radio
plugin_capable Boolean Wheter plugin can be enabled
set_network_id String Network Id configured by User
diagnostics_info Array Contains the diagnostics information of the gateway
memory_usage String RAM usage of the gateway
mqtt_qos String MQTT QoS set for communication to the MQTT Broker
network_type String Type of IoT network initiated
network_stack String The name of the IoT network stack
network_stack_ver String The version of the IoT network stack
ap_up_time String Time lapsed from the AP bootup
interface_name String The interface through which the IoT network is initiated
cpu_usage String The percentage use of the CPU
gateway_up_time String Time lapsed from the IoT Gateway bootup

Expected status codes

Status Code Explanation
200 Request is processed successfully
401 Invalid token
404 Gateways not found in RIoT
500 Critical Server Error
curl -X GET -H "Authorization: Token {{auth_token}}" "{{host}}/app/v1/gateway/30:87:D9:14:6A:00"
GET %7B%7Bhost%7D%7D/app/v1/gateway/30:87:D9:14:6A:00 HTTP/1.1
Host: 
Authorization: Token {{auth_token}}
Status200 OK
AllowGET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
Connectionkeep-alive
Content-Length1337
Content-Typeapplication/json
DateWed, 21 Nov 2018 11:04:36 GMT
Servernginx
Strict-Transport-Securitymax-age=63072000
X-Frame-OptionsSAMEORIGIN
X-Frame-OptionsSAMEORIGIN
{
    "gateway_euid": "30:87:D9:14:6A:00",
    "gateway_name": "cable-ble",
    "approved": true,
    "connected": false,
    "gateway_tags": [
        "kontakt:2aeg9",
        "cable-ble",
        "30:87:D9:14:6A:00"
    ],
    "network_info": {
        "get_radio_channel": "NA",
        "get_network_type": "ble",
        "set_radio_channel": "NA",
        "set_network_id": "0xFFFF",
        "set_iot_coex": true,
        "network_mac": "90:FD:9F:FF:FE:7C:32:B3",
        "get_network_id": "0xFFFF",
        "set_network_type": "ble",
        "get_radio_tx_power": 8,
        "set_radio_tx_power": 8,
        "get_iot_coex": true
    },
    "diagnostics_info": {
        "mqtt_qos": "2",
        "network_type": "ble",
        "ap_up_time": "1 days, 21:39:12",
        "gateway_up_time": "0 days, 2:38:24",
        "memory_usage": "5832 bytes",
        "interface_name": "/dev/ttyUSB0",
        "network_stack": "SILABS",
        "cpu_usage": "0.670000%",
        "network_stack_ver": "2.10.0.385"
    },
    "updated_on": "2018-11-14T09:09:56.999000Z",
    "ip_network_info": {
        "country_code": "WW",
        "ctl_host": "clust",
        "domain_name": "H510",
        "zone_id": "2757b80b-5ffa-44f9-9467-ab53fee882e8",
        "domain_id": "6dc2a7f1-41c3-4494-b787-bbc8ac438cef",
        "gateway": "10.22.139.254",
        "apgroup_name": "H510-group",
        "mac": "30:87:D9:14:6A:00",
        "get_vlan_enable": 0,
        "set_vlan_id": 1,
        "gateway_name": "cable-ble",
        "zone_name": "H510-desk-zone",
        "netmask": "255.255.252.0",
        "set_vlan_enable": 0,
        "ip": "10.22.136.253",
        "get_vlan_id": 1,
        "apgroup_id": "0e92343b-89fb-418e-ab22-7884acb4271f",
        "dns": [
            " 10.10.10.10"
        ]
    },
    "device_info": [],
    "created_on": "2018-11-12T11:40:39.341000Z"
}
Status404 Not Found
AllowGET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
Connectionclose
Content-Length121
Content-Typeapplication/json
DateWed, 26 Jul 2017 11:48:32 GMT
Servergunicorn/19.6.0
VaryCookie
X-Frame-OptionsSAMEORIGIN
{
    "code": 404,
    "http_code": 404,
    "developer_message": null,
    "message": "Gateway D8:38:FC:25:BB:60 not found",
    "http_message": null
}

All GatewaysName

This endpoint is a token-auth protected endpoint.

This endpoint is be used to get the count of APs with most Devices.

{{host}}app/v1/dashboard/gatewaynames

Response Key Explanation

Key Type Explanation
gateway_euid int has the value AP mac address
gateway_name string has the value AP name

Expected status codes

Status Code Explanation
200 Request is processed successfully
404 Devices not found in RIoT
500 Critical Server Error
curl -X GET -H "Authorization: Token {{auth_token}}" "{{host}}/app/v1/gatewaynames"
GET %7B%7Bhost%7D%7D/app/v1/gatewaynames HTTP/1.1
Host: 
Authorization: Token {{auth_token}}
Status200 OK
allowGET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
content-length3172
content-typeapplication/json
dateMon, 04 Sep 2017 15:23:47 GMT
serverWSGIServer/0.2 CPython/3.5.2
x-frame-optionsSAMEORIGIN
{
    "meta": {
        "query": "",
        "offset": 0,
        "limit": 0,
        "total_count": 4
    },
    "data": [
        {
            "gateway_euid": "0C:F4:D5:1E:97:D0",
            "gateway_name": "CM_H510_iot-123",
            "approved": true,
            "connected": true,
            "gateway_tags": [
                "RuckusAP",
                "0C:F4:D5:1E:97:D0"
            ],
            "network_info": {
                "get_radio_channel": 25,
                "get_network_id": "0x1234",
                "set_radio_channel": 25,
                "set_network_type": "zigbee",
                "set_network_id": "0x1234",
                "set_iot_coex": false,
                "get_network_type": "zigbee",
                "network_mac": "90:FD:9F:FF:FE:7C:32:35",
                "get_radio_tx_power": 6,
                "set_radio_tx_power": 6,
                "get_iot_coex": false,
                "network_status": "Available",
                "mode_change": 0,
                "iot_model": "EFR32MG12",
                "iot_module": "external",
                "legacy_zigbee_support": true
            },
            "diagnostics_info": {
                "mqtt_qos": "2",
                "network_type": "zigbee",
                "ap_up_time": "6 days, 4:36:32",
                "gateway_up_time": "0 days, 1:16:58",
                "interface_name": "/dev/ttyUSB0",
                "memory_usage": "5320 bytes",
                "network_stack": "EZSP",
                "cpu_usage": "0.010000%",
                "network_stack_ver": "6.4.0.385"
            },
            "updated_on": "2018-11-21T11:00:33.357000Z",
            "ip_network_info": {
                "country_code": "WW",
                "dns": [
                    " 172.17.17.16"
                ],
                "domain_name": "Administration Domain",
                "apgroup_name": "wifi-5g",
                "netmask": "255.255.255.0",
                "gateway": "192.168.100.1",
                "set_vlan_enable": 0,
                "mac": "0C:F4:D5:1E:97:D0",
                "get_vlan_enable": 0,
                "set_vlan_id": 1,
                "gateway_name": "vriot",
                "zone_name": "Shzone",
                "ctl_host": "Shclust",
                "domain_id": "8b2081d5-9662-40d9-a3db-2a3cf4dde3f7",
                "ip": "192.168.100.92",
                "get_vlan_id": 1,
                "zone_id": "1eb3d38d-24bf-4a3f-bb6e-166bba13415f",
                "apgroup_id": "a682f95f-998e-417a-a2cd-35402712794f",
                "usb_power": 1,
                "model": "H510",
                "adv_type": -1,
                "adv_interval": -1
            },
            "device_info": [],
            "created_on": "2018-11-12T10:29:04.902000Z"
        },
        {
            "gateway_euid": "94:F6:65:2A:3B:B0",
            "gateway_name": "PM_RuckusAP-R610-BoRROWED",
            "approved": true,
            "connected": true,
            "gateway_tags": [
                "PM_RuckusAP-R610-BoRROWED",
                "94:F6:65:2A:3B:B0"
            ],
            "network_info": {
                "get_radio_channel": 20,
                "set_iot_coex": false,
                "get_network_id": "0x1234",
                "set_radio_channel": 20,
                "set_network_id": "0x1234",
                "get_network_type": "zigbee",
                "set_network_type": "zigbee",
                "network_mac": "90:FD:9F:FF:FE:7C:33:E2",
                "get_radio_tx_power": 6,
                "set_radio_tx_power": 6,
                "get_iot_coex": false,
                "network_status": "Available",
                "mode_change": 0,
                "iot_model": "EFR32MG12",
                "iot_module": "external",
                "legacy_zigbee_support": true
            },
            "diagnostics_info": {
                "mqtt_qos": "2",
                "network_type": "zigbee",
                "ap_up_time": "2 days, 4:05:26",
                "gateway_up_time": "0 days, 1:16:58",
                "interface_name": "/dev/ttyUSB0",
                "memory_usage": "6724 bytes",
                "network_stack": "EZSP",
                "cpu_usage": "0.150000%",
                "network_stack_ver": "6.4.0.385"
            },
            "updated_on": "2018-11-21T11:00:26.838000Z",
            "ip_network_info": {
                "country_code": "WW",
                "dns": [
                    " 172.17.17.16"
                ],
                "domain_name": "Administration Domain",
                "apgroup_name": "R610g_tEST",
                "netmask": "255.255.255.0",
                "gateway": "192.168.100.1",
                "set_vlan_enable": 0,
                "mac": "94:F6:65:2A:3B:B0",
                "get_vlan_enable": 0,
                "set_vlan_id": 1,
                "gateway_name": "PM_RuckusAP-R610-BoRROWED",
                "zone_name": "Shzone",
                "ctl_host": "Shclust",
                "domain_id": "8b2081d5-9662-40d9-a3db-2a3cf4dde3f7",
                "ip": "192.168.100.53",
                "get_vlan_id": 1,
                "zone_id": "1eb3d38d-24bf-4a3f-bb6e-166bba13415f",
                "apgroup_id": "59af00da-0854-47e7-a0a0-42492f365222",
                "usb_power": 1,
                "model": "H510",
                "adv_type": -1,
                "adv_interval": -1
            },
            "device_info": {
                "network_id": "FFFF",
                "lqi": 0,
                "last_seen": 0,
                "auth_state": 3,
                "rssi": 0,
                "device_euid": "00:00:F4:04:4C:0C:58:33"
            },
            "created_on": "2018-11-16T04:33:52.978000Z"
        },
        {
            "gateway_euid": "D8:38:FC:38:4B:70",
            "gateway_name": "RuckusAP_R610_test_vriot-lab",
            "approved": true,
            "connected": true,
            "gateway_tags": [
                "D8:38:FC:38:4B:70",
                "RuckusAP_R610_test_vriot-lab"
            ],
            "network_info": {
                "get_radio_channel": 15,
                "get_network_id": "0x1234",
                "set_radio_channel": 15,
                "set_network_type": "zigbee",
                "set_network_id": "0x1234",
                "set_iot_coex": false,
                "get_network_type": "zigbee",
                "network_mac": "90:FD:9F:FF:FE:7C:2D:0B",
                "get_radio_tx_power": 5,
                "set_radio_tx_power": 5,
                "get_iot_coex": false,
                "network_status": "Available",
                "mode_change": 0,
                "iot_model": "EFR32MG12",
                "iot_module": "external",
                "legacy_zigbee_support": true
            },
            "diagnostics_info": {
                "mqtt_qos": "2",
                "network_type": "zigbee",
                "ap_up_time": "5 days, 1:47:37",
                "gateway_up_time": "0 days, 1:16:57",
                "interface_name": "/dev/ttyUSB0",
                "memory_usage": "5668 bytes",
                "network_stack": "EZSP",
                "cpu_usage": "0.010000%",
                "network_stack_ver": "6.4.0.385"
            },
            "updated_on": "2018-11-21T11:00:23.726000Z",
            "ip_network_info": {
                "country_code": "WW",
                "dns": [
                    " 172.17.17.16"
                ],
                "domain_name": "Administration Domain",
                "apgroup_name": "R610g_tEST",
                "netmask": "255.255.255.0",
                "gateway": "192.168.100.1",
                "set_vlan_enable": 0,
                "mac": "D8:38:FC:38:4B:70",
                "get_vlan_enable": 0,
                "set_vlan_id": 1,
                "gateway_name": "RuckusAP_R610_test_vriot-lab",
                "zone_name": "Shzone",
                "ctl_host": "Shclust",
                "domain_id": "8b2081d5-9662-40d9-a3db-2a3cf4dde3f7",
                "ip": "192.168.100.32",
                "get_vlan_id": 1,
                "zone_id": "1eb3d38d-24bf-4a3f-bb6e-166bba13415f",
                "apgroup_id": "59af00da-0854-47e7-a0a0-42492f365222",
                "usb_power": 1,
                "model": "H510",
                "adv_type": -1,
                "adv_interval": -1
            },
            "device_info": [],
            "created_on": "2018-11-21T04:17:02.776000Z"
        },
        {
            "gateway_euid": "30:87:D9:14:79:90",
            "gateway_name": "AP",
            "approved": true,
            "connected": true,
            "gateway_tags": [
                "30:87:D9:14:79:90"
            ],
            "network_info": {
                "get_radio_channel": 25,
                "get_network_id": "0x345A",
                "set_radio_channel": 25,
                "set_network_type": "zigbee",
                "set_network_id": "0x345A",
                "set_iot_coex": false,
                "get_network_type": "zigbee",
                "network_mac": "90:FD:9F:FF:FE:0C:89:3E",
                "get_radio_tx_power": 6,
                "set_radio_tx_power": 6,
                "get_iot_coex": false,
                "network_status": "Available",
                "mode_change": 0,
                "iot_model": "EFR32MG12",
                "iot_module": "external",
                "legacy_zigbee_support": true
            },
            "diagnostics_info": {
                "mqtt_qos": "2",
                "network_type": "zigbee",
                "ap_up_time": "0 days, 2:02:30",
                "gateway_up_time": "0 days, 0:03:03",
                "interface_name": "/dev/ttyUSB0",
                "memory_usage": "4516 bytes",
                "network_stack": "EZSP",
                "cpu_usage": "0.050000%",
                "network_stack_ver": "6.4.0.385"
            },
            "updated_on": "2018-11-21T11:00:23.985000Z",
            "ip_network_info": {
                "country_code": "WW",
                "dns": [
                    " 10.10.10.10"
                ],
                "ctl_host": "clust",
                "apgroup_name": "default",
                "netmask": "255.255.252.0",
                "gateway": "10.22.139.254",
                "set_vlan_enable": 0,
                "mac": "30:87:D9:14:79:90",
                "get_vlan_enable": 0,
                "set_vlan_id": 1,
                "gateway_name": "AP",
                "zone_name": "Zone1",
                "domain_id": "8b2081d5-9662-40d9-a3db-2a3cf4dde3f7",
                "domain_name": "Administration Domain",
                "ip": "10.22.136.38",
                "get_vlan_id": 1,
                "zone_id": "d6d1855c-c871-443b-baf0-4e4202480bba",
                "apgroup_id": "77a47e41-dfa7-4991-86e9-d5c54832052a",
                "usb_power": 1,
                "model": "H510",
                "adv_type": -1,
                "adv_interval": -1
            },
            "device_info": [],
            "created_on": "2018-11-21T09:04:40.272000Z"
        },
        {
            "gateway_euid": "30:87:D9:14:57:A0",
            "gateway_name": "RuckusAP",
            "approved": true,
            "connected": false,
            "gateway_tags": [
                "RuckusAP",
                "30:87:D9:14:57:A0"
            ],
            "network_info": {
                "get_radio_channel": 24,
                "set_radio_tx_power": 6,
                "get_network_id": "0x1234",
                "set_network_id": "0x1234",
                "set_iot_coex": false,
                "get_radio_tx_power": 6,
                "network_mac": "90:FD:9F:FF:FE:7C:2D:0E",
                "set_network_type": "ble",
                "get_network_type": "ble",
                "set_radio_channel": 24,
                "get_iot_coex": false,
                "network_status": "Available",
                "mode_change": 0,
                "iot_model": "EFR32MG12",
                "iot_module": "external",
                "get_ble_plugins": [],
                "set_ble_plugins": [],
                "ble_scan_capable": 1,
                "ble_plugin": 0
            },
            "diagnostics_info": {
                "mqtt_qos": "2",
                "network_type": "zigbee",
                "ap_up_time": "0 days, 23:57:51",
                "gateway_up_time": "0 days, 0:14:37",
                "memory_usage": "4608 bytes",
                "interface_name": "/dev/ttyUSB0",
                "network_stack": "EZSP",
                "cpu_usage": "0.010000%",
                "network_stack_ver": "6.4.0.385"
            },
            "updated_on": "2018-11-21T09:30:51.613000Z",
            "ip_network_info": {
                "country_code": "WW",
                "dns": [
                    " 172.17.17.16"
                ],
                "ctl_host": "Cluster",
                "set_vlan_enable": 0,
                "netmask": "255.255.255.0",
                "gateway": "192.168.105.1",
                "apgroup_name": "default",
                "mac": "30:87:D9:14:57:A0",
                "get_vlan_enable": 0,
                "set_vlan_id": 1,
                "gateway_name": "RuckusAP",
                "zone_name": "Zone",
                "domain_id": "8b2081d5-9662-40d9-a3db-2a3cf4dde3f7",
                "domain_name": "Administration Domain",
                "ip": "192.168.105.14",
                "get_vlan_id": 1,
                "zone_id": "9e9f95ed-dcb0-4d2a-ad04-079a355d8821",
                "apgroup_id": "09381260-3065-4e67-9a76-91c2b90d029a",
                "usb_power": 1,
                "model": "H510",
                "adv_type": 1,
                "adv_interval": 200
            },
            "device_info": [],
            "created_on": "2018-11-21T09:13:49.525000Z"
        }
    ]
}
Status401 Unauthorized
allowGET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
content-length63
content-typeapplication/json
dateMon, 04 Sep 2017 15:44:19 GMT
serverWSGIServer/0.2 CPython/3.5.2
www-authenticatetoken
x-frame-optionsSAMEORIGIN
{
    "detail": "Access Token Expired. Please refresh Access token."
}

Approve Gateway

This endpoint is a token-auth protected endpoint.

This endpoint is used to approve or unapprove a single gateway by providing required details for the gateway. The URL should contain the gateway’s euid

{{host}}app/v1/gateway/{gateway_euid}/management/IOT_APPROVED

Request Key Explanation

Key Type Explanation
iot_approved Boolean Whether the gateway is approved

The endpoint accepts only iot_approved. If any other fields are passed the endpoint will return error 400 Bad Request.

Expected status codes

Status Code Explanation
200 Gateway edited successfully
400 Error in API body or validation failed for data provided
404 Gateway not found
401 Invalid token
500 Critical Server Error
curl -X PUT -H "Authorization: Token {{auth_token}}" -H "Content-Type: application/json" -d '{
	"iot_approved":true
}' "{{host}}/app/v1/gateway/EC:8C:A2:37:03:A0/management/IOT_APPROVED"
PUT %7B%7Bhost%7D%7D/app/v1/gateway/EC:8C:A2:37:03:A0/management/IOT_APPROVED HTTP/1.1
Host: 
Authorization: Token {{auth_token}}
Content-Type: application/json

{
	"iot_approved":true
}

Vlan Enable

This endpoint is a token-auth protected endpoint.

This endpoint is used to approve or unapprove a single gateway by providing required details for the gateway. The URL should contain the gateway’s euid

{{host}}app/v1/gateway/{gateway_euid}/management/VLAN_ENABLE

Request Key Explanation

Key Type Explanation
vlan_enable Boolean Whether vlan is enabled on the gateway
vlan_id Integer vlan_id operating on this gateway
vlan_mode String Whether mode is ONLINK or OFFLINK

The endpoint accepts only vlan_id, vlan_mode and vlan_enable. If any other fields are passed the endpoint will return error 400 Bad Request. We can use this endpoint for disabling vlan also. In that scenario vlan_enable will be false and vlan_id will be 0.

Expected status codes

Status Code Explanation
200 Gateway edited successfully
400 Error in API body or validation failed for data provided
404 Gateway not found
401 Invalid token
500 Critical Server Error
curl -X POST -H "Authorization: Token {{auth_token}}" -H "Content-Type: application/json" -d '[
{
  "JoinOnDuration": 255,
  "ZigBeeNetworkControlType": 5,
  "MessageID": 3,
  "MessageTime": "2021-08-30T19:55:34.1494609Z",
  "MessageSequence": 324,
  "MessageExpiry": 255,
  "GatewayID": 6,
  "GatewayUniqueID": "NCDjLSdw",
  "GatewayType": 2,
  "Priority": 127,
  "TimeBaseEpoch": 0,
  "ControllerType": 0,
  "GatewayControlType": 65535,
  "ServerDomain": null,
  "TransactionID": 324,
  "TransactionType": 610,
  "ExternalDeviceId": 0,
  "GracePeriod": 0,
  "MacAddress": "0CF4D51E2210",
  "ServerName": "",
  "HubTypeCode": 11
}
]' "{{host}}/app/v1/gatewayService"
POST %7B%7Bhost%7D%7D/app/v1/gatewayService HTTP/1.1
Host: 
Authorization: Token {{auth_token}}
Content-Type: application/json

[
{
  "JoinOnDuration": 255,
  "ZigBeeNetworkControlType": 5,
  "MessageID": 3,
  "MessageTime": "2021-08-30T19:55:34.1494609Z",
  "MessageSequence": 324,
  "MessageExpiry": 255,
  "GatewayID": 6,
  "GatewayUniqueID": "NCDjLSdw",
  "GatewayType": 2,
  "Priority": 127,
  "TimeBaseEpoch": 0,
  "ControllerType": 0,
  "GatewayControlType": 65535,
  "ServerDomain": null,
  "TransactionID": 324,
  "TransactionType": 610,
  "ExternalDeviceId": 0,
  "GracePeriod": 0,
  "MacAddress": "0CF4D51E2210",
  "ServerName": "",
  "HubTypeCode": 11
}
]

Create Gateway

This endpoint is a token-auth protected endpoint.

This endpoint is used to manually add a single gateway by providing required details for the gateway.

Request Key Explanation

Key Type Explanation
gateway_tags Array (optional) Tags to be assigned to the gateway
gateway_euid String The MAC address or the identifier of the gateway

By default, the gateway_name and the gateway_euid of the gateway will be added to the tags.

The endpoint accepts only gateway_tags and gateway_euid. If any other fields are passed the endpoint will return error 400 Bad Request.

Response Key Explanation

Key Type Explanation
gateway_tags Array Tags assigned to the gateway
gateway_name String Name given to the gateway
updated_on Timestamp The timestamp when the gateway was updated
created_on Timestamp The timestamp of when the gateway was created
connected Boolean The state whether the gateway is connected to RIoT
gateway_euid String The MAC address or the identifier of the gateway

After the gateway communicates with it’s settings to RIoT, the details of the gateway will be added as seen in the All Gateways API.

Expected status codes

Status Code Explanation
201 Gateway created successfully
400 Error in API body or validation failed for data provided
401 Invalid token
409 Gateway already exists with same gateway_euid
500 Critical Server Error
curl -X POST -H "Content-Type: application/json" -H "Authorization: Token {{auth_token}}" -d '{
  "gateway_tags": ["Gateway BDC", "D8:38:FC:25:BB:67", "D8:38:FC:25:BB:67"],
  "gateway_euid": "D8:38:FC:25:BB:67"
}' "{{host}}/app/v1/gateway/"
POST %7B%7Bhost%7D%7D/app/v1/gateway/ HTTP/1.1
Host: 
Content-Type: application/json
Authorization: Token {{auth_token}}

{
  "gateway_tags": ["Gateway BDC", "D8:38:FC:25:BB:67", "D8:38:FC:25:BB:67"],
  "gateway_euid": "D8:38:FC:25:BB:67"
}
Status201 Created
Access-Control-Allow-Origin*
AllowGET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Length177
Content-Typeapplication/json
DateTue, 25 Jul 2017 13:14:51 GMT
ServerWSGIServer/0.2 CPython/3.5.2
VaryCookie
X-Frame-OptionsSAMEORIGIN
{
    "gateway_name": "Gateway BDC",
    "gateway_tags": [
        "Gateway BDC"
    ],
    "updated_on": "Never",
    "gateway_euid": "D8:38:FC:25:BB:60",
    "created_on": "2017-07-25T13:14:51.343738",
    "connected": false
}
Status409 Conflict
Access-Control-Allow-Origin*
AllowGET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Length118
Content-Typeapplication/json
DateTue, 25 Jul 2017 13:15:26 GMT
ServerWSGIServer/0.2 CPython/3.5.2
VaryCookie
X-Frame-OptionsSAMEORIGIN
{
    "developer_message": null,
    "code": 409,
    "http_code": 409,
    "message": "Gateway D8:38:FC:25:BB:60 exists",
    "http_message": null
}

Update Gateway

This endpoint is a token-auth protected endpoint.

This endpoint is used to edit a single gateway by providing required details for the gateway. The URL should contain the gateways’ euid

{{host}}app/v1/gateway/{gateway_euid}

Once the gateway is added the gateway_euid field cannot be modified. If any wrong gateway_euid is added then delete the particular gateway and add it again.

Request Key Explanation

Key Type Explanation
gateway_tags Array (optional) Tags to be assigned to the gateway

If gateway tags are not mentioned in the body it will retain the previous tags else it will overwrite the previous tags.

The endpoint accepts only gateway_tags. If any other fields are passed the endpoint will return error 400 Bad Request.

Response Key Explanation

Key Type Explanation
gateway_tags Array Tags assigned to the gateway
gateway_name String Name given to the gateway
updated_on Timestamp The timestamp when the gateway was updated
created_on Timestamp The timestamp of when the gateway was created
connected Boolean The state whether the gateway is connected to RIoT
gateway_euid String The MAC address or the identifier of the gateway

After the gateway communicates with it’s settings to RIoT, the details of the gateway will be added as seen in the All Gateways API.

Expected status codes

Status Code Explanation
200 Gateway edited successfully
400 Error in API body or validation failed for data provided
404 Gateway not found
401 Invalid token
500 Critical Server Error
curl -X PUT -H "Content-Type: application/x-www-form-urlencoded" -H "Authorization: Token {{auth_token}}" -d '{
  "gateway_tags": ["Some Gateway", "Edited Gateway"]
}' "{{host}}/app/v1/gateway/D8:38:FC:25:BB:60"
PUT %7B%7Bhost%7D%7D/app/v1/gateway/D8:38:FC:25:BB:60 HTTP/1.1
Host: 
Content-Type: application/x-www-form-urlencoded
Authorization: Token {{auth_token}}

{
  "gateway_tags": ["Some Gateway", "Edited Gateway"]
}
Status200 OK

Delete Gateway

This endpoint is a token-auth protected endpoint.

This endpoint is used to delete a single gateway by providing required details for the gateway. The URL should contain the gateways’ euid

{{host}}app/v1/gateway/{gateway_euid}

Once the gateway is deleted all the devices mapped under the gateway will also be deleted. If the devices need to be retained map the devices to a different gateway and then delete the gateway.

Gateways and devices once deleted cannot be retrieved.

The endpoint accepts nothing in the API body.

Expected status codes

Status Code Explanation
204 Gateway deleted successfully
404 Gateway not found
401 Invalid token
500 Critical Server Error
curl -X DELETE -H "Authorization: Token {{auth_token}}" -H "Content-Type: application/json" "{{host}}/app/v1/gateway/D8:38:FC:25:BB:60"
DELETE %7B%7Bhost%7D%7D/app/v1/gateway/D8:38:FC:25:BB:60 HTTP/1.1
Host: 
Authorization: Token {{auth_token}}
Content-Type: application/json

Patch Add Gateway

curl -X PATCH -H "Authorization: Token {{auth_token}}" -H "Content-Type: application/json" -d '[
{
 "Tags": "Gateway BDC| D8:38:FC:25:BB:67",
 "IoT AP MAC": "D8:38:FC:25:E7:67"
},
{
 "Tags": "Gateway BDC|D8:38:FC:25:BB:67",
 "IoT AP MAC": "D8:38:FC:25:E7:68"
}
]' "{{host}}/app/v1/gateway?op=add"
PATCH %7B%7Bhost%7D%7D/app/v1/gateway?op=add HTTP/1.1
Host: 
Authorization: Token {{auth_token}}
Content-Type: application/json

[
{
 "Tags": "Gateway BDC| D8:38:FC:25:BB:67",
 "IoT AP MAC": "D8:38:FC:25:E7:67"
},
{
 "Tags": "Gateway BDC|D8:38:FC:25:BB:67",
 "IoT AP MAC": "D8:38:FC:25:E7:68"
}
]

Patch Update Gateway

curl -X PATCH -H "Authorization: Token {{auth_token}}" -H "Content-Type: application/json" -d '[
{
 "Tags": "Gateway BDC| D8:38:FC:25:BB:67",
 "IoT AP MAC": "D8:38:FC:25:E7:67",
 "Action": "update"
},
{
 "Tags": "Gateway BDC|D8:38:FC:25:BB:67",
 "IoT AP MAC": "D8:38:FC:25:E7:68",
 "Action": "update"
}
]' "{{host}}/app/v1/gateway?op=update"
PATCH %7B%7Bhost%7D%7D/app/v1/gateway?op=update HTTP/1.1
Host: 
Authorization: Token {{auth_token}}
Content-Type: application/json

[
{
 "Tags": "Gateway BDC| D8:38:FC:25:BB:67",
 "IoT AP MAC": "D8:38:FC:25:E7:67",
 "Action": "update"
},
{
 "Tags": "Gateway BDC|D8:38:FC:25:BB:67",
 "IoT AP MAC": "D8:38:FC:25:E7:68",
 "Action": "update"
}
]

Patch Delete Gateway

curl -X PATCH -H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW" -H "Authorization: Token {{auth_token}}" -F "filename=" "{{host}}/app/v1/gateway?op=delete"
PATCH %7B%7Bhost%7D%7D/app/v1/gateway?op=delete HTTP/1.1
Host: 
Authorization: Token {{auth_token}}
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW

----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="filename"


----WebKitFormBoundary7MA4YWxkTrZu0gW

Gateway Management

This section describes the set of gateway APIs which are used to interact with the Ruckus RIoT gateway.

Gateway Operations

These are the set of APIs which can change the operational mode of the gateway. These APIs are more of managing the gateway like IoT restart, changing mode and others as explained below.

Gateway IoT Restart

This endpoint is a token-auth protected endpoint.

This endpoint is used to restart the IoT service inside the AP. The URL should contain the gateways’ euid.

{{host}}app/v1/gateway/{gateway_euid}/IOT_RESTART

Once the API is called the gateway connected state as false. Once the gateway IoT service boots up it will publish it’s settings and the connected state will become true. Until the connected becomes true no operations can be performed on the gateway or devices.

The endpoint accepts an empty body. If any other fields are passed the endpoint will return error 400 Bad Request.

Expected status codes

Status Code Explanation
200 Gateway IoT Restart queued successfully
404 Gateway not found
401 Invalid token
500 Critical Server Error
curl -X PUT -H "Content-Type: application/json" -H "Authorization: Token {{auth_token}}" "{{host}}/app/v1/gateway/D8:38:FC:25:BB:60/management/IOT_RESTART"
PUT %7B%7Bhost%7D%7D/app/v1/gateway/D8:38:FC:25:BB:60/management/IOT_RESTART HTTP/1.1
Host: 
Content-Type: application/json
Authorization: Token {{auth_token}}

Set Gateway Zigbee Channel

This endpoint is a token-auth protected endpoint.

This endpoint is used to set the zigbee channel of the IoT network in the AP. The URL should contain the gateways’ euid.

{{host}}app/v1/gateway/{gateway_euid}/ZIGBEE_CHANNEL

Once the API is called the zigbee channel in the gateway is set and the IoT process will reboot. If the gateway is running in the ble mode the values or the zigbee channel will be set and the AP will reboot but the ble operations will not be affected.

Once the API is called the gateway connected state as false. Once the gateway IoT service boots up it will publish it’s settings and the connected state will become true. Until the connected becomes true no operations can be performed on the gateway or devices.

The endpoint accepts only zigbee_channel. If any other fields are passed the endpoint will return error 400 Bad Request.

Request Key Explanation

Key Type Explanation
zigbee_channel Integer The channel in which the zigbee dongle should start the network

The zigbee channel will accept values between 11-25 as integer.

Expected status codes

Status Code Explanation
200 Gateway command queued successfully
400 Error in the data provided
404 Gateway not found
401 Invalid token
500 Critical Server Error
curl -X PUT -H "Content-Type: application/json" -H "Authorization: Token {{auth_token}}" -d '{
  "zigbee_channel": 11,
  "network_mac":"90:FD:9F:FF:FE:0C:89:36"
}' "{{host}}/app/v1/gateway/D8:38:FC:25:BB:60/management/ZIGBEE_CHANNEL"
PUT %7B%7Bhost%7D%7D/app/v1/gateway/D8:38:FC:25:BB:60/management/ZIGBEE_CHANNEL HTTP/1.1
Host: 
Content-Type: application/json
Authorization: Token {{auth_token}}

{
  "zigbee_channel": 11,
  "network_mac":"90:FD:9F:FF:FE:0C:89:36"
}

Set Gateway Tx Power

This endpoint is a token-auth protected endpoint.

This endpoint is used to set the dongle Tx power for the network when the IoT network starts. The URL should contain the gateways’ euid.

{{host}}app/v1/gateway/{gateway_euid}/TX_POWER

Once the API is called the Tx Power in the gateway is set and the IoT process will reboot.

Tx Power is the power in which the dongle should operate in. The higher the power the better the transmission of data between the gateway and devices.

Once the API is called the gateway connected state as false. Once the gateway IoT service boots up it will publish its settings and the connected state will become true. Until the connected becomes true no operations can be performed on the gateway or devices.

Request Key Explanation

Key Type Explanation
tx_power Integer The Tx power in which the dongle should start the network

The tx_power will accept Integer values between 0-20.

The endpoint accepts only tx_power. If any other fields are passed the endpoint will return error 400 Bad Request.

Expected status codes

Status Code Explanation
200 Gateway command queued successfully
400 Error in the data provided
404 Gateway not found
401 Invalid token
500 Critical Server Error
curl -X PUT -H "Content-Type: application/json" -H "Authorization: Token {{auth_token}}" -d '{
  "tx_power": 0,
  "network_mac":"90:FD:9F:FF:FE:0C:89:36"
}' "{{host}}/app/v1/gateway/D8:38:FC:25:BB:60/management/TX_POWER"
PUT %7B%7Bhost%7D%7D/app/v1/gateway/D8:38:FC:25:BB:60/management/TX_POWER HTTP/1.1
Host: 
Content-Type: application/json
Authorization: Token {{auth_token}}

{
  "tx_power": 0,
  "network_mac":"90:FD:9F:FF:FE:0C:89:36"
}

Set Gateway IOTG MODE

This endpoint is a token-auth protected endpoint.

This endpoint is used to set the IOT MODE of the IoT network in the AP. The URL should contain the gateways’ euid.

{{host}}app/v1/gateway/{gateway_euid}/IOT_MODE

Once the API is called the iot mode in the gateway is set and the IoT process will reboot. Once the API is called the gateway connected state as false. Once the gateway IoT service boots up it will publish its settings and the connected state will become true. Until the connected becomes true no operations can be performed on the gateway or devices.

The endpoint accepts only iot_mode. If any other fields are passed the endpoint will return error 400 Bad Request.

Request Key Explanation

Key Type Explanation
iot_mode string The mode in which the dongle should start the network
pan_index int The index in the dongle
network_mac string The network mac of the dongle

The iot_mode will accept values between zigbee/ble/assa-abloy.

Expected status codes

Status Code Explanation
200 Gateway command queued successfully
400 Error in the data provided
404 Gateway not found
401 Invalid token
500 Critical Server Error
curl -X PUT -H "Content-Type: application/json" -H "Authorization: Token {{auth_token}}" -d '{
	"iot_mode": "zigbee_aa",
	"pan_index":1
	"network_mac":"90:FD:9F:FF:FE:0C:89:36"
}' "{{host}}/app/v1/gateway/D8:38:FC:25:E7:F1/management/IOT_MODE"
PUT %7B%7Bhost%7D%7D/app/v1/gateway/D8:38:FC:25:E7:F1/management/IOT_MODE HTTP/1.1
Host: 
Content-Type: application/json
Authorization: Token {{auth_token}}

{
	"iot_mode": "zigbee_aa",
	"pan_index":1
	"network_mac":"90:FD:9F:FF:FE:0C:89:36"
}

Multiple Gateway IoT Restart

curl -X PATCH -H "Content-Type: application/json" -H "Authorization: Token {{auth_token}}" -d '[
  {
    "gateway_euid": "D8:38:FC:25:BB:60"
  }
]' "{{host}}/app/v1/gateway/management/IOT_RESTART"
PATCH %7B%7Bhost%7D%7D/app/v1/gateway/management/IOT_RESTART HTTP/1.1
Host: 
Content-Type: application/json
Authorization: Token {{auth_token}}

[
  {
    "gateway_euid": "D8:38:FC:25:BB:60"
  }
]

RIoT OPS

Get service details

curl -X GET -H "Authorization: Token {{auth_token}}" "{{host}}/service/v1/service-details"
GET %7B%7Bhost%7D%7D/service/v1/service-details HTTP/1.1
Host: 
Authorization: Token {{auth_token}}

Init request

curl -X POST -H "Content-Type: application/json" -H "Authorization: Token {{auth_token}}" -d '{"modules_list":["mongo_db","mqtt_broker","mqtt_listner","celery","auth_api","rabbitmq","mongo_defaults","dm_api","ipv4_mode_radio","long_scan"],"configurations": {"hostname": "vriot","dns": "","timezone": "America/Los_Angeles","ipv4_mode_radio": "0","ip-address": "","dns2": "","gateway":"","subnet-mask": "","visionline-port": "443","visionline-username": "","visionline-password": "","visionline-ip": "","ibm-api-key": "","ibm-api-token": "","ibm-org-id": "","ibm-gateway-id": "","ibm-gateway-type": "","ibm-gateway-token": "","opwd": "","npwd": "","rtpwd": "","systemtime": ["1", null],"fqdn": "vriot.platform.com","ssl-enabled": true}}' "{{host}}/service/init"
POST %7B%7Bhost%7D%7D/service/init HTTP/1.1
Host: 
Content-Type: application/json
Authorization: Token {{auth_token}}

{"modules_list":["mongo_db","mqtt_broker","mqtt_listner","celery","auth_api","rabbitmq","mongo_defaults","dm_api","ipv4_mode_radio","long_scan"],"configurations": {"hostname": "vriot","dns": "","timezone": "America/Los_Angeles","ipv4_mode_radio": "0","ip-address": "","dns2": "","gateway":"","subnet-mask": "","visionline-port": "443","visionline-username": "","visionline-password": "","visionline-ip": "","ibm-api-key": "","ibm-api-token": "","ibm-org-id": "","ibm-gateway-id": "","ibm-gateway-type": "","ibm-gateway-token": "","opwd": "","npwd": "","rtpwd": "","systemtime": ["1", null],"fqdn": "vriot.platform.com","ssl-enabled": true}}

Reset VRIoT

curl -X POST -H "Authorization: Token {{auth_token}}" "{{host}}/reset"
POST %7B%7Bhost%7D%7D/reset HTTP/1.1
Host: 
Authorization: Token {{auth_token}}

Set datetime and NTP

curl -X PATCH -H "Content-Type: application/json" -d '{
	"configurations":{
		"hostname":"vriot",
		"systemtime":["0","06/21/2018 09:00:10"]
	}
}' "{{host}}/service/init"
PATCH %7B%7Bhost%7D%7D/service/init HTTP/1.1
Host: 
Content-Type: application/json

{
	"configurations":{
		"hostname":"vriot",
		"systemtime":["0","06/21/2018 09:00:10"]
	}
}

SDK Management

SDK Connector

This endpoint is a token-auth protected endpoint.

{{host}}/app/v1/sdk/{{vendor_id}}

This endpoint is used to get the details of the SDK for a particular vendor specified using the vendor ID.

Response Key Explanation

Key Type Explanation
vendor_id String Vendor ID of a particular vendor
vendor_name String Vendor name of a particular vendor
package_name String Name of the SDK package
sub_callback String Name of the subscribe callback
settings Dictionary Settings to be used in the vendor SDK package
enable_all Boolean Whether plugin has been activated on all BLE Gateways
services Boolean Whether a separate service will be running for this plugin

Expected status codes

Status Code Explanation
200 Request is processed successfully
401 Invalid token
404 SDK connector not found for the specified vendor ID
500 Critical Server Error
curl -X GET -H "Authorization: Token {{auth_token}}" "{{host}}/app/v1/sdk/{{vendor_id}}"
GET %7B%7Bhost%7D%7D/app/v1/sdk/%7B%7Bvendor_id%7D%7D HTTP/1.1
Host: 
Authorization: Token {{auth_token}}

Create SDK Connector

This endpoint is a token-auth protected endpoint.

This endpoint is used to manually add a SDK connector for a particular vendor by providing the required details.

Request Key Explanation

Key Type Explanation
vendor_id String ID of a vendor
vendor_name String Name of the vendor
package_name String Name of the vendor’s integration package
settings Dictionary {optional) these are settings that will be used in the vendor’s integration package
enable_all Boolean Whether plugin needs to be activated on all BLE Gateways

The endpoint accepts only vendor_id, vendor_name, package_name, enable_all and settings. If any other fields are passed, the endpoint will return error 400 Bad Request.

Response Key Explanation

Key Type Explanation
vendor_id String ID of the vendor
vendor_name String Name of the vendor
package_name String Name of the vendor SDK package
sub_callback String Name of the subscribe callback in the vendor SDK package
settings Dictionary The settings / constants which are required for the vendor SDK package
enable_all Boolean Whether plugin has been activated on all BLE Gateways
services Boolean Whether a separate service will be running for this plugin
updated_on Timestamp The timestamp when the SDK entry for a vendor was updated
created_on Timestamp The timestamp of when the SDK entry for a vendor was created

Expected status codes

Status Code Explanation
201 SDK for a particular vendor created successfully
400 Error in API body or validation failed for data provided
401 Invalid token
409 SDK for the vendor already exists with same vendor_id
500 Critical Server Error
curl -X POST -H "Authorization: Token {{auth_token}}" -d '{
    "vendor_name": "new_vendor",
    "vendor_id": "0xF1F5",
    "package_name": "new_package",
    "settings": {
		
	},
	"enable_all": false
}' "{{host}}/app/v1/sdk/"
POST %7B%7Bhost%7D%7D/app/v1/sdk/ HTTP/1.1
Host: 
Authorization: Token {{auth_token}}

{
    "vendor_name": "new_vendor",
    "vendor_id": "0xF1F5",
    "package_name": "new_package",
    "settings": {
		
	},
	"enable_all": false
}

Update SDK Connector

This endpoint is a token-auth protected endpoint.

{{host}}/app/v1/sdk/{{vendor_id}}

This endpoint is used to edit the SDK connector entry for a particular vendor by specifying the vendor ID.

Once the entry for the SDK connector is added, the vendor_id field cannot be modified. If any wrong vendor_id is added, then delete the particular SDK connector for the vendor and add it again.

Request Key Explanation

Key Type Explanation
settings Dictionary Settings to be used in the vendor integration package
enable_all Boolean Whether plugin has been activated on all BLE Gateways

The endpoint accepts only settings and enable_all. If any other fields are passed the endpoint will return error 400 Bad Request.

Response Key Explanation

Key Type Explanation
vendor_id String ID of the vendor
vendor_name String Name of the vendor
package_name String Name of the vendor SDK package
sub_callback String Name of the subscribe callback in the vendor SDK package
settings Dictionary The settings / constants which are required for the vendor SDK package
enable_all Boolean Whether plugin has been activated on all BLE Gateways
services Boolean Whether a separate service will be running for this plugin

Expected status codes

Status Code Explanation
200 SDK connector details for a particular vendor successfully updated
400 Error in API body or validation failed for data provided
404 SDK connector for a particular vendor not found
401 Invalid token
500 Critical Server Error
curl -X PUT -H "Authorization: Token {{auth_token}}" -d '{
	"settings": {
	},
	"enable_all": false
}' "{{host}}/app/v1/sdk/{{vendor_id}}"
PUT %7B%7Bhost%7D%7D/app/v1/sdk/%7B%7Bvendor_id%7D%7D HTTP/1.1
Host: 
Authorization: Token {{auth_token}}

{
	"settings": {
	},
	"enable_all": false
}

Delete SDK Connector

This endpoint is a token-auth protected endpoint.

{{host}}/app/v1/sdk/{{vendor_id}}

This endpoint is used to delete the SDK connector details for a particular vendor by specifying the vendor id.

SDK connector details for a particular vendor once deleted cannot be retrieved.

The endpoint accepts nothing in the API body.

Expected status codes

Status Code Explanation
204 SDK connector for the vendor ID deleted successfully
400 Validation failed for data provided
404 SDK connector for the vendor ID not found
401 Invalid token
500 Critical Server Error
curl -X DELETE -H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW" -H "Authorization: Token {{auth_token}}" "{{host}}/app/v1/sdk/{{vendor_id}}"
DELETE %7B%7Bhost%7D%7D/app/v1/sdk/%7B%7Bvendor_id%7D%7D HTTP/1.1
Host: 
Authorization: Token {{auth_token}}

SmartZone

Get Smart Zone List

curl -X GET -H "Authorization: Token {{auth_token}}" "{{host}}/app/v1/smartzones"
GET %7B%7Bhost%7D%7D/app/v1/smartzones HTTP/1.1
Host: 
Authorization: Token {{auth_token}}
Status200 OK
{
    "info": {
        "smart_zones_count": 2
    },
    "data": {
        "orphan_gws": {
            "gw_count": 2
        },
        "smart_zones": [
            {
                "domains": [
                    {
                        "gw_count": 4,
                        "domain_name": "Admin Domain",
                        "zones": [
                            {
                                "gw_count": 2,
                                "zone_name": "Zone-GP-2",
                                "groups": [
                                    {
                                        "group_id": "a1827c74-292b-48ec-9bae-2ac94519adba",
                                        "gw_count": 2,
                                        "group_name": "default"
                                    }
                                ],
                                "zone_id": "92a372d3-ce0f-4980-8c83-ae98d7afe410"
                            },
                            {
                                "gw_count": 2,
                                "zone_name": "Zone-GP-1",
                                "groups": [
                                    {
                                        "group_id": "cc0c2bd2-e984-437c-aaba-b985666c442a",
                                        "gw_count": 1,
                                        "group_name": "default"
                                    },
                                    {
                                        "group_id": "92af3675-22b6-4b0f-817a-e58180c57c1d",
                                        "gw_count": 1,
                                        "group_name": "Co-Ex"
                                    }
                                ],
                                "zone_id": "3b6dae72-bdd1-4f9a-9073-c7bbece6c9bd"
                            }
                        ],
                        "domain_id": "8b2081d5-9662-40d9-a3db-2a3cf4dde3f7"
                    }
                ],
                "smart_zone_ip": "Default-cluster"
            },
            {
                "domains": [
                    {
                        "gw_count": 1,
                        "domain_name": "domain0",
                        "zones": [
                            {
                                "gw_count": 1,
                                "zone_name": "zone-1",
                                "groups": [
                                    {
                                        "group_id": "639ada78-5598-4a4c-8a09-a5947e144ef6",
                                        "gw_count": 1,
                                        "group_name": "extended-cover-group"
                                    }
                                ],
                                "zone_id": "918a5324-8f2f-44f7-9296-9e7c914e953a"
                            }
                        ],
                        "domain_id": "261fe8aa-0694-4ac6-a58c-105cc43acdaf"
                    },
                    {
                        "gw_count": 2,
                        "domain_name": "domain1",
                        "zones": [
                            {
                                "gw_count": 2,
                                "zone_name": "zone-2",
                                "groups": [
                                    {
                                        "group_id": "e587f12d-9049-4b9d-b4ab-565bdb6669ce",
                                        "gw_count": 1,
                                        "group_name": "extended-cable-group"
                                    },
                                    {
                                        "group_id": "607d3877-03bc-4434-a173-22e3b643aa35",
                                        "gw_count": 1,
                                        "group_name": "default"
                                    }
                                ],
                                "zone_id": "0afdd863-5405-4ea4-9142-f8aa41ec9850"
                            }
                        ],
                        "domain_id": "6899fe3b-5bb3-4053-be45-1d4184a178e9"
                    }
                ],
                "smart_zone_ip": "Cluster"
            }
        ]
    }
}

Statistics

These are the set of APIs which will give the statistics of the RIoT controller.

All the APIs in this section use token-auth for authentication.

Controller Statistics

This endpoint is a token-auth protected endpoint.

The controller statistics API gives the statistics of the RIoT controller

Response Key Explanation

Key Explanation
timestamp Timestamp of the RIoT controller

The new access_token should be saved and replaced with the previous access_token.

Expected status codes

Status Code Explanation
200 Request is processed successfully
401 Token invalid or expired
500 Critical Server Error
curl -X GET -H "Authorization: Token {{auth_token}}" "{{host}}/app/v1/controller/stats"
GET %7B%7Bhost%7D%7D/app/v1/controller/stats HTTP/1.1
Host: 
Authorization: Token {{auth_token}}
Status200 OK
AllowGET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
Connectionkeep-alive
Content-Length65
Content-Typeapplication/json
DateWed, 21 Nov 2018 10:45:35 GMT
Servernginx
Strict-Transport-Securitymax-age=63072000
X-Frame-OptionsSAMEORIGIN
X-Frame-OptionsSAMEORIGIN
{
    "controller_version": "1.2.0.0.12",
    "datetime": "2018-11-21 10:45"
}
Status401 Unauthorized
allowGET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
content-length63
content-typeapplication/json
dateMon, 04 Sep 2017 12:45:50 GMT
serverWSGIServer/0.2 CPython/3.5.2
www-authenticatetoken
x-frame-optionsSAMEORIGIN
{
    "detail": "Access Token Expired. Please refresh Access token."
}