GET
/
collections
/
list
import Hyperspell from 'hyperspell';

const client = new Hyperspell({
  apiKey: process.env['HYPERSPELL_TOKEN'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const collectionListResponse of client.collections.list()) {
  console.log(collectionListResponse.collection);
}
{
  "items": [
    {
      "collection": "<string>",
      "document_count": 123
    }
  ],
  "next_cursor": "<string>"
}

Authorizations

Authorization
string
header
required

API Key or JWT User Token. If using an API Key, set the X-As-User header to act as a specific user. A JWT User Token is always scoped to a specific user.

Query Parameters

cursor
string | null
size
integer
default:50
Required range: 0 <= x <= 100

Response

200
application/json

Successful Response

The response is of type object.