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

unlinkAssets #

Unlinks measures from a devices.

Query Syntax #

HTTP #

URL: http://kuzzle:7512/_/device-manager/:engineId/devices/:_id/unlink
Method: DELETE

Other protocols #

{
  "controller": "device-manager/devices",
  "action": "unlinkAssets",
  "engineId": "<engineId>",
  "_id": "<deviceId>"
  "body": {
    "linkedMeasures": [
      { "assetId":"<id of the asset>"
        "allMeasures": "<boolean>"                            // optional
        "measureSlots":[                                      // optional
            {
              "asset": "<name of the measure in the asset>",
              "device": "<name of the measure in the device>"
            }
        ]
    },
    {...}
    ]
  },
}

Arguments #

  • engineId: Engine ID
  • _id: Device ID

Body properties #

  • linkedMeasures: Array containing the link to establish, one per asset. - assetId: The id of the asset to unlink, - allMeasures: Boolean to unlink all linked measures. (optional) - measureSlots An array containing a corresponding table between device measure name and asset measure name. (optional)

Response #

{
  "status": 200,
  "error": null,
  "controller": "device-manager/devices",
  "action": "unlinkAssets",
  "requestId": "<unique request identifier>",
  "result": {
    "device": {
      "_id": "<deviceId>",
      "_source": {
        // Device content
      },
    },
    "assets":/*  
        Array<{
          "_id": "<assetId>",
          "_source": {
              // Asset content
        },
        }>, 
    */
  }
}