Official Plugins (Kuzzle v2.x)
Device Manager v2.x
2

search #

Searches for assets.


Query Syntax #

HTTP #

Copied to clipboard!
URL: http://kuzzle:7512/_/device-manager/:engineId/assets/_search
Method: POST

Other protocols #

Copied to clipboard!
{
  "controller": "device-manager/assets",
  "action": "search",
  "engineId": "<engineId>",
  "body": {
    "query": {
      // ...
    },
    "sort": [
      // ...
    ]
  },

  // optional:
  "from": "<starting offset>",
  "size": "<page size>",
  "lang": "<query language>"
}

Arguments #

  • engineId: engine id
  • from: paginates search results by defining the offset from the first result you want to fetch. Usually used with the size argument
  • size: set the maximum number of documents returned per result page
  • lang: specify the query language to use. By default, it's elasticsearch but koncorde can also be used.

Body properties #


Response #

Copied to clipboard!
{
  "status": 200,
  "error": null,
  "controller": "device-manager/assets",
  "action": "search",
  "requestId": "<unique request identifier>",
  "result": {
    "hits": [
      {
        "_id": "<assetId>",
        "_source": {
          // Asset content
        },
      },
    ],
    "total": 42
  }
}