SDK
SDK Golang v1.x
1

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.

Arguments #

Copied to clipboard!
List(index string, options types.QueryOptions) (json.RawMessage, error)
Arguments Type Description
index
string
Index name
options
types.QueryOptions
An object containing query options

options #

Additional query options

Property Type Description Default
queuable
bool
Make this request queuable or not true
from
int
Offset of the first result 0
size
int
Maximum number of returned results 10

Return #

Return a json representation of the API return containing the collection list and an error is something was wrong.

Usage #

Copied to clipboard!
options := types.NewQueryOptions()
options.SetFrom(1)
options.SetSize(1)
list, err := kuzzle.Collection.List("mtp-open-data", options)
if err != nil {
  log.Fatal(err)
} else if list != nil {
  fmt.Println("Success")
}