GoodMem
ReferenceAPIREST APIMemories

Get multiple memories by ID

Retrieves multiple memories in a single operation, with individual success/failure results.

POST
/v1/memories:batchGet
x-api-key<token>

In: header

Batch memory retrieval details

memoryIdsarray<string>

Array of memory IDs to retrieve

includeContent?boolean | null

Whether to include the original content in the response

includeProcessingHistory?boolean | null

Whether to include background job processing history for each memory

Response Body

curl -X POST "http://localhost:8080/v1/memories:batchGet" \  -H "Content-Type: application/json" \  -d '{    "memoryIds": [      "550e8400-e29b-41d4-a716-446655440000",      "550e8400-e29b-41d4-a716-446655440001"    ]  }'
{
  "results": [
    {
      "success": "true",
      "memoryId": "550e8400-e29b-41d4-a716-446655440000",
      "memory": {
        "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",
        "metadata": "{\"source\": \"document\", \"author\": \"John Doe\"}",
        "createdAt": "1672531200000",
        "updatedAt": "1672531200000",
        "createdById": "550e8400-e29b-41d4-a716-446655440002",
        "updatedById": "550e8400-e29b-41d4-a716-446655440002",
        "chunkingConfig": {
          "none": {},
          "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"
          },
          "attempts": [
            {
              "attemptId": "101",
              "jobId": "42",
              "startedAt": "1714713605000",
              "finishedAt": "1714713612000",
              "ok": true,
              "workerId": "worker-1",
              "statusMessage": "Uploading chunk 3/10",
              "progressCurrent": "3",
              "progressTotal": "10",
              "progressUnit": "chunks",
              "progressUpdatedAt": "1714713609000",
              "errorMessage": "S3 upload timed out",
              "errorStacktrace": "string"
            }
          ]
        }
      },
      "error": {
        "code": "403",
        "message": "Forbidden - insufficient permissions"
      }
    }
  ]
}
{
  "results": [
    {
      "success": "true",
      "memoryId": "550e8400-e29b-41d4-a716-446655440000",
      "memory": {
        "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",
        "metadata": "{\"source\": \"document\", \"author\": \"John Doe\"}",
        "createdAt": "1672531200000",
        "updatedAt": "1672531200000",
        "createdById": "550e8400-e29b-41d4-a716-446655440002",
        "updatedById": "550e8400-e29b-41d4-a716-446655440002",
        "chunkingConfig": {
          "none": {},
          "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"
          },
          "attempts": [
            {
              "attemptId": "101",
              "jobId": "42",
              "startedAt": "1714713605000",
              "finishedAt": "1714713612000",
              "ok": true,
              "workerId": "worker-1",
              "statusMessage": "Uploading chunk 3/10",
              "progressCurrent": "3",
              "progressTotal": "10",
              "progressUnit": "chunks",
              "progressUpdatedAt": "1714713609000",
              "errorMessage": "S3 upload timed out",
              "errorStacktrace": "string"
            }
          ]
        }
      },
      "error": {
        "code": "403",
        "message": "Forbidden - insufficient permissions"
      }
    }
  ]
}
Empty
Empty
Empty