Core
API v2.x
2

incr #

Increments 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/_incr/<_id>
Method: POST

Other protocols #

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

Arguments #

  • _id: key identifier

Response #

Returns the incremented key value.

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