Skip to main content
GET
/
memories
/
list
JavaScript
import Hyperspell from '@hyperspell/hyperspell';

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

// Automatically fetches more pages as needed.
for await (const memoryListResponse of client.memories.list()) {
  console.log(memoryListResponse.resource_id);
}
import os
from hyperspell import Hyperspell

client = Hyperspell(
api_key=os.environ.get("HYPERSPELL_API_KEY"), # This is the default and can be omitted
)
page = client.memories.list()
page = page.items[0]
print(page.resource_id)
package main

import (
"context"
"fmt"

"github.com/hyperspell/hyperspell-go"
"github.com/hyperspell/hyperspell-go/option"
)

func main() {
client := hyperspell.NewClient(
option.WithAPIKey("My API Key"),
)
page, err := client.Memories.List(context.TODO(), hyperspell.MemoryListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
hyperspell memories list \
--api-key 'My API Key'
curl --request GET \
--url https://api.hyperspell.com/memories/list \
--header 'Authorization: Bearer <token>'
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hyperspell.com/memories/list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
HttpResponse<String> response = Unirest.get("https://api.hyperspell.com/memories/list")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.hyperspell.com/memories/list")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "items": [
    {
      "resource_id": "<string>",
      "type": "<string>",
      "document": {
        "type": "document",
        "id": "<string>",
        "metadata": {
          "sources": [
            {
              "chunk_id": "<string>",
              "resource_id": "<string>",
              "source": "<string>",
              "score": 123
            }
          ],
          "edited_by": "<string>"
        },
        "text": "<string>",
        "children": [
          {
            "mimetype": "<string>",
            "data": "<string>",
            "type": "blob",
            "id": "<string>",
            "metadata": {
              "sources": [
                {
                  "chunk_id": "<string>",
                  "resource_id": "<unknown>",
                  "source": "<unknown>",
                  "score": "<unknown>"
                }
              ],
              "edited_by": "<string>"
            }
          }
        ],
        "title": "<string>"
      },
      "title": "<string>",
      "collection": "<string>",
      "metadata": {},
      "ingested_at": "2023-11-07T05:31:56Z",
      "last_modified_at": "2023-11-07T05:31:56Z",
      "document_date": "2023-11-07T05:31:56Z"
    }
  ],
  "next_cursor": "<string>"
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<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

collection
string | null

Filter documents by collection.

source
enum<string> | null

Filter documents by source.

Available options:
reddit,
notion,
slack,
google_calendar,
google_mail,
box,
dropbox,
github,
google_drive,
vault,
web_crawler,
trace,
microsoft_teams,
gmail_actions,
granola,
fathom,
fireflies,
linear,
hubspot,
salesforce,
coda,
lightfield,
gong,
pylon,
clickup
status
enum<string> | null

Filter documents by status.

Available options:
pending,
processing,
completed,
failed,
pending_review,
skipped
filter
string | null

Filter documents by metadata using MongoDB-style operators. Example: {"department": "engineering", "priority": {"$gt": 3}}

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

Response

Successful Response

items
DocumentResponse · object[]
required
next_cursor
string | null
required