Getting full information about the user's smart home
Request for getting full information about the entities of the user's smart home.
Request format
GET https://api.iot.yandex.net/v1.0/user/info
Request headers
Header |
Description |
Required |
Authorization |
The authorization token of the OAuth application. |
Yes |
Response format
Brief structure
HTTP/1.1 200 OK
{
"status": "ok",
"request_id": String,
"rooms": [RoomObject],
"groups": [GroupObject],
"devices": [DeviceObject],
"scenarios": [ScenarioObject],
"households": [HouseholdObject]
}
Full structure
HTTP/1.1 200 OK
{
"status": "ok",
"request_id": String,
"rooms": [{
"id": String,
"name": String,
"household_id": String,
"devices": [String]
},
{
"id": String,
"name": String,
"household_id": String,
"devices": [String]
}
],
"groups": [{
"id": String,
"name": String,
"aliases": [String],
"household_id": String,
"type": "devices.types.{type}",
"devices": [String],
"capabilities": [{
"retrievable": Boolean,
"type": "devices.capabilities.{capability}",
"parameters": {},
"state": {}
},
{
"retrievable": Boolean,
"type": "devices.capabilities.{capability}",
"parameters": {},
"state": {}
}
]
}],
"devices": [{
"id": String,
"name": String,
"aliases": [String],
"type": "devices.types.{type}",
"external_id": String,
"skill_id": String,
"household_id": String,
"room": String,
"groups": [String],
"capabilities": [{
"reportable": Boolean,
"retrievable": Boolean,
"type": "devices.capabilities.{capability}",
"parameters": {},
"state": {},
"last_updated": Float
},
{
"reportable": Boolean,
"retrievable": Boolean,
"type": "devices.capabilities.{capability}",
"parameters": {},
"state": {},
"last_updated": Float
}
],
"properties": []
},
{
"id": String,
"name": String,
"aliases": [String],
"type": "devices.types.{type}",
"external_id": String,
"skill_id": String,
"household_id": String,
"room": String,
"groups": [String],
"capabilities": [{
"reportable": Boolean,
"retrievable": Boolean,
"type": "devices.capabilities.{capability}",
"parameters": {},
"state": {},
"last_updated": Float
},
{
"reportable": Boolean,
"retrievable": Boolean,
"type": "devices.capabilities.{capability}",
"parameters": {},
"state": {},
"last_updated": Float
}
],
"properties": []
}
],
"scenarios": [{
"id": String,
"name": String,
"is_active": Boolean
},
{
"id": String,
"name": String,
"is_active": Boolean
}
],
"households": [{
"id": String,
"name": String
}]
}
Parameter |
Type |
Description |
Required |
request_id |
String |
Request ID. Must be logged for the purpose of incident investigation. |
Yes |
status1 |
String |
Status of processing the request. Acceptable values:
|
Yes |
rooms |
Array of RoomObjects |
Array of rooms. |
Yes |
groups |
Array of GroupObjects |
Array of device groups. |
Yes |
devices |
Array of DeviceObjects |
Array of devices. |
Yes |
scenarios |
Array of ScenarioObjects |
Array of scenarios. |
Yes |
households |
Array of HouseholdObjects |
An array of households. |
Yes |
RoomObject
type
Parameter |
Type |
Description |
Required |
id |
String |
The ID of the room. |
Yes |
name |
String |
The name of the room. |
Yes |
devices |
Array of Strings |
Array of IDs for devices in the room. |
Yes |
household_id |
String |
The ID of the household where the room is located. |
Yes |
GroupObject
type
Parameter |
Type |
Description |
Required |
id |
String |
The ID of the device group. |
Yes |
name |
String |
The name of the device group. |
Yes |
aliases |
Array of Strings |
An array with additional device names. |
Yes |
type |
String |
The type of the device group. It's the same as the device type for the group. |
Yes |
capabilities |
Array of GroupCapabilityObjects |
An array with information about the capabilities of the device group. |
Yes |
devices |
Array of Strings |
Array of IDs of devices in the group. |
Yes |
household_id |
String |
The household ID of the device group. |
Yes |
capabilities
array
Parameter |
Type |
Description |
Required |
capability1 |
GroupCapabilityObject |
Description of capability. For more information about the list of available capabilities and their parameters, see Capabilities. |
No |
capability2 |
GroupCapabilityObject |
Description of capability. For more information about the list of available capabilities and their parameters, see Capabilities. |
No |
GroupCapabilityObject
type
Parameter |
Type |
Description |
Required |
type |
String |
Yes |
|
retrievable |
Boolean |
If it's possible to request the state of this capability. |
Yes |
parameters |
CapabilityParametersObject |
Capability parameters. Corresponds to the value of the |
Yes |
state |
CapabilityStateObject |
The current state of the capability. If the value is |
Yes |
DeviceObject
type
Parameter |
Type |
Description |
Required |
id |
String |
Device ID. |
Yes |
name |
String |
The name of the device. |
Yes |
aliases |
Array of Strings |
An array with additional device names. |
Yes |
room |
String |
The ID of the device room. The |
Yes |
external_id |
String |
The ID of the device in the manufacturer's cloud. |
Yes |
skill_id |
String |
The ID of the device manufacturer's skill. |
Yes |
type |
String |
Yes |
|
groups |
Array of Strings |
Array with IDs of the device's groups. |
Yes |
capabilities |
Array of DeviceCapabilityObjects |
Array with information about device capabilities. |
Yes |
properties |
Array of DevicePropertyObjects |
Array with information about the device properties. |
Yes |
household_id |
String |
ID of the device's household. |
Yes |
capabilities
array
Parameter |
Type |
Description |
Required |
capability1 |
Description of capability. |
No |
|
capability2 |
Description of capability. |
No |
properties
array
Parameter |
Type |
Description |
Required |
property1 |
Property description. |
No |
|
property2 |
Property description. |
No |
DeviceCapabilityObject
type
Parameter |
Type |
Description |
Required |
type |
String |
Yes |
|
reportable |
Boolean |
Whether the capability reports the state change to Yandex Smart Home using the notification service. |
Yes |
retrievable |
Boolean |
If it's possible to request the state of this device capability. |
Yes |
parameters |
CapabilityParametersObject |
Capability parameters. Corresponds to the value of the |
Yes |
state |
CapabilityStateObject |
The current state of the capability. If the value is |
Yes |
last_updated |
Float |
The time of the last state update in seconds, in the Unix timestamp format. |
Yes |
DevicePropertyObject
type
Parameter |
Type |
Description |
Required |
type |
String |
Yes |
|
reportable |
Boolean |
Whether the property reports the state change to Yandex Smart Home using the notification service. |
Yes |
retrievable |
Boolean |
Whether the state of this device property can be requested. |
Yes |
parameters |
PropertyParametersObject |
Property parameters. Corresponds to the value of the |
Yes |
state |
PropertyStateObject |
Current property state. If the value is |
Yes |
last_updated |
Float |
The time of the last state update in seconds, in the Unix timestamp format. |
Yes |
ScenarioObject
type
Parameter |
Type |
Description |
Required |
id |
String |
The ID of the scenario. |
Yes |
name |
String |
The name of the scenario. |
Yes |
is_active |
Boolean |
The flag of whether this scenario is currently active. An inactive scenario hasn't been deleted by the user, but it can't be started. |
Yes |
HouseholdObject
type
Parameter |
Type |
Description |
Required |
id |
String |
The ID of the household. |
Yes |
name |
String |
The name of the household. |
Yes |
HTTP/1.1 500 Internal Server Error
{
"request_id": String,
"status": "error",
"message": String
}
Parameter |
Type |
Description |
Required |
request_id |
String |
Request ID. Must be logged for the purpose of incident investigation. |
Yes |
status |
String |
Status of processing the request. Acceptable values:
|
Yes |
message |
String |
Error message. |
No |
Example
curl -i -X GET 'https://api.iot.yandex.net/v1.0/user/info' \
-H 'Authorization: Bearer 123qwe456a...'
HTTP/1.1 200 OK
{
"status": "ok",
"request_id": "8348dba1-ad56-4984-b953-ccd27e42f009",
"rooms": [{
"id": "room-id-1",
"name": "Гостиная",
"household_id": "household-id-1",
"devices": [
"lamp-id-1",
"lamp-id-2",
"lamp-id-3",
"speaker-id-1"
]
},
{
"id": "room-id-2",
"name": "Прихожая",
"household_id": "household-id-1",
"devices": [
"vacuum-cleaner-id-1"
]
}
],
"groups": [{
"id": "light-group-id-1",
"name": "Люстра",
"aliases": ["Верхний свет"],
"household_id": "household-id-1",
"type": "devices.types.light",
"devices": [
"lamp-id-1",
"lamp-id-2",
"lamp-id-3"
],
"capabilities": [{
"retrievable": true,
"type": "devices.capabilities.color_setting",
"parameters": {
"color_model": "hsv",
"temperature_k": {
"min": 1700,
"max": 6500
}
},
"state": {
"instance": "temperature_k",
"value": 3400
}
},
{
"retrievable": true,
"type": "devices.capabilities.on_off",
"parameters": {
"split": false
},
"state": {
"instance": "on",
"value": false
}
},
{
"retrievable": true,
"type": "devices.capabilities.range",
"parameters": {
"instance": "brightness",
"unit": "unit.percent",
"random_access": true,
"range": {
"min": 1,
"max": 100,
"precision": 1
}
},
"state": {
"instance": "brightness",
"value": 100
}
}
]
}],
"devices": [{
"id": "lamp-id-1",
"name": "Лампочка 1",
"aliases": [],
"type": "devices.types.light",
"external_id": "external-lamp-id-1",
"skill_id": "skill-id-1",
"household_id": "household-id-1",
"room": "room-id-1",
"groups": [
"light-group-id-1"
],
"capabilities": [{
"reportable": false,
"retrievable": true,
"type": "devices.capabilities.on_off",
"parameters": {
"split": false
},
"state": {
"instance": "on",
"value": false
},
"last_updated": 1626681729.2964342
},
{
"reportable": false,
"retrievable": true,
"type": "devices.capabilities.range",
"parameters": {
"instance": "brightness",
"unit": "unit.percent",
"random_access": true,
"range": {
"min": 1,
"max": 100,
"precision": 1
}
},
"state": {
"instance": "brightness",
"value": 100
},
"last_updated": 1626681729.2964342
},
{
"reportable": false,
"retrievable": true,
"type": "devices.capabilities.color_setting",
"parameters": {
"color_model": "rgb",
"temperature_k": {
"min": 1700,
"max": 6500
}
},
"state": {
"instance": "temperature_k",
"value": 3400
},
"last_updated": 1626681729.2964342
}
],
"properties": []
},
{
"id": "lamp-id-2",
"name": "Лампочка 2",
"aliases": [],
"type": "devices.types.light",
"external_id": "external-lamp-id-2",
"skill_id": "skill-id-1",
"household_id": "household-id-1",
"room": "room-id-1",
"groups": [
"light-group-id-1"
],
"capabilities": [{
"reportable": false,
"retrievable": true,
"type": "devices.capabilities.on_off",
"parameters": {
"split": false
},
"state": {
"instance": "on",
"value": false
},
"last_updated": 1626681729.2964342
},
{
"reportable": false,
"retrievable": true,
"type": "devices.capabilities.range",
"parameters": {
"instance": "brightness",
"unit": "unit.percent",
"random_access": true,
"range": {
"min": 1,
"max": 100,
"precision": 1
}
},
"state": {
"instance": "brightness",
"value": 100
},
"last_updated": 1626681729.2964342
},
{
"reportable": false,
"retrievable": true,
"type": "devices.capabilities.color_setting",
"parameters": {
"color_model": "rgb",
"temperature_k": {
"min": 1700,
"max": 6500
}
},
"state": {
"instance": "temperature_k",
"value": 3400
},
"last_updated": 1626681729.2964342
}
],
"properties": []
},
{
"id": "lamp-id-3",
"name": "Лампочка 3",
"aliases": [],
"type": "devices.types.light",
"external_id": "external-lamp-id-3",
"skill_id": "skill-id-1",
"household_id": "household-id-1",
"room": "room-id-1",
"groups": [
"light-group-id-1"
],
"capabilities": [{
"reportable": false,
"retrievable": true,
"type": "devices.capabilities.on_off",
"parameters": {
"split": false
},
"state": {
"instance": "on",
"value": false
},
"last_updated": 1626681729.2964342
},
{
"reportable": false,
"retrievable": true,
"type": "devices.capabilities.range",
"parameters": {
"instance": "brightness",
"unit": "unit.percent",
"random_access": true,
"range": {
"min": 1,
"max": 100,
"precision": 1
}
},
"state": {
"instance": "brightness",
"value": 100
},
"last_updated": 1626681729.2964342
},
{
"reportable": false,
"retrievable": true,
"type": "devices.capabilities.color_setting",
"parameters": {
"color_model": "rgb",
"temperature_k": {
"min": 1700,
"max": 6500
}
},
"state": {
"instance": "temperature_k",
"value": 3400
},
"last_updated": 1626681729.2964342
}
],
"properties": []
},
{
"id": "vacuum-cleaner-id-1",
"name": "Пылесос",
"aliases": [],
"type": "devices.types.vacuum_cleaner",
"external_id": "external-vacuum-cleaner-id-1",
"skill_id": "skill-id-2",
"household_id": "household-id-1",
"room": "room-id-2",
"groups": [],
"capabilities": [{
"reportable": false,
"retrievable": true,
"type": "devices.capabilities.on_off",
"parameters": {
"split": false
},
"state": {
"instance": "on",
"value": false
},
"last_updated": 1626681729.2964342
},
{
"reportable": false,
"retrievable": true,
"type": "devices.capabilities.toggle",
"parameters": {
"instance": "pause"
},
"state": {
"instance": "pause",
"value": false
},
"last_updated": 1626681729.2964342
}
],
"properties": [{
"type": "devices.properties.float",
"reportable": false,
"retrievable": true,
"parameters": {
"instance": "battery_level",
"unit": "unit.percent"
},
"state": {
"instance": "battery_level",
"value": 100
},
"last_updated": 1626681729.2964342
}]
},
{
"id": "speaker-id-1",
"name": "Яндекс Станция",
"aliases": [],
"type": "devices.types.smart_speaker.yandex.station",
"external_id": "external-speaker-id-1",
"skill_id": "Q",
"household_id": "household-id-1",
"room": "room-id-1",
"groups": [],
"capabilities": [],
"properties": []
}
],
"scenarios": [{
"id": "scenario-id-1",
"name": "Световой будильник",
"is_active": true
},
{
"id": "scenario-id-2",
"name": "Время уборки",
"is_active": true
},
{
"id": "scenario-id-3",
"name": "Музыка для настолок",
"is_active": false
}
],
"households": [{
"id": "household-id-1",
"name": "Мой дом"
}]
}
HTTP/1.1 500 Internal Server Error
{
"request_id": "9813e54b-021d-4203-b22a-02c6370d07b1",
"status": "error",
"message": "Внутренняя ошибка сервера"
}
Floating-point number with a precision of 6-9 decimal digits.
String enclosed in quotation marks, for example: "Hello, world"
.
Boolean value without quotes: true
or false
.
An array of elements separated by a comma. As array items, you can use standard JSON elements: a string, number, true
, false
, object, or array. Arrays are enclosed in square brackets []
:
"cities": ["Moscow", "Tokyo", "New York"]
Type
Array of Strings
Description
Array of IDs for devices in the room.
Required
Yes
Type
String
Description
The ID of the device group.
Required
Yes
Type
String
Description
The name of the device group.
Required
Yes
Type
Array of Strings
Description
Array of IDs of devices in the group.
Required
Yes
Type
String
Description
Required
Yes
Type
String
Description
Device ID.
Required
Yes
Type
String
Description
The name of the device.
Required
Yes
Type
Array of Strings
Description
An array with additional device names.
Required
Yes
Type
String
Description
Required
Yes
Type
String
Description
The ID of the device room. The null
value is transmitted if the device is not linked to the room.
Required
Yes
Type
Array of Strings
Description
Array with IDs of the device's groups.
Required
Yes
Type
String
Description
The ID of the scenario.
Required
Yes
Type
String
Description
The name of the scenario.
Required
Yes
Type
String
Description
The ID of the household.
Required
Yes
Type
String
Description
The name of the household.
Required
Yes
Type
String
Description
Request ID. Must be logged for the purpose of incident investigation.
Required
Yes
Type
String
Description
Status of processing the request. Acceptable values:
error
.
Required
Yes
Type
String
Description
Error message.
Required
No