replaceMetadata #
Replace metadata of an asset. It will replace only the fields specified in the request body.
Query Syntax #
HTTP #
URL: http://kuzzle:7512/_/device-manager/:engineId/assets/:_id/metadata
Method: PATCHOther protocols #
{
  "controller": "device-manager/assets",
  "action": "replaceMetadata",
  "engineId": "<engineId>",
  "_id": "<assetId>",
  "body": {
    "metadata": {
      "<metadata name>": "<metadata value>"
    }
  }
}Arguments #
engineId: Engine ID_id: Asset ID
Body properties #
metadata: Object containing metadata
Response #
{
    "action": "replaceMetadata",
    "collection": "assets",
    "controller": "device-manager/assets",
    "error": null,
    "headers": {},
    "index": /** index */,
    "node": /** node */,
    "requestId": /** request id */,
    "result": {
        "_id": /** asset id */,
        "_source": {
            "groups": [],
            "lastMeasuredAt": null,
            "linkedDevices": [],
            "measures": {
                /** mesures */
            },
            "metadata": {
                /** REPLACED METADATA */
            },
            "model": /** asset model */,
            "reference": /** asset reference */,
            "_kuzzle_info": {
                /** data management info */
            }
        }
    },
    "status": 200,
    "volatile": null
}