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

searchAssets #

Searches for asset models.


Query Syntax #

HTTP #

URL: http://kuzzle:7512/_/device-manager/models/assets/_search
Method: POST

Other protocols #

{
  "controller": "device-manager/models",
  "action": "searchAssets",
  "engineGroup": "<engineGroup>",
  "body": {
    "query": {
      // ...
    },
    "sort": [
      // ...
    ]
  },

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

Arguments #

  • engineGroup: name of the engine group
  • 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

Body properties #


Response #

{
  "status": 200,
  "error": null,
  "controller": "device-manager/models",
  "action": "searchAssets",
  "requestId": "<unique request identifier>",
  "result": {
    "hits": [
      {
        "_id": "<assetModelId>",
        "_source": {
          // Asset model content
        },
      },
    ],
    "total": 42
  }
}