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 `registryId`, `folderId`
"registryId": "string",
"folderId": "string",
// end of the list of possible fields
"pageSize": "int64",
"pageToken": "string",
"deviceView": "DeviceView"
}
Field |
Description |
registryId |
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 |
folderId |
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 |
pageSize |
int64 The maximum number of results per page to return. If the number of available |
pageToken |
string Page token. To get the next page of results, set |
deviceView |
enum DeviceView Specifies which parts of the device resource should be returned
|
ListDevicesResponse
{
"devices": [
{
"id": "string",
"registryId": "string",
"createdAt": "google.protobuf.Timestamp",
"name": "string",
"description": "string",
"topicAliases": "string",
"status": "Status",
"monitoringData": {
"lastAuthIp": "string",
"lastAuthTime": "google.protobuf.Timestamp",
"lastPubActivityTime": "google.protobuf.Timestamp",
"lastSubActivityTime": "google.protobuf.Timestamp",
"lastOnlineTime": "google.protobuf.Timestamp"
}
}
],
"nextPageToken": "string"
}
Field |
Description |
devices[] |
List of devices. |
nextPageToken |
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. |
registryId |
string ID of the registry that the device belongs to. |
createdAt |
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. |
topicAliases |
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.
|
monitoringData |
Device monitoring data, returns if FULL view specified. |
DeviceMonitoringData
Field |
Description |
lastAuthIp |
string |
lastAuthTime |
|
lastPubActivityTime |
|
lastSubActivityTime |
|
lastOnlineTime |