update #
Applies partial changes to an asset.
See also the document:update API action.
Query Syntax #
HTTP #
URL: http://kuzzle:7512/_/device-manager/:index/assets/:_id[?refresh=wait_for][&retryOnConflict=<int>][&source]
Method: PUT
Body:{
  // asset changes
}Other protocols #
{
  "index": "<index>",
  "controller": "device-manager/asset",
  "action": "update",
  "_id": "<assetId>",
  "body": {
    // asset changes
  }
}Kourou #
kourou device-manager/asset:update <index> --id <assetId> --body '{ 
  // asset changes
}'Arguments #
index: index name
Optional: #
refresh: if set towait_for, Kuzzle will not respond until the update is indexedretryOnConflict: conflicts may occur if the same document gets updated multiple times within a short timespan, in a database cluster. You can set theretryOnConflictoptional argument (with a retry count), to tell Kuzzle to retry the failing updates the specified amount of times before rejecting the request with an error.source: if set totrueKuzzle will return the entire updated document body in the response.
Body properties #
Partial changes to apply to the asset.
Response #
Returns information about the updated asset:
_id: asset unique identifier_version: updated asset version_source: contains only changes or the full asset ifsourceis set totrue
{
  "status": 200,
  "error": null,
  "index": "<index>",
  "controller": "device-manager/asset",
  "action": "update",
  "requestId": "<unique request identifier>",
  "result": {
    "_id": "<assetId>",
    "_version": 2,
    "_source": "<partial or entire document>"
  }
}