getMemorySubjectNotes
Memory.
Memory: one subject's notes (shelf PERSON with no subjectId is yours, TEAM is the organization's, otherwise the subject's id) in reading order (rules, preferences, decisions, procedures, facts …), or with retired: true the forgotten ones, each with its kind, whether a person stated it or Goliath derived it, whether it is pinned, and where it was learned. limit notes per page (default 100, at most 300); page with after = endCursor while hasNextPage. Null subject when you may not open it. Replaces getMemoryDocument.
curl https://server.goliathdata.com/api/v1/call \
-H "Authorization: Bearer $GOLIATH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"operationId": "getMemorySubjectNotes",
"variables": {
"shelf": "PERSON"
}
}'import { GoliathClient } from '@goliath-data/sdk'
const goliath = new GoliathClient({
apiKey: process.env.GOLIATH_API_KEY!,
baseUrl: 'https://server.goliathdata.com',
})
// Enum values as strings: the SDK's enum types aren't exported yet, so assert to the method's variables type.
const variables = {
shelf: 'PERSON'
} as Parameters<typeof goliath.spaces.getMemorySubjectNotes>[0]
const result = await goliath.spaces.getMemorySubjectNotes(variables)const res = await fetch('https://server.goliathdata.com/api/v1/call', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.GOLIATH_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
operationId: 'getMemorySubjectNotes',
variables: {
shelf: 'PERSON'
}
}),
})
const { data, errors } = await res.json()limit is clamped to 300.
Variables
The example sends only what the schema requires. Some operations also need one of several optional variables (one filter or another, say); the description above says which.
A shelf of the Library's Memory page (Memory v2): where a note lives. PERSON is a person's own shelf ("You"); TEAM is the organization's. PROJECT is the dev fleet's, and opens only to Goliath admins. A teammate's PERSON shelf opens to everyone, written only by them and Goliath admins.
Default 100.
Response
What comes back under data: a list shows as one entry, and a value as its type.
{
"data": {
"spacesQuery": {
"memorySubject": {
"shelf": "PERSON",
"subjectId": "<ID>",
"name": "…",
"noteCount": 0,
"updatedAt": "2026-01-01T00:00:00.000Z",
"lastDreamAt": "2026-01-01T00:00:00.000Z"
},
"memoryNotes": {
"notes": [
{
"id": "<ID>",
"kind": "RULE",
"text": "…",
"origin": "STATED",
"pinned": true,
"retired": true,
"source": {
"kind": "TEAMMATE",
"name": "…",
"contactId": "<ID>"
},
"updatedAt": "2026-01-01T00:00:00.000Z"
}
],
"endCursor": "…",
"hasNextPage": true
}
}
}
}Errors
unknown_variableA variable the operation does not declare. A typo is refused rather than silently dropped.
unauthorizedNo bearer header, or the key is invalid or revoked.
insufficient_scopeThe key lacks the scope the operation requires.
forbiddenA referenced record does not exist, was deleted, or is outside your organization. The gateway cannot tell those apart.
Behaviour
A read. It rejects an Idempotency-Key header with 400 bad_request.