Skip to content
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.

Latest commit

 

History

History
58 lines (41 loc) · 2.5 KB

index.md

File metadata and controls

58 lines (41 loc) · 2.5 KB
code type title description
true
page
list
Returns the collection list of an index

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

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

<<< ./snippets/list.cpp