Querying Devices
Function
This API is used to query information of a specified device, including the device name, device ID, associated product ID, client ID, password, device description, status, and username.
URI
GET /v1/{project_id}/link/instances/{instance_id}/devices
|
Parameter |
Type |
Mandatory |
Description |
|---|---|---|---|
|
project_id |
string |
Yes |
Project ID of each region of a tenant. |
|
instance_id |
string |
Yes |
ID of the ROMA Connect instance used by the tenant. |
Request
Request parameters
None
Example request
https://example.cloud.com/v1/80e2b******f4a398d6409a50932d917/link/instances/fb3b24ab-5d87-473d-9c57-fc6******6a1/devices
Response
Response parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
total |
integer |
Total number of devices. |
|
devices |
Array<device> |
Device information. |
|
Parameter |
Type |
Description |
|---|---|---|
|
client_id |
string |
Client ID. |
|
device_id |
integer |
Device ID. |
|
device_name |
string |
Device name. The value can contain a maximum of 64 characters, including letters, digits, underscores (_), and hyphens (-). |
|
password |
string |
Password. |
|
product_id |
integer |
Product ID. |
|
product_name |
string |
Product name. |
|
remark |
string |
Device description, which contains a maximum of 200 characters. |
|
status |
integer |
Device status. The value can be 0 or 1.
|
|
user_name |
string |
Username. |
Example response
{
"total": 1,
"devices": [
{
"device_id": 49,
"device_name": "device8",
"product_id": 20,
"product_name": "user_demo",
"client_id": "D2186efd403682f8",
"password": "*****************",
"remark": null,
"status": 0,
"user_name": "d0784baedafe4d5c8e5c951744ac11dd"
}
]
}
Last Article: Creating a Custom Topic for a Device
Next Article: Querying Device Topics
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.