search #
Searches for assets.
Query Syntax #
HTTP #
URL: http://kuzzle:7512/_/device-manager/:engineId/assets/_search
Method: POSTOther protocols #
{
"controller": "device-manager/assets",
"action": "search",
"engineId": "<engineId>",
"body": {
"query": {
// ...
},
"sort": [
// ...
]
},
// optional:
"from": "<starting offset>",
"size": "<page size>",
"lang": "<query language>"
}Arguments #
engineId: engine idfrom: paginates search results by defining the offset from the first result you want to fetch. Usually used with thesizeargumentsize: set the maximum number of documents returned per result pagelang: specify the query language to use. By default, it'selasticsearchbutkoncordecan also be used.
Body properties #
query: the search query itself, using the ElasticSearch Query DSL or the Koncorde Filters DSL syntax.sort: contains a list of fields, used to sort search results, in order of importance
Response #
{
"status": 200,
"error": null,
"controller": "device-manager/assets",
"action": "search",
"requestId": "<unique request identifier>",
"result": {
"hits": [
{
"_id": "<assetId>",
"_source": {
// Asset content
},
},
],
"total": 42
}
}