hincrby

Increments the number stored in a hash field by the provided integer value.

[Redis documentation]


Query Syntax

HTTP

Copied to clipboard!
URL: http://kuzzle:7512/ms/_hincrby/<_id>
Method: POST
Body:
Copied to clipboard!
{
  "field": "field name",
  "value": <increment integer value>
}

Other protocols

Copied to clipboard!
{
  "controller": "ms",
  "action": "hincrby",
  "_id": "<key>",
  "body": {
    "field": "field name",
    "value": <increment integer value>
  }
}

Arguments

  • _id: hash key identifier

Body properties

  • field: the hash field to increment
  • value: the integer to add to the field value

Response

Returns the updated value for the incremented hash field.

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