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.
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.
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 |
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=
Status | 200 |
---|---|
allow | GET, HEAD, OPTIONS |
connection | close |
content-length | 296 |
content-type | application/json |
date | Mon, 04 Sep 2017 05:39:00 GMT |
server | gunicorn/19.6.0 |
vary | Accept |
x-frame-options | SAMEORIGIN |
|
Status | 401 |
---|---|
allow | GET, HEAD, OPTIONS |
connection | close |
content-length | 39 |
content-type | application/json |
date | Mon, 04 Sep 2017 05:39:26 GMT |
server | gunicorn/19.6.0 |
vary | Accept |
www-authenticate | Basic realm="api" |
x-frame-options | SAMEORIGIN |
|
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 600 seconds.
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=
Status | 200 |
---|---|
allow | GET, HEAD, OPTIONS |
content-length | 115 |
content-type | application/json |
date | Mon, 04 Sep 2017 10:07:35 GMT |
server | WSGIServer/0.2 CPython/3.5.2 |
vary | Accept |
x-frame-options | SAMEORIGIN |
|
Status | 401 |
---|---|
allow | GET, HEAD, OPTIONS |
content-length | 39 |
content-type | application/json |
date | Mon, 04 Sep 2017 10:12:11 GMT |
server | WSGIServer/0.2 CPython/3.5.2 |
vary | Accept |
www-authenticate | Basic realm="api" |
x-frame-options | SAMEORIGIN |
|
This endpoint is a token-auth protected endpoint.
This endpoint is used to generate a new access token. The validity of the access_token
is 600 seconds. 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 access token will be provided.
Response Key Explanation
Key | Explanation |
---|---|
access_token | Token for accessing endpoints protected by token authentication |
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 | 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
Status | 200 |
---|---|
allow | GET, HEAD, OPTIONS |
content-length | 58 |
content-type | application/json |
date | Mon, 04 Sep 2017 10:23:49 GMT |
server | WSGIServer/0.2 CPython/3.5.2 |
vary | Accept |
x-frame-options | SAMEORIGIN |
|
Status | 401 |
---|---|
allow | GET, HEAD, OPTIONS |
content-length | 27 |
content-type | application/json |
date | Mon, 04 Sep 2017 10:25:42 GMT |
server | WSGIServer/0.2 CPython/3.5.2 |
vary | Accept |
www-authenticate | token |
x-frame-options | SAMEORIGIN |
|
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
This endpoint is used to retrieve all the devices which are added in the controller.
curl -X GET -H "Authorization: Basic YWRtaW46YWRtaW4=" "{{auth_host}}/v1/account"
GET %7B%7Bauth_host%7D%7D/v1/account HTTP/1.1
Host:
Authorization: Basic YWRtaW46YWRtaW4=
Status | 200 |
---|---|
Allow | GET, POST, HEAD, OPTIONS |
Connection | keep-alive |
Content-Length | 197 |
Content-Type | application/json |
Date | Wed, 21 Nov 2018 10:36:38 GMT |
Server | nginx |
Strict-Transport-Security | max-age=63072000 |
Vary | Accept |
X-Frame-Options | SAMEORIGIN |
X-Frame-Options | SAMEORIGIN |
|
This endpoint is used to retrieve all the devices 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=
Status | 200 |
---|---|
Allow | GET, PATCH, DELETE, HEAD, OPTIONS |
Connection | keep-alive |
Content-Length | 195 |
Content-Type | application/json |
Date | Wed, 21 Nov 2018 10:37:37 GMT |
Server | nginx |
Strict-Transport-Security | max-age=63072000 |
Vary | Accept |
X-Frame-Options | SAMEORIGIN |
X-Frame-Options | SAMEORIGIN |
|
This endpoint is used to retrieve all the devices which are added 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
}
Status | 200 |
---|---|
Allow | GET, POST, HEAD, OPTIONS |
Connection | keep-alive |
Content-Length | 216 |
Content-Type | application/json |
Date | Wed, 21 Nov 2018 10:39:05 GMT |
Server | nginx |
Strict-Transport-Security | max-age=63072000 |
Vary | Accept |
X-Frame-Options | SAMEORIGIN |
X-Frame-Options | SAMEORIGIN |
|
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.
This endpoint is a token-auth protected endpoint.
This endpoint is used to set the IOT APPROVED of the IoT network in the AP. The URL should contain the gateways’ euid.
{{host}}app/v1/gateway/{gateway_euid}/IOT_APPROVED
Once the API is called the iot_approved 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 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 iot_approved
. If any other fields are passed the endpoint will return error 400 Bad Request
.
Request Key Explanation
Key | Type | Explanation |
---|---|---|
iot_approved | boolean |
The iot_approved will accept values between true/false.
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_coex": true
}' "{{host}}/app/v1/gateway/30:87:D9:14:79:30/management/IOT_COEX"
PUT %7B%7Bhost%7D%7D/app/v1/gateway/30:87:D9:14:79:30/management/IOT_COEX HTTP/1.1
Host:
Content-Type: application/json
Authorization: Token {{auth_token}}
{
"iot_coex": true
}
This endpoint is a token-auth protected endpoint.
This endpoint is used to set the IOT APPROVED of the IoT network in the AP. The URL should contain the gateways’ euid.
{{host}}app/v1/gateway/{gateway_euid}/IOT_APPROVED
Once the API is called the iot_approved 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 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 iot_approved
. If any other fields are passed the endpoint will return error 400 Bad Request
.
Request Key Explanation
Key | Type | Explanation |
---|---|---|
iot_approved | boolean |
The iot_approved will accept values between true/false.
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_coex": false
}' "{{host}}/app/v1/gateway/30:87:D9:14:79:30/management/IOT_COEX"
PUT %7B%7Bhost%7D%7D/app/v1/gateway/30:87:D9:14:79:30/management/IOT_COEX HTTP/1.1
Host:
Content-Type: application/json
Authorization: Token {{auth_token}}
{
"iot_coex": false
}
curl -X PATCH -H "Content-Type: application/json" -H "Authorization: Token {{auth_token}}" -d '[
{
"gateway_euid": "D8:38:FC:25:BB:67",
"iot_coex": false
},
{
"gateway_euid": "30:87:D9:14:79:30",
"iot_coex": true
}
]' "{{host}}/app/v1/gateway/management/IOT_COEX"
PATCH %7B%7Bhost%7D%7D/app/v1/gateway/management/IOT_COEX HTTP/1.1
Host:
Content-Type: application/json
Authorization: Token {{auth_token}}
[
{
"gateway_euid": "D8:38:FC:25:BB:67",
"iot_coex": false
},
{
"gateway_euid": "30:87:D9:14:79:30",
"iot_coex": true
}
]
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.
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}}" "http://{{url}}:{{port}}/app/v1/dashboard/devicetype"
failed to parse url
parse http://{{url}}:{{port}}/app/v1/dashboard/devicetype: invalid character "{" in host name
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}}
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}}
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.
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. 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_capability | Dictionary | Contains information of the Attributes supported by the device |
The device capability is available only after the device has communicated with the RIoT controller. The contents of the device capability is as below:
{
“
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"
GET %7B%7Bhost%7D%7D/app/v1/device HTTP/1.1
Host:
Authorization: Token {{auth_token}}
Status | 200 |
---|---|
Allow | GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS |
Connection | keep-alive |
Content-Length | 17742 |
Content-Type | application/json |
Date | Wed, 21 Nov 2018 11:14:08 GMT |
Server | nginx |
Strict-Transport-Security | max-age=63072000 |
X-Frame-Options | SAMEORIGIN |
X-Frame-Options | SAMEORIGIN |
|
Status | 404 Not Found |
---|---|
Allow | GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS |
Connection | close |
Content-Length | 103 |
Content-Type | application/json |
Date | Wed, 26 Jul 2017 11:47:27 GMT |
Server | gunicorn/19.6.0 |
Vary | Cookie |
X-Frame-Options | SAMEORIGIN |
|
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. 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_capability | Dictionary | Contains information of the Attributes supported by the device |
The device capability is available only after the device has communicated with the RIoT controller. The contents of the device capability is as below:
{
“
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}}
Status | 404 Not Found |
---|---|
Allow | GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS |
Connection | close |
Content-Length | 103 |
Content-Type | application/json |
Date | Wed, 26 Jul 2017 11:47:27 GMT |
Server | gunicorn/19.6.0 |
Vary | Cookie |
X-Frame-Options | SAMEORIGIN |
|
Status | 200 OK |
---|---|
Allow | GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS |
Content-Length | 1144 |
Content-Type | application/json |
Date | Tue, 25 Jul 2017 10:53:17 GMT |
Server | WSGIServer/0.2 CPython/3.5.2 |
Vary | Cookie |
X-Frame-Options | SAMEORIGIN |
|
This endpoint is a token-auth protected endpoint.
This endpoint is used to get the search devices added under the account. These devices can be added manually from the Create Device
API. 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_capability | Dictionary | Contains information of the Attributes supported by the device |
The device capability is available only after the device has communicated with the RIoT controller. The contents of the device capability is as below:
{
“
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}}
Status | 404 Not Found |
---|---|
Allow | GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS |
Connection | close |
Content-Length | 103 |
Content-Type | application/json |
Date | Wed, 26 Jul 2017 11:47:27 GMT |
Server | gunicorn/19.6.0 |
Vary | Cookie |
X-Frame-Options | SAMEORIGIN |
|
Status | 200 OK |
---|---|
Allow | GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS |
Content-Length | 1144 |
Content-Type | application/json |
Date | Tue, 25 Jul 2017 10:53:17 GMT |
Server | WSGIServer/0.2 CPython/3.5.2 |
Vary | Cookie |
X-Frame-Options | SAMEORIGIN |
|
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 devices’ euid.
{{host}}app/v1/device/{device_euid}
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. 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_capability | Dictionary | Contains information of the Attributes supported by the device |
The device capability is available only after the device has communicated with the RIoT controller. The contents of the device capability is as below:
{
“
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 | Device 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}}
Status | 200 OK |
---|---|
Allow | GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS |
Content-Length | 1144 |
Content-Type | application/json |
Date | Tue, 25 Jul 2017 10:53:17 GMT |
Server | WSGIServer/0.2 CPython/3.5.2 |
Vary | Cookie |
X-Frame-Options | SAMEORIGIN |
|
Status | 404 Not Found |
---|---|
Allow | GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS |
Content-Length | 126 |
Content-Type | application/json |
Date | Tue, 25 Jul 2017 11:42:08 GMT |
Server | WSGIServer/0.2 CPython/3.5.2 |
Vary | Cookie |
X-Frame-Options | SAMEORIGIN |
|
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 |
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.
The endpoint accepts only device_tags
, device_name
, device_euid
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 |
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",
"gateway_euid":"D8:38:FC:25:BB:60",
"device_tags":["Sample Tag"]
}' "{{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",
"gateway_euid":"D8:38:FC:25:BB:60",
"device_tags":["Sample Tag"]
}
Status | 201 Created |
---|---|
Access-Control-Allow-Origin | * |
Allow | GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS |
Content-Length | 239 |
Content-Type | application/json |
Date | Tue, 25 Jul 2017 12:09:46 GMT |
Server | WSGIServer/0.2 CPython/3.5.2 |
Vary | Cookie |
X-Frame-Options | SAMEORIGIN |
|
Status | 400 Bad Request |
---|---|
Access-Control-Allow-Origin | * |
Allow | GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS |
Content-Length | 189 |
Content-Type | application/json |
Date | Tue, 25 Jul 2017 12:10:30 GMT |
Server | WSGIServer/0.2 CPython/3.5.2 |
Vary | Cookie |
X-Frame-Options | SAMEORIGIN |
|
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
}
Status | 200 OK |
---|---|
Access-Control-Allow-Origin | * |
Allow | GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS |
Content-Length | 236 |
Content-Type | application/json |
Date | Tue, 25 Jul 2017 12:12:28 GMT |
Server | WSGIServer/0.2 CPython/3.5.2 |
Vary | Cookie |
X-Frame-Options | SAMEORIGIN |
|
Status | 404 Not Found |
---|---|
Access-Control-Allow-Origin | * |
Allow | GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS |
Content-Length | 126 |
Content-Type | application/json |
Date | Tue, 25 Jul 2017 12:22:01 GMT |
Server | WSGIServer/0.2 CPython/3.5.2 |
Vary | Cookie |
X-Frame-Options | SAMEORIGIN |
|
Status | 404 Not Found |
---|---|
Access-Control-Allow-Origin | * |
Allow | GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS |
Content-Length | 121 |
Content-Type | application/json |
Date | Tue, 25 Jul 2017 12:15:07 GMT |
Server | WSGIServer/0.2 CPython/3.5.2 |
Vary | Cookie |
X-Frame-Options | SAMEORIGIN |
|
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
Status | 200 OK |
---|---|
Access-Control-Allow-Origin | * |
Allow | GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS |
Content-Length | 0 |
Date | Tue, 25 Jul 2017 12:19:25 GMT |
Server | WSGIServer/0.2 CPython/3.5.2 |
Vary | Cookie |
X-Frame-Options | SAMEORIGIN |
Status | 404 Not Found |
---|---|
Access-Control-Allow-Origin | * |
Allow | GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS |
Content-Length | 126 |
Content-Type | application/json |
Date | Tue, 25 Jul 2017 12:20:10 GMT |
Server | WSGIServer/0.2 CPython/3.5.2 |
Vary | Cookie |
X-Frame-Options | SAMEORIGIN |
|
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
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
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
These are the set of APIs which control the IoT devices via the RIoT gateway.
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 devices’ euid
{{host}}app/v1/device/{device_euid}/capability
Response Key Explanation
Key | Type | Explanation |
---|---|---|
supported_capabilities | Array | Capabilities supported by the device |
supported_capabilities
can contain either of thses values STATE
, BRIGHTNESS
, COLOR
and LOCK_STATE
. 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}}
Status | 200 OK |
---|---|
Allow | GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS |
Content-Length | 47 |
Content-Type | application/json |
Date | Tue, 25 Jul 2017 12:23:46 GMT |
Server | WSGIServer/0.2 CPython/3.5.2 |
Vary | Cookie |
X-Frame-Options | SAMEORIGIN |
|
This endpoint is a token-auth protected endpoint.
This endpoint is used to set the state of the device. The URL should contain the devices’ euid
{{host}}app/v1/device/{device_euid}/capability/STATE
The state of 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 |
---|---|---|
on | Boolean | Set the state of the device |
The on
field can accept only boolean values. If set to true
the device will switch on and vice versa.
The endpoint accepts only on
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 '{
"on": true
}' "{{host}}/app/v1/device/84:18:26:00:00:07:AB:55/capability/STATE"
PUT %7B%7Bhost%7D%7D/app/v1/device/84:18:26:00:00:07:AB:55/capability/STATE HTTP/1.1
Host:
Content-Type: application/json
Authorization: Token {{auth_token}}
{
"on": true
}
Status | 400 Bad Request |
---|---|
|
Status | 200 OK |
---|---|
Access-Control-Allow-Origin | * |
Allow | GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS |
Content-Length | 21 |
Content-Type | application/json |
Date | Tue, 25 Jul 2017 12:46:23 GMT |
Server | WSGIServer/0.2 CPython/3.5.2 |
Vary | Cookie |
X-Frame-Options | SAMEORIGIN |
|
This endpoint is a token-auth protected endpoint.
This endpoint is used to set the brightness of the device. The URL should contain the devices’ euid
{{host}}app/v1/device/{device_euid}/capability/BRIGHTNESS
The brightness of 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 |
---|---|---|
level | Integer | Set the brightness of the device |
The level
field can accept only integer values between 0-255 where 0 is the lowest and 255 is the highest.
The endpoint accepts only level
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 '{
"level": 255
}' "{{host}}/app/v1/device/84:18:26:00:00:07:AB:55/capability/BRIGHTNESS"
PUT %7B%7Bhost%7D%7D/app/v1/device/84:18:26:00:00:07:AB:55/capability/BRIGHTNESS HTTP/1.1
Host:
Content-Type: application/json
Authorization: Token {{auth_token}}
{
"level": 255
}
Status | 200 OK |
---|---|
Access-Control-Allow-Origin | * |
Allow | GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS |
Content-Length | 21 |
Content-Type | application/json |
Date | Tue, 25 Jul 2017 12:48:34 GMT |
Server | WSGIServer/0.2 CPython/3.5.2 |
Vary | Cookie |
X-Frame-Options | SAMEORIGIN |
|
Status | 400 Bad Request |
---|---|
|
curl -X GET -H "Content-Type: application/json" -H "Authorization: Token {{auth_token}}" "{{host}}/app/v1/device/00:0D:6F:00:03:1D:85:5F/zclattribute?clust_id=0x0101&attr_id=0x0000"
GET %7B%7Bhost%7D%7D/app/v1/device/00:0D:6F:00:03:1D:85:5F/zclattribute?clust_id=0x0101&attr_id=0x0000 HTTP/1.1
Host:
Content-Type: application/json
Authorization: Token {{auth_token}}
curl -X PUT -H "Content-Type: application/json" -H "Authorization: Token {{auth_token}}" -d '{
"parent_command": "zcl basic",
"command_id": "0x00",
"cluster_id": "0x0000",
"attribute_id": "0x00",
"endpoint_id" : 1,
"params": {"pin":5678}
}' "{{host}}/app/v1/device/84:18:26:00:00:07:AB:55/capability/COLOR"
PUT %7B%7Bhost%7D%7D/app/v1/device/84:18:26:00:00:07:AB:55/capability/COLOR HTTP/1.1
Host:
Content-Type: application/json
Authorization: Token {{auth_token}}
{
"parent_command": "zcl basic",
"command_id": "0x00",
"cluster_id": "0x0000",
"attribute_id": "0x00",
"endpoint_id" : 1,
"params": {"pin":5678}
}
This endpoint is a token-auth protected endpoint.
This endpoint is used to set the RGB color of the device. The URL should contain the devices’ euid
{{host}}app/v1/device/{device_euid}/capability/COLOR
The RGB Color of 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 |
---|---|---|
red | Integer | Set the red color intensity of the device |
green | Integer | Set the green color intensity of the device |
blue | Integer | Set the blue color intensity of the device |
The red
, green
and blue
field can accept only integer values between 0-255 where 0 is the lowest and 255 is the highest.
The endpoint accepts only red
, green
and blue
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 '{
"red": 255,
"green": 255,
"blue": 255
}' "{{host}}/app/v1/device/84:18:26:00:00:07:AB:55/capability/COLOR"
PUT %7B%7Bhost%7D%7D/app/v1/device/84:18:26:00:00:07:AB:55/capability/COLOR HTTP/1.1
Host:
Content-Type: application/json
Authorization: Token {{auth_token}}
{
"red": 255,
"green": 255,
"blue": 255
}
Status | 401 Unauthorized |
---|---|
Access-Control-Allow-Origin | * |
Allow | GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS |
Content-Length | 134 |
Content-Type | application/json |
Date | Tue, 25 Jul 2017 12:51:10 GMT |
Server | WSGIServer/0.2 CPython/3.5.2 |
Vary | Cookie |
X-Frame-Options | SAMEORIGIN |
|
Status | 200 OK |
---|---|
|
This endpoint is a token-auth protected endpoint.
This endpoint is used to set the lock state of the device. The URL should contain the devices’ euid
{{host}}app/v1/device/{device_euid}/capability/LOCK_STATE
The lock state of 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 |
---|---|---|
lock | Boolean | Set the state of the device |
The lock
field can accept only boolean values. If set to true
the device will lock and vice versa.
The endpoint accepts only lock
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 '{
"lock": true
}' "{{host}}/app/v1/device/00:0D:6F:00:03:1D:85:5F/capability/LOCK_STATE"
PUT %7B%7Bhost%7D%7D/app/v1/device/00:0D:6F:00:03:1D:85:5F/capability/LOCK_STATE HTTP/1.1
Host:
Content-Type: application/json
Authorization: Token {{auth_token}}
{
"lock": true
}
Status | 200 OK |
---|---|
Access-Control-Allow-Origin | * |
Allow | GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS |
Content-Length | 139 |
Content-Type | application/json |
Date | Tue, 25 Jul 2017 12:56:37 GMT |
Server | WSGIServer/0.2 CPython/3.5.2 |
Vary | Cookie |
X-Frame-Options | SAMEORIGIN |
|
Status | 400 Bad Request |
---|---|
Access-Control-Allow-Origin | * |
Allow | GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS |
Content-Length | 139 |
Content-Type | application/json |
Date | Tue, 25 Jul 2017 13:07:08 GMT |
Server | WSGIServer/0.2 CPython/3.5.2 |
Vary | Cookie |
X-Frame-Options | SAMEORIGIN |
|
This endpoint is a token-auth protected endpoint.
This endpoint is used to set the capability of multiple devices by providing details of the device and the values for the capabilities.
Request Explanation
The request body will be a list of dictionaries. Each dictionary should specify the keys below :
Key | Type | Explanation |
---|---|---|
device_euid | String | The MAC address or the identifier of the device |
capability | String | Capability supported by the device |
value | String | The MAC address or the identifier of the gateway |
The capability
field can accept any one of the strings : ‘STATE’, ‘BRIGHTNESS’, ‘COLOUR’, ‘LOCK_STATE’.
The value
field will contain the value to set the capability to.
Capability | Value |
---|---|
STATE | {“on”:true / false} |
BRIGHTNESS | {“level”:255} |
COLOUR | {“red”: 255, “green”: 255, “blue”: 255} |
LOCK_STATE | {“lock”:true / false} |
The endpoint accepts only device_euid
, capability
and value
. If any other fields are passed the endpoint will return error 400 Bad Request
.
Response Explanation
For each device, the value of the capability will be set. The status of the capability can be known by querying the different devices.
A 200 OK
response is sent if the request is successful.
Expected status codes
Status Code | Explanation |
---|---|
200 | Devices will set the capabilities according to the values given in the request |
400 | Error in API body or validation failed for data provided |
401 | Invalid token |
500 | Critical Server Error |
curl -X PATCH -H "Authorization: Token {{auth_token}}" -H "Content-Type: application/json" -d '[
{
"device_euid": "00:0D:6F:00:05:24:20:CE",
"capability": "STATE",
"value": {
"on": true
}
},
{
"device_euid": "*",
"capability": "STATE",
"value": {
"on": false
}
},
{
"device_euid": "00:0D:6F:00:05:24:20:CE",
"capability": "STATE",
"value": {
"on": true
}
},
{
"device_euid": "*",
"capability": "STATE",
"value": {
"on": false
}
},
{
"device_euid": "*",
"capability": "STATE",
"value": {
"on": false
}
}
]' "{{host}}/app/v1/device/capability"
PATCH %7B%7Bhost%7D%7D/app/v1/device/capability HTTP/1.1
Host:
Authorization: Token {{auth_token}}
Content-Type: application/json
[
{
"device_euid": "00:0D:6F:00:05:24:20:CE",
"capability": "STATE",
"value": {
"on": true
}
},
{
"device_euid": "*",
"capability": "STATE",
"value": {
"on": false
}
},
{
"device_euid": "00:0D:6F:00:05:24:20:CE",
"capability": "STATE",
"value": {
"on": true
}
},
{
"device_euid": "*",
"capability": "STATE",
"value": {
"on": false
}
},
{
"device_euid": "*",
"capability": "STATE",
"value": {
"on": false
}
}
]
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.
These are the set of APIs which communicate to the RIoT gateway. These set of APIs can also be used for building custom dashboards and knowing the stats of the gateway.
gateway_euid
The gateway MAC address or the identifier address
gateway_name
This is the name for the gateway
gateway_tags
These are the custom tags given to the gateway by the user
network_info
This field contains the details of the IoT network on which the gateway is operating
diagnostics_info
This field contains the diagnostics info of the gateway
ip_network_info
This field contains the IP network information of the gateway
created_on
This is the timestamp when the gateway was created
updated_on
This is the time stamp when the gateway was updated
This endpoint is a token-auth protected endpoint.
This endpoint is used to get the list of devices scanned by the gateway durring the device scan operation. The URL should contain the gateways’ euid.
{{host}}app/v1/scan/get
The API will return the list of devices scanned. The scan list will get refreshed for every 3 minutes. The devices will be removed from the list once they are discovered after a duration of 3 minutes. 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}}
Status | 200 |
---|---|
|
This endpoint is a token-auth protected endpoint.
This endpoint is used initiate the device scan operation in the gateway for a specified duration. The URL should contain the gateways’ euid.
{{host}}app/v1/gateway/{gateway_euid}/scan
The API will start the device scan operation for the specified gateway. Once the command initiated, new devices which are not in RIoT will respond to the particular gateway. These new devices can be viewed by providing the get request to the same API.
Request Key Explanation
Key | Type | Explanation |
---|---|---|
scan_duration | Integer | The duration for which the device scan duration should be activated |
The scan_duration
will accept Integer values between 10-250
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"
}]
This endpoint is a token-auth protected endpoint.
This endpoint is used initiate the device scan operation in the gateway for a specified duration. The URL should contain the gateways’ euid.
{{host}}app/v1/gateway/{gateway_euid}/scan
The API will start the device scan operation for the specified gateway. Once the command initiated, new devices which are not in RIoT will respond to the particular gateway. These new devices can be viewed by providing the get request to the same API.
Request Key Explanation
Key | Type | Explanation |
---|---|---|
scan_duration | Integer | The duration for which the device scan duration should be activated |
The scan_duration
will accept Integer values between 10-250
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}}
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 devices’ euid
{{host}}app/v1/device/{device_euid}/zclcapability
Response Key Explanation
Key | Type | Explanation |
---|---|---|
supported_capabilities | Array | Capabilities supported by the device |
supported_capabilities
can contain either of thses values STATE
, BRIGHTNESS
, COLOR
and LOCK_STATE
. 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}}
Status | 200 OK |
---|---|
Allow | GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS |
Content-Length | 47 |
Content-Type | application/json |
Date | Tue, 25 Jul 2017 12:23:46 GMT |
Server | WSGIServer/0.2 CPython/3.5.2 |
Vary | Cookie |
X-Frame-Options | SAMEORIGIN |
|
This endpoint is a token-auth protected endpoint.
This endpoint is used to set the state of the device. The URL should contain the devices’ euid
{{host}}app/v1/device/{device_euid}/zclcapability/
The state of 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 |
---|---|---|
on | Boolean | Set the state of the device |
The on
field can accept only boolean values. If set to true
the device will switch on and vice versa.
The endpoint accepts only on
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 '{
"on": true
}' "{{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}}
{
"on": true
}
Status | 400 Bad Request |
---|---|
|
Status | 200 OK |
---|---|
Access-Control-Allow-Origin | * |
Allow | GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS |
Content-Length | 21 |
Content-Type | application/json |
Date | Tue, 25 Jul 2017 12:46:23 GMT |
Server | WSGIServer/0.2 CPython/3.5.2 |
Vary | Cookie |
X-Frame-Options | SAMEORIGIN |
|
This endpoint is a token-auth protected endpoint.
This endpoint is used to get an entire log file or the last n lines of the log file.
{{host}}/app/v1/dashboard/insights/
This API is used to get the entire log file
{{host}}/app/v1/dashboard/insights?line_num=n
This API is used to get the last n lines of the log file
Response Key Explanation
Key | Type | Explanation |
---|---|---|
log | String | Last n lines of the log file or the path to the log file |
Expected status codes
Status Code | Explanation |
---|---|
200 | Request is processed successfully |
401 | Invalid token |
400 | Bad Request |
404 | Log file not found |
500 | Critical Server Error |
curl -X GET -H "Authorization: Token {{auth_token}}" "{{host}}/app/v1/dashboard/insights"
GET %7B%7Bhost%7D%7D/app/v1/dashboard/insights HTTP/1.1
Host:
Authorization: Token {{auth_token}}
These are the set of APIs which enable CRUD operations for the gateways in RIoT controller.
This endpoint is a token-auth protected endpoint.
This endpoint is used to get the detailed list of gateways added under the account. These gateways can either be added automatically to RIoT or manually from the Create Gateway
API. All the gateways which are automatically added have their names like Auto Created
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 |
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 |
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"
GET %7B%7Bhost%7D%7D/app/v1/gateway HTTP/1.1
Host:
Authorization: Token {{auth_token}}
Status | 401 |
---|---|
allow | GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS |
content-length | 63 |
content-type | application/json |
date | Mon, 04 Sep 2017 15:44:19 GMT |
server | WSGIServer/0.2 CPython/3.5.2 |
www-authenticate | token |
x-frame-options | SAMEORIGIN |
|
Status | 200 |
---|---|
allow | GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS |
content-length | 3172 |
content-type | application/json |
date | Mon, 04 Sep 2017 15:23:47 GMT |
server | WSGIServer/0.2 CPython/3.5.2 |
x-frame-options | SAMEORIGIN |
|
This endpoint is a token-auth protected endpoint.
This endpoint is used to get the detailed list of gateways added under the account. These gateways can either be added automatically to RIoT or manually from the Create Gateway
API. All the gateways which are automatically added have their names like Auto Created
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 |
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 |
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}}
Status | 200 |
---|---|
allow | GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS |
content-length | 3172 |
content-type | application/json |
date | Mon, 04 Sep 2017 15:23:47 GMT |
server | WSGIServer/0.2 CPython/3.5.2 |
x-frame-options | SAMEORIGIN |
|
Status | 401 |
---|---|
allow | GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS |
content-length | 63 |
content-type | application/json |
date | Mon, 04 Sep 2017 15:44:19 GMT |
server | WSGIServer/0.2 CPython/3.5.2 |
www-authenticate | token |
x-frame-options | SAMEORIGIN |
|
This endpoint is a token-auth protected endpoint.
This endpoint is used to search the detailed list of gateways added under the account. These gateways can either be added automatically to RIoT or manually from the Create Gateway
API. All the gateways which are automatically added have their names like Auto Created
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 |
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 |
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}}
Status | 401 |
---|---|
allow | GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS |
content-length | 63 |
content-type | application/json |
date | Mon, 04 Sep 2017 15:44:19 GMT |
server | WSGIServer/0.2 CPython/3.5.2 |
www-authenticate | token |
x-frame-options | SAMEORIGIN |
|
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}
These gateway can either be added automatically to RIoT or manually from the Create Gateway
API. The gateway which are automatically added have their names like Auto Created
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 |
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 |
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 | Gateway 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}}
Status | 404 Not Found |
---|---|
Allow | GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS |
Connection | close |
Content-Length | 121 |
Content-Type | application/json |
Date | Wed, 26 Jul 2017 11:48:32 GMT |
Server | gunicorn/19.6.0 |
Vary | Cookie |
X-Frame-Options | SAMEORIGIN |
|
Status | 200 |
---|---|
Allow | GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS |
Connection | keep-alive |
Content-Length | 1337 |
Content-Type | application/json |
Date | Wed, 21 Nov 2018 11:04:36 GMT |
Server | nginx |
Strict-Transport-Security | max-age=63072000 |
X-Frame-Options | SAMEORIGIN |
X-Frame-Options | SAMEORIGIN |
|
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
}
curl -X PUT -H "Authorization: Token {{auth_token}}" -H "Content-Type: application/json" -d '{
"vlan_enable": true,
"vlan_id": 4
}' "{{host}}/app/v1/gateway/0C:F4:D5:1E:3C:40/management/VLAN_ENABLE"
PUT %7B%7Bhost%7D%7D/app/v1/gateway/0C:F4:D5:1E:3C:40/management/VLAN_ENABLE HTTP/1.1
Host:
Authorization: Token {{auth_token}}
Content-Type: application/json
{
"vlan_enable": true,
"vlan_id": 4
}
curl -X PUT -H "Authorization: Token {{auth_token}}" -H "Content-Type: application/json" -d '{
"vlan_enable": false,
"vlan_id": 0
}' "{{host}}/app/v1/gateway/0C:F4:D5:1E:3C:40/management/VLAN_ENABLE"
PUT %7B%7Bhost%7D%7D/app/v1/gateway/0C:F4:D5:1E:3C:40/management/VLAN_ENABLE HTTP/1.1
Host:
Authorization: Token {{auth_token}}
Content-Type: application/json
{
"vlan_enable": false,
"vlan_id": 0
}
curl -X PUT -H "Authorization: Token {{auth_token}}" -H "Content-Type: application/json" -d '{
"iot_approved":false
}' "{{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":false
}
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_name | String | Name given to the gateway |
gateway_euid | String | The MAC address or the identifier of the gateway |
The gateway_name
field can accept only a-zA-Z0-9 .:_-
characters.
By default, the gateway_name
and the gateway_euid
of the gateway will be added to the tags.
The endpoint accepts only gateway_tags
, gateway_name
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"
}
Status | 201 Created |
---|---|
Access-Control-Allow-Origin | * |
Allow | GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS |
Content-Length | 177 |
Content-Type | application/json |
Date | Tue, 25 Jul 2017 13:14:51 GMT |
Server | WSGIServer/0.2 CPython/3.5.2 |
Vary | Cookie |
X-Frame-Options | SAMEORIGIN |
|
Status | 409 Conflict |
---|---|
Access-Control-Allow-Origin | * |
Allow | GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS |
Content-Length | 118 |
Content-Type | application/json |
Date | Tue, 25 Jul 2017 13:15:26 GMT |
Server | WSGIServer/0.2 CPython/3.5.2 |
Vary | Cookie |
X-Frame-Options | SAMEORIGIN |
|
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 |
gateway_name | String | (optional) Name given to the gateway |
The gateway_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 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
and gateway_name
. 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"]
}
Status | 200 OK |
---|
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
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"
}
]
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=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"
},
{
"Tags": "Gateway BDC|D8:38:FC:25:BB:67",
"IoT AP MAC": "D8:38:FC:25:E7:68"
}
]
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
This section describes the set of gateway APIs which are used to interact with the Ruckus RIoT gateway.
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.
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}}
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
}' "{{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
}
This endpoint is a token-auth protected endpoint.
This endpoint is used to set the zigbee dongle Tx power for the network when the IoT network starts. The URL should contain the gateways’ euid.
{{host}}app/v1/gateway/{gateway_euid}/ZIGBEE_TX_POWER
Once the API is called the zigbee Tx Power 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.
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 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.
Request Key Explanation
Key | Type | Explanation |
---|---|---|
zigbee_tx_power | Integer | The Tx power in which the zigbee dongle should start the network |
The zigbee_tx_power
will accept Integer values between 0-20.
The endpoint accepts only zigbee_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 '{
"zigbee_tx_power": 0
}' "{{host}}/app/v1/gateway/D8:38:FC:25:BB:60/management/ZIGBEE_TX_POWER"
PUT %7B%7Bhost%7D%7D/app/v1/gateway/D8:38:FC:25:BB:60/management/ZIGBEE_TX_POWER HTTP/1.1
Host:
Content-Type: application/json
Authorization: Token {{auth_token}}
{
"zigbee_tx_power": 0
}
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 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 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 zigbee dongle should start the network |
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"
}' "{{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"
}
curl -X PATCH -H "Content-Type: application/json" -H "Authorization: Token {{auth_token}}" -d '[
{
"gateway_euid": "D8:38:FC:25:E7:F1",
"iot_mode": "zIgbee"
},
{
"gateway_euid": "*",
"iot_mode": "zIgbee_AA"
}
]' "{{host}}/app/v1/gateway/management/IOT_MODE"
PATCH %7B%7Bhost%7D%7D/app/v1/gateway/management/IOT_MODE HTTP/1.1
Host:
Content-Type: application/json
Authorization: Token {{auth_token}}
[
{
"gateway_euid": "D8:38:FC:25:E7:F1",
"iot_mode": "zIgbee"
},
{
"gateway_euid": "*",
"iot_mode": "zIgbee_AA"
}
]
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"
}
]
curl -X PATCH -H "Content-Type: application/json" -H "Authorization: Token {{auth_token}}" -d '[
{
"gateway_euid": "*",
"zigbee_tx_power": 4
},
{
"gateway_euid": "00:0D:6F:00:05:24:20:CE",
"zigbee_tx_power": 5
}
]' "{{host}}/app/v1/gateway/management/ZIGBEE_TX_POWER"
PATCH %7B%7Bhost%7D%7D/app/v1/gateway/management/ZIGBEE_TX_POWER HTTP/1.1
Host:
Content-Type: application/json
Authorization: Token {{auth_token}}
[
{
"gateway_euid": "*",
"zigbee_tx_power": 4
},
{
"gateway_euid": "00:0D:6F:00:05:24:20:CE",
"zigbee_tx_power": 5
}
]
curl -X PATCH -H "Content-Type: application/json" -H "Authorization: Token {{auth_token}}" -d '[
{
"gateway_euid": "*",
"zigbee_channel": 13
},
{
"gateway_euid": "00:0D:6F:00:05:24:20:CE",
"zigbee_channel": 14
}
]' "{{host}}/app/v1/gateway/management/ZIGBEE_CHANNEL"
PATCH %7B%7Bhost%7D%7D/app/v1/gateway/management/ZIGBEE_CHANNEL HTTP/1.1
Host:
Content-Type: application/json
Authorization: Token {{auth_token}}
[
{
"gateway_euid": "*",
"zigbee_channel": 13
},
{
"gateway_euid": "00:0D:6F:00:05:24:20:CE",
"zigbee_channel": 14
}
]
curl -X GET -H "Authorization: Token {{auth_token}}" "https://{{url}}/service/v1/service-details"
failed to parse url
parse https://{{url}}/service/v1/service-details: invalid character "{" in host name
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}}' "https://{{url}}/service/init"
failed to parse url
parse https://{{url}}/service/init: invalid character "{" in host name
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 |
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}}
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 |
The endpoint accepts only vendor_id
, vendor_name
, package_name
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 |
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": {
}
}' "{{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": {
}
}
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 |
The endpoint accepts only 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 |
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": {
}
}' "{{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": {
}
}
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}}
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}}
Status | 200 |
---|---|
|
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.
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}}
Status | 401 |
---|---|
allow | GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS |
content-length | 63 |
content-type | application/json |
date | Mon, 04 Sep 2017 12:45:50 GMT |
server | WSGIServer/0.2 CPython/3.5.2 |
www-authenticate | token |
x-frame-options | SAMEORIGIN |
|
Status | 200 |
---|---|
Allow | GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS |
Connection | keep-alive |
Content-Length | 65 |
Content-Type | application/json |
Date | Wed, 21 Nov 2018 10:45:35 GMT |
Server | nginx |
Strict-Transport-Security | max-age=63072000 |
X-Frame-Options | SAMEORIGIN |
X-Frame-Options | SAMEORIGIN |
|