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

getMeasures #

Retrieves measure from a device.


Query Syntax #

HTTP #

URL: http://kuzzle:7512/_/device-manager/:engineId/devices/:_id/measures
Method: GET or POST

Other protocols #

{
  "controller": "device-manager/devices",
  "action": "getMeasures",
  "engineId": "<engineId>",
  "_id": "<deviceId>",
  "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: device id ISO_8601
  • 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
  • startAt: beginning of time range (ISO 8601)
  • endAt: end of time range (ISO 8601)
  • type: measure type

Body properties #


Response #

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