Getting user devices (get devices)
The vendor queries for a list of the user's devices. Sber Smart Home returns the list.
- From time to time, the vendor queries Sber Smart Home for a list of user devices - it is needed to show an up-to-date information in the vendor's app.
- Sber Smart Home returns the list of user devices.
- The vendor updates its database and shows the up-to-date information in its application.
The vendor sends a query to Sber Smart Home endpoint:
https://partners.iot.sberdevices.ru/. For the headers, see Query headers.
|user_id||string||✔︎||User ID in the vendor’s system Sber Smart Home gets IDs during account linking and then stores them (see the Getting User Info (get user) method)|
|device_ids||list<string>||List of device IDs in the vendor's system. It is posted when the vendor needs to know whether a user of Sber Smart Home has any specific devices. For example, if the vendor wants to make sure that certain devices have been added to Sber Smart Home|
Sber Smart Home sends a response to the vendor's endpoint. For the headers, see Query headers.
|devices||list<object>||✔︎||List of user devices (see User device (device))|
If an error occurs, you must return an object of the Common error (common error) type:
Sample query and response
The vendor queries for a list of the user's devices. Sber Smart Home returns a list of two devices: a socket and a lamp.
curl -i -X GET /v1/devices?user_id=AB12345 HTTP/1.1 \
-H Host: example.com \
-H Content-Type: application/json \
-H Authorization: Bearer qwerty-1234-... \
-H X-Request-Id: abcd-0000-ifgh-...
"name": "Kitchen outlet",
"default_name": "Smart outlet"
"default_name": "Smart Lamp"
"message": "Invalid argument",