Core
API v2.x
2

hmset #

Sets multiple fields at once in a hash.

[Redis documentation]


Query Syntax #

HTTP #

Copied to clipboard!
URL: http://kuzzle:7512/ms/_hmset/<_id>
Method: POST
Body:
Copied to clipboard!
{
  "entries": [
    {"field": "<field1 name>", "value": "<field1 value>"},
    {"field": "<field2 name>", "value": "<field2 value>"},
    {"field": "<...>", "value": "<...>"}
  ]
}

Other protocols #

Copied to clipboard!
{
  "controller": "ms",
  "action": "hmset",
  "_id": "<key>",
  "body": {
    "entries": [
      {"field": "<field1 name>", "value": "<field1 value>"},
      {"field": "<field2 name>", "value": "<field2 value>"},
      {"field": "<...>", "value": "<...>"}
    ]
  }
}

Arguments #

  • _id: hash key identifier

Body properties #

  • entries: an array of objects. Each object describes a new hash field to set, with the following properties:
    • field: hash field name
    • value: hash field value

Response #

Returns an acknowledgement.

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