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

getMeasures #

Retrieves measures from an asset.


Query Syntax #

HTTP #

Copied to clipboard!
URL: http://kuzzle:7512/_/device-manager/:engineId/assets/:_id/measures
Method: GET or POST

Other protocols #

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

  // optional:
  "from": "<starting offset>",
  "size": "<page size>",
  "startAt": "<beginning of time range>",
  "endAt": "<end of time range>",
  "type": "<measure type>"
}

Arguments #

  • engineId: engine id
  • _id: asset id (ISO_8601)
  • from (optional): paginates search results by defining the offset from the first result you want to fetch. Usually used with the size argument
  • size (optional): set the maximum number of documents returned per result page
  • startAt (optional): beginning of time range (ISO 8601)
  • endAt (optional): end of time range (ISO 8601)
  • type (optional): measure type

Body properties #


Response #

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