Skip to main content
GET
/
memories
/
get
/
{source}
/
{resource_id}
JavaScript
import Hyperspell from 'hyperspell';

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

const memory = await client.memories.get('resource_id', { source: 'collections' });

console.log(memory.resource_id);
{
  "source": "collections",
  "resource_id": "<string>",
  "title": "<string>",
  "metadata": {
    "created_at": "2023-11-07T05:31:56Z",
    "indexed_at": "2023-11-07T05:31:56Z",
    "last_modified": "2023-11-07T05:31:56Z",
    "status": "pending",
    "events": [
      {
        "message": "<string>",
        "type": "error",
        "time": "2023-11-07T05:31:56Z"
      }
    ],
    "url": "<string>"
  },
  "score": 123
}

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.

Path Parameters

source
enum<string>
required
Available options:
collections,
reddit,
notion,
slack,
google_calendar,
google_mail,
box,
google_drive,
vault,
web_crawler
resource_id
string
required

Response

Successful Response

source
enum<string>
required
Available options:
collections,
reddit,
notion,
slack,
google_calendar,
google_mail,
box,
google_drive,
vault,
web_crawler
resource_id
string
required
title
string | null
metadata
Metadata · object
score
number | null

The relevance of the resource to the query