Kuzzle
Documentation
2

linkAsset #

Link a device to an asset.

The device measures will be copied into the asset.


Query Syntax #

HTTP #

Copied to clipboard!
URL: http://kuzzle:7512/_/device-manager/:index/devices/:_id/_linkAsset/:assetId[?refresh=wait_for]
Method: PUT

Other protocols #

Copied to clipboard!
{
  "index": "<index>",
  "controller": "device-manager/device",
  "action": "linkAsset",
  "_id": "<deviceId>",
  "assetId": "<assetId>"
}

Kourou #

Copied to clipboard!
kourou device-manager/device:linkAsset <index> --id <deviceId> -a assetId=<assetId>

Arguments #

  • index: Tenant index name
  • assetId: Asset unique identifier

Optional: #

  • refresh: if set to wait_for, Kuzzle will not respond until the documents are indexed

Response #

Copied to clipboard!
{
  "status": 200,
  "error": null,
  "index": "<index>",
  "controller": "device-manager/device",
  "action": "linkAsset",
  "requestId": "<unique request identifier>",
  "result": {}
}