GET
/
documents
/
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 document of client.documents.list()) {
    console.log(document.resource_id);
  }
}

main();
{
  "items": [
    {
      "source": "collections",
      "resource_id": "<string>",
      "metadata": {
        "indexed_at": "2023-11-07T05:31:56Z",
        "last_modified": "2023-11-07T05:31:56Z",
        "status": "pending",
        "events": [
          {
            "message": "<string>",
            "time": "2023-11-07T05:31:56Z",
            "type": "error"
          }
        ]
      },
      "score": 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

collection
string | null

Filter documents by collection.

source
enum<string> | null

Filter documents by source.

Available options:
collections,
web_crawler,
notion,
slack,
google_calendar,
reddit,
box,
google_drive,
airtable,
algolia,
amplitude,
asana,
ashby,
bamboohr,
basecamp,
bubbles,
calendly,
confluence,
clickup,
datadog,
deel,
discord,
dropbox,
exa,
facebook,
front,
github,
gitlab,
google_docs,
google_mail,
google_sheet,
hubspot,
jira,
linear,
microsoft_teams,
mixpanel,
monday,
outlook,
perplexity,
rippling,
salesforce,
segment,
todoist,
twitter,
zoom
cursor
string | null
size
integer
default:50
Required range: 0 <= x <= 100

Response

200
application/json

Successful Response

The response is of type object.