Core
API v1.x
1

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

decr #

Decrements the number stored at key by 1. If the key does not exist, it is set to 0 before performing the operation.

[Redis documentation]


Query Syntax #

HTTP #

Copied to clipboard!
URL: http://kuzzle:7512/ms/_decr/<_id>
Method: POST

Other protocols #

Copied to clipboard!
{
  "controller": "ms",
  "action": "decr",
  "_id": "<key>"
}

Arguments #

  • _id: key to decrement

Response #

Returns the updated key value.

Copied to clipboard!
{
  "requestId": "<unique request identifier>",
  "status": 200,
  "error": null,
  "controller": "ms",
  "action": "decr",
  "collection": null,
  "index": null,
  "result": -13
}