Updated on 2022-09-20 GMT+08:00

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

Table 1 Parameter description

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

Table 2 Response parameter description

Parameter

Type

Description

total

integer

Total number of devices.

devices

Array<device>

Device information.

Table 3 Parameter description of devices

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.

  • The value 0 indicates that the device is enabled.
  • The value 1 indicates that the device is disabled.

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"
    }
    ]
}