IoT Core Service, gRPC: DeviceService.List
Retrieves the list of devices in the specified registry.
gRPC request
rpc List (ListDevicesRequest) returns (ListDevicesResponse)
ListDevicesRequest
{
// Includes only one of the fields `registry_id`, `folder_id`
"registry_id": "string",
"folder_id": "string",
// end of the list of possible fields
"page_size": "int64",
"page_token": "string",
"device_view": "DeviceView"
}
Field |
Description |
registry_id |
string ID of the registry to list devices in. To get a registry ID make a yandex.cloud.iot.devices.v1.RegistryService.List request. Includes only one of the fields |
folder_id |
string ID of the folder to list devices in. To get a folder ID make a yandex.cloud.resourcemanager.v1.FolderService.List request. Includes only one of the fields |
page_size |
int64 The maximum number of results per page to return. If the number of available |
page_token |
string Page token. To get the next page of results, set |
device_view |
enum DeviceView Specifies which parts of the device resource should be returned
|
ListDevicesResponse
{
"devices": [
{
"id": "string",
"registry_id": "string",
"created_at": "google.protobuf.Timestamp",
"name": "string",
"description": "string",
"topic_aliases": "map<string, string>",
"status": "Status",
"monitoring_data": {
"last_auth_ip": "string",
"last_auth_time": "google.protobuf.Timestamp",
"last_pub_activity_time": "google.protobuf.Timestamp",
"last_sub_activity_time": "google.protobuf.Timestamp",
"last_online_time": "google.protobuf.Timestamp"
}
}
],
"next_page_token": "string"
}
Field |
Description |
devices[] |
List of devices. |
next_page_token |
string Token for getting the next page of the list. If the number of results is greater than Each subsequent page will have its own |
Device
A device. For more information, see Device.
Field |
Description |
id |
string ID of the device. |
registry_id |
string ID of the registry that the device belongs to. |
created_at |
Creation timestamp. |
name |
string Name of the device. The name is unique within the registry. |
description |
string Description of the device. 0-256 characters long. |
topic_aliases |
object (map<string, string>) Alias of a device topic. Alias is an alternate name of a device topic assigned by the user. Map alias to canonical topic name prefix, e.g. |
status |
enum Status Status of the device.
|
monitoring_data |
Device monitoring data, returns if FULL view specified. |
DeviceMonitoringData
Field |
Description |
last_auth_ip |
string |
last_auth_time |
|
last_pub_activity_time |
|
last_sub_activity_time |
|
last_online_time |