hub.scenes.item.groups.list
- Version: 1.0
- Classes: UI
- Title: Scene manager categories
- Description: Returns an array of item groups by id
Edit
Field | Type | Required | Description |
---|---|---|---|
ids | array of IDs | – | Filter output with only these item groups |
version | int64 | – | Current version of item groups list the client has already had. If a client doesn’t have any device groups list yet, should be empty. If the version of the list has no changes, the response is empty. Can be used only for getting the full list, the request souldn’t have any other parameters! |
Edit
- Array/filtered array of item groups or version of device groups list.
Edit
Code | Message | Data |
---|---|---|
-32602 | Wrong params, | |
-32602 | Wrong field of object |
Edit
Edit
1. Get the full list
Edit
{
"id": "__ID__",
"api": "1.0",
"method": "hub.scenes.item.groups.list",
"params": {
}
}
Edit
{
"api": "1.0",
"error": null,
"id": "633216245ab7be12415365c4",
"result": {
"itemGroups": [
{
"_id": "633216245ab7be12415365c4",
"name": "switched",
"itemNames": [ "switch" ],
... all oher fields ...
"persistent": false
}
],
"version": 2534567890
}
}
Edit
1. Optimised request: client has item groups list of specific version already and asks about the changed one:
Note: By default, returns full list of item group objects. Note: The can be used to avoid passing data from a controller to a client, if the client already has the same version of data