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

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

async function main() {
  // Automatically fetches more pages as needed.
  for await (const collectionListResponse of client.collections.list()) {
    console.log(collectionListResponse.collection);
  }
}

main();
{
  "items": [
    {
      "collection": "<string>",
      "document_count": 123
    }
  ],
  "next_cursor": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

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.