SDK
SDK C++ v1.x
1

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

This SDK has been deprecated because of stability issues. It is not advised to use it in a production environment.

list #

Returns the complete list of realtime and stored collections in requested index sorted by name in alphanumerical order. The from and size arguments allow pagination. They are returned in the response if provided.

Signature #

Copied to clipboard!
std::string list(const std::string& index);

std::string list(const std::string& index, const kuzzleio::query_options& options);

Arguments #

Arguments Type Description
index
const std::string&
Index name
options
kuzzleio::query_options*
Query options

options #

Additional query options

Property Type
(default)
Description
queuable
bool

(true)
If true, queues the request during downtime, until connected to Kuzzle again
from
long

(0)
Offset of the first result
size
long

(10)
Maximum number of returned results

Return #

A JSON string representing the following object:

Property Type Description
type
string
Types of returned collections
(all, realtime or stored)
collections
object[]
List of collections
from
number
Offset of the first result
size
number
Maximum number of returned results

Each object in the collections array contains the following properties:

Property Type Description
name
string
Collection name
type
string
Collection type (realtime or stored)

Usage #

Copied to clipboard!
try {
  kuzzleio::query_options options;
  options.from = 1;
  options.size = 2;
  std::string collection_list = kuzzle->collection->list("mtp-open-data", options);
  std::cout << collection_list << std::endl;
  // {"type":"all","collections":[{"name":"pink-taxi","type":"stored"}],"from":1,"size":2}
} catch (kuzzleio::KuzzleException &e) {
  std::cerr << e.what() << std::endl;
}