update #
Applies partial changes to a device.
See also the document:update API action.
Query Syntax #
HTTP #
URL: http://kuzzle:7512/_/device-manager/:index/devices/:_id[?refresh=wait_for][&retryOnConflict=<int>][&source]
Method: PUT
Body:{
  // device changes
}Other protocols #
{
  "index": "<index>",
  "controller": "device-manager/device",
  "action": "update",
  "_id": "<deviceId>",
  "body": {
    // device changes
  }
}Kourou #
kourou device-manager/device:update <index> --id <deviceId> --body '{
  // device changes
}'Arguments #
index: Tenant 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 device.
Response #
Returns information about the updated device:
_id: device unique identifier_version: updated device version_source: contains only changes or the full device ifsourceis set totrue
{
  "status": 200,
  "error": null,
  "index": "<index>",
  "controller": "device-manager/device",
  "action": "update",
  "requestId": "<unique request identifier>",
  "result": {
    "_id": "<deviceId>",
    "_version": 2,
    "_source": "<partial or entire document>"
  }
}