Core
API v2.x
2

decrby #

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

[Redis documentation]


Query Syntax #

HTTP #

URL: http://kuzzle:7512/ms/_decrby/<_id>
Method: POST
Body:
{
  "value": <decrement value>
}

Other protocols #

{
  "controller": "ms",
  "action": "decrby",
  "_id": "<key>",
  "body": {
    "value": <decrement value>
  }
}

Arguments #

  • _id: key to decrement

Body properties #

  • value: the decrement value

Response #

Returns the updated key value.

{
  "requestId": "<unique request identifier>",
  "status": 200,
  "error": null,
  "controller": "ms",
  "action": "decrby",
  "collection": null,
  "index": null,
  "result": 1337
}