GoodMemGoodMem
ReferenceAPIREST APIMemories

Get a memory by ID

GET /v1/memories/{id}: Retrieves a single memory by its ID.

GET
/v1/memories/{id}

Retrieves a single memory by its ID.

AUTHORIZATION: Requires READ_MEMORY on the requested memory; authority may be granted directly or through DIRECT_MEMBERS_OF its containing space. This is a read-only operation with no side effects and is safe to retry. Returns NOT_FOUND if the memory or its parent space does not exist.

Authorization

ApiKeyAuth
headerx-api-key<token>

Path Parameters

id*string

The UUID of the memory to retrieve

Query Parameters

includeContent?boolean

Whether to include the original content in the response (defaults to false). The snake_case alias include_content is also accepted.

Defaultfalse
includeProcessingHistory?boolean

Whether to include background job processing history in the response (defaults to false). The snake_case alias include_processing_history is also accepted.

Defaultfalse

Header Parameters

GoodMem-Timeout-Ms?integer

Optional waiting budget in milliseconds, measured from REST servlet ingress and shared across all internal gRPC calls. Supply one decimal integer from 1 to 86400000. Omission adds no deadline. Existing shorter deadlines still apply. Expiry returns HTTP 504 before streaming starts; after streaming starts, no successful completion event is sent. Use SSE or opt into GoodMem-Stream-Terminal for an explicit terminal outcome. Retrieval work is cooperatively cancelled. An accepted mutation may still commit after timeout or disconnect; a failed response does not imply rollback.

Formatint64
Range1 <= value <= 86400000

Response Body

Successfully retrieved memory

application/json
  1. response

Memory object containing stored content and metadata

memoryId*string

Unique identifier of the memory

Formatuuid
Example"550e8400-e29b-41d4-a716-446655440000"
spaceId*string

ID of the space containing this memory

Formatuuid
Example"550e8400-e29b-41d4-a716-446655440001"
originalContent?|

Original content (only included if requested)

Formatbinary
Example"VGhpcyBpcyBiYXNlNjQgYmluYXJ5Lg=="
originalContentLength?|

Size in bytes of the inline original content

Formatint64
Range0 <= value
originalContentSha256?|

SHA-256 digest of the inline original content, hex encoded

Example"9f2c8c5a9d740eb56d..."
originalContentRef?|

Reference to external content location

Example"s3://my-bucket/document.pdf"
contentType*string

MIME type of the content

Example"text/plain"
processingStatus*string

Processing status of the memory

Example"COMPLETED"
Value in"UNSPECIFIED""PENDING""PROCESSING""COMPLETED""FAILED"
pageImageStatus*string

Processing status of page-image extraction for this memory

Example"COMPLETED"
Value in"UNSPECIFIED""PENDING""PROCESSING""COMPLETED""FAILED"
pageImageCount*integer

Number of extracted page-image renditions linked to this memory

Formatint32
Range0 <= value
Example12
metadata?|

Additional metadata for the memory. A top-level textual title may have been used as a document-title hint when its chunks were embedded; changing it does not automatically re-embed existing chunks.

Example
{  "source": "document",  "author": "John Doe"}
createdAt*integer

Timestamp when the memory was created (milliseconds since epoch)

Formatint64
Example1672531200000
updatedAt*integer

Timestamp when the memory was last updated (milliseconds since epoch)

Formatint64
Example1672531200000
createdById*string

Exact principal or API-key audit actor that created this memory

Formatuuid
Example"550e8400-e29b-41d4-a716-446655440002"
updatedById*string

Exact principal or API-key audit actor that last updated this memory

Formatuuid
Example"550e8400-e29b-41d4-a716-446655440002"
chunkingConfig?||

Chunking strategy used for this memory

Example
{  "recursive": {    "chunkSize": 1000,    "chunkOverlap": 200,    "separators": [      "\n\n",      "\n",      ".",      " "    ],    "keepStrategy": "KEEP_END",    "separatorIsRegex": false,    "lengthMeasurement": "CHARACTER_COUNT"  },  "sentence": {    "maxChunkSize": 1000,    "minChunkSize": 100,    "enableLanguageDetection": true,    "lengthMeasurement": "CHARACTER_COUNT"  }}
processingHistory?|

Background job processing history associated with this memory

Example
{  "latestJob": {    "jobId": 42,    "jobType": "document_processor",    "status": "BACKGROUND_JOB_RUNNING",    "attempts": 1,    "maxAttempts": 5,    "runAt": 1714713600000,    "leaseUntil": 1714713660000,    "lockedBy": "worker-1",    "lastError": "Transient network failure",    "updatedAt": 1714713615000,    "failureStage": "DOCUMENT_PROCESSING_STAGE_GENERATING_EMBEDDINGS"  }}
Example Request
curl -X GET 'https://your-goodmem-server.example.com/v1/memories/550e8400-e29b-41d4-a716-446655440000?includeContent=false&includeProcessingHistory=false' \  -H 'GoodMem-Timeout-Ms: 30000'
Example Response
{  "memoryId": "550e8400-e29b-41d4-a716-446655440000",  "spaceId": "550e8400-e29b-41d4-a716-446655440001",  "originalContent": "VGhpcyBpcyBiYXNlNjQgYmluYXJ5Lg==",  "originalContentLength": 0,  "originalContentSha256": "9f2c8c5a9d740eb56d...",  "originalContentRef": "s3://my-bucket/document.pdf",  "contentType": "text/plain",  "processingStatus": "COMPLETED",  "pageImageStatus": "COMPLETED",  "pageImageCount": 12,  "metadata": {    "source": "document",    "author": "John Doe"  },  "createdAt": 1672531200000,  "updatedAt": 1672531200000,  "createdById": "550e8400-e29b-41d4-a716-446655440002",  "updatedById": "550e8400-e29b-41d4-a716-446655440002",  "chunkingConfig": {    "recursive": {      "chunkSize": 1000,      "chunkOverlap": 200,      "separators": [        "\n\n",        "\n",        ".",        " "      ],      "keepStrategy": "KEEP_END",      "separatorIsRegex": false,      "lengthMeasurement": "CHARACTER_COUNT"    },    "sentence": {      "maxChunkSize": 1000,      "minChunkSize": 100,      "enableLanguageDetection": true,      "lengthMeasurement": "CHARACTER_COUNT"    }  },  "processingHistory": {    "latestJob": {      "jobId": 42,      "jobType": "document_processor",      "status": "BACKGROUND_JOB_RUNNING",      "attempts": 1,      "maxAttempts": 5,      "runAt": 1714713600000,      "leaseUntil": 1714713660000,      "lockedBy": "worker-1",      "lastError": "Transient network failure",      "updatedAt": 1714713615000,      "failureStage": "DOCUMENT_PROCESSING_STAGE_GENERATING_EMBEDDINGS"    }  }}