sunionstore

Computes the union of multiple sets of unique values and stores it in a new set.

If the destination key already exists, it is overwritten.

[Redis documentation]


Query Syntax

HTTP

Copied to clipboard!
URL: http://kuzzle:7512/ms/_sunionstore
Method: POST
Body:
Copied to clipboard!
{
  "destination": "<destination key>",
  "keys": ["key1", "key2", "..."]
}

Other protocols

Copied to clipboard!
{
  "controller": "ms",
  "action": "sunionstore",
  "body": {
    "destination": "<destination key>",
    "keys": ["key1", "key2", "..."]
  }
}

Body properties

  • destination: destination for the union result
  • keys: array of set identifiers

Response

Returns the number of members stored in the destination set.

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