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
}