// Using callbacks (NodeJS or Web Browser)
kuzzle.memoryStorage.sscan('key', 0, function (err, page) {
  // callback called once the action has completed

// Using promises (NodeJS only)
kuzzle.memoryStorage.sscanPromise('key', 0)
  .then(page => {
    // resolved once the action has completed
kuzzle.memoryStorage.sscan("key", 0, new ResponseListener<JSONObject>() {
  public void onSuccess(JSONObject page) {
    // callback called once the action has completed

  public void onError(JSONObject error) {

use \Kuzzle\Kuzzle;

$kuzzle = new Kuzzle('localhost');

try {
  $page = $kuzzle->memoryStorage()->sscan('key', 0);
catch (ErrorException $e) {


Callback response:

  "cursor": 18,
  "values": [

Identical to scan, except that sscan iterates the members held by a set of unique values.

[Redis documentation]

sscan(key, cursor, [options], callback)

keystringKey identifier
cursorintPage number (iteration starts with a cursor value of 0, and ends when the next cursor position is 0)
optionsJSON ObjectOptional parameters


countintReturn the approximate count number of items per result page10
matchstringSearch only for member values matching the provided pattern*
queuablebooleanMark this request as (not) queuabletrue

Callback response

Resolves to a JSON array containing 2 entries:

  • the cursor position for the next page of results (a next position of 0 indicates the end of the scan)
  • an array of members