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

const client = new Hyperspell({
  apiKey: process.env['HYPERSPELL_API_KEY'], // 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.id);
  }
}

main();
{
  "items": [
    {
      "id": 123,
      "created_at": "2023-11-07T05:31:56Z",
      "name": "<string>",
      "owner": "<string>",
      "documents_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
items
object[]
required
next_cursor
string | null
required