incr
Increments the number stored at key
by 1. If the key does not exist, it is set to 0 before performing the operation.
Query Syntax
HTTP
URL: http://kuzzle:7512/ms/_incr/<_id>
Method: POST
Other protocols
{
"controller": "ms",
"action": "incr",
"_id": "<key>"
}
Arguments
_id
: key identifier
Response
Returns the incremented key value.
{
"requestId": "<unique request identifier>",
"status": 200,
"error": null,
"controller": "ms",
"action": "incr",
"collection": null,
"index": null,
"result": 6
}