GET/v1/namespaces

Paginate through your namespaces. Paginate through the list of namespaces, optionally with a given prefix. You can retrieve more information about a specific namespace with the metadata endpoint.

This endpoint is available to API keys with list or admin permissions.

Request

cursor
stringoptional

retrieve the next page of results (pass next_cursor from the response payload)


prefix
stringoptional

retrieve only namespaces that match the prefix, e.g. foo would return foo and foo-bar.


page_size
stringdefault: 100

limit the number of results per page (max of 1000)

Response

namespaces
array

An array of namespace objects. Each namespace object contains:

  • id (string): the namespace identifier
example
[ { "id": "my-namespace" }, { "id": "test-namespace" }, { "id": "production-data" } ]
next_cursor
string

A cursor for pagination. Pass this value as the cursor parameter in the next request to retrieve the next page of results. Only present when there are more namespaces to retrieve.

Examples

import turbopuffer

tpuf = turbopuffer.Turbopuffer(
    region='gcp-us-central1', # choose best region: https://turbopuffer.com/docs/regions
)

# List all namespaces
namespaces = tpuf.namespaces()
for namespace in namespaces:
    print('Namespace', namespace.id)