// Using callbacks (NodeJS or Web Browser)
kuzzle.memoryStorage.sunion(['key1', 'key2', '...'], function (err, values) {
  // callback called once the action has completed

// Using promises (NodeJS only)
kuzzle.memoryStorage.sunionPromise(['key1', 'key2', '...'])
  .then(values => {
    // resolved once the action has completed
String[] keys = new String[]{"key1", "key2", "..."};

kuzzle.memoryStorage.sunion(keys, new ResponseListener<String[]>() {
  public void onSuccess(String[] values) {
    // callback called once the action has completed

  public void onError(JSONObject error) {

use \Kuzzle\Kuzzle;

$kuzzle = new Kuzzle('localhost');

try {
  $values = $kuzzle->memoryStorage()->sunion(['key1', 'key2', '...']);
catch (ErrorException $e) {


Callback response:

  "union value1",
  "union value2",

Returns the union of the provided sets of unique values.

[Redis documentation]

sunion(keys, [options], callback)

keysstringList of sets of unique values
optionsJSON ObjectOptional parameters


queuablebooleanMark this request as (not) queuabletrue

Callback response

Resolves to an array of the values in the computed union.