search.omni
The search.omni command is used to search for things and connections matching user specified search criteria, sorted by relevance.
TR50 Request
{
"cmd": {
"command": "search.omni",
"params": {
"limit": "50",
"query": "a*t*"
}
}
}
Request Parameters
Name | Type | Required | Description |
---|---|---|---|
query | String | Yes | The search criteria used to return matching Things. For more information and few sample of the search criteria, see Using Search. |
offset | Integer | The starting list offset, used for pagination. Defaults to 0 if not specified. | |
limit | Integer | Limits the number of results returned. Defaults to the maximum configured size. |
TR50 Response
If the command is sent successfully a success message and the thing is returned. Otherwise, an error and error message will be returned.
{
"cmd": {
"success": true,
"params": {
"count": 14911,
"result": [
{
"id": "56f05902681fdc307a7e06b2",
"name": "Thing",
"key": "thing",
"defKey": "thingDef",
"defName": "Thing definition",
"lastSeen": "2016-08-11T09:16:51.431-04:00",
"createdOn": "2016-03-21T16:26:42.807-04:00",
"updatedOn": "2016-07-27T08:23:55.86-04:00",
"_type": "thing"
}
...
]
}
}
}
Response Parameters
Name | Type | Description |
---|---|---|
count | Integer | The total number of matching objects. |
result | Array | The mixed array of things and connections objects. |