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

create #

Creates an asset.

Query Syntax #

HTTP #

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

Other protocols #

{
  "controller": "device-manager/assets",
  "action": "create",
  "engineId": "<engineId>",
  "body": {
    "model": "<asset model>",
    "reference": "<asset reference>",
    "metadata": {
      "<metadata name>": "<metadata value>"
    }
  }
}

Arguments #

  • engineId: Engine ID

Body properties #

  • model: Asset model name
  • reference: Asset reference (must be unique within a model)
  • metadata: Object containing metadata

Response #

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