List Memory Versions

Updated at:

Lists historical versions of a memory store in reverse creation order. The current memory does not need to exist.

Prerequisites

Endpoint and authentication configured. For details, see Overview and authentication.

Endpoint

GET/memory_stores/{memory_store_id}/memory_versions

Path parameters

memory_store_idstringRequired

Memory store ID

Query parameters

memory_idstringOptional

Only returns versions of this memory; omit to return versions of the whole store

operationcreated / modified / deletedOptional

Filters by the operation that produced the version

created_at.gtestringOptional

Lower bound of the version creation time (inclusive), ISO 8601 UTC

created_at.ltestringOptional

Upper bound of the version creation time (inclusive), ISO 8601 UTC

viewbasic / fullOptional

basic excludes bodies (default); full returns unredacted bodies

limitintegerOptional

Page size. basic: 1-100, default 20; full: 1-20

pagestringOptional

Pagination cursor. Keep all query conditions and limit unchanged when paging

Response fields

dataarray<object>

Array of versions; bodies are included when view=full and not redacted

idstring

Version ID, in the format memver_xxx

typestring

Always memory_version

memory_store_idstring

ID of the memory store it belongs to

memory_idstring

ID of the corresponding memory

operationcreated / modified / deleted

The operation that produced the version

pathstring

Path in the version snapshot

contentstring

Body of the version; absent when redacted

content_sha256string

SHA256 hash of the version body

content_size_bytesinteger

UTF-8 byte length of the version body

redacted_atstring | null

Time when the body was redacted; omitted or null when not redacted

created_atstring

Version creation time, ISO 8601 UTC

next_pagestring | null

Cursor for the next page; absent when there is no more data

Request example

curl "$AGENTSTUDIO_URL/memory_stores/memstore_xxx/memory_versions" \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY"

Response example

{
  "data": [
    {
      "id": "memver_xxx",
      "type": "memory_version",
      "memory_store_id": "memstore_xxx",
      "memory_id": "mem_xxx",
      "operation": "modified",
      "path": "/notes/project.md",
      "content": "# Project Conventions\nThe default development environment is staging.\nChanges require regression tests.\n",
      "content_sha256": "a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f90",
      "content_size_bytes": 68,
      "created_at": "2026-09-17T08:30:00Z"
    }
  ],
  "next_page": null
}

Error codes

HTTP statusError codeDescription
400invalid_request_errorInvalid parameters, path, limit, or pagination cursor
401InvalidApiKeyAPI key missing, invalid, or expired
403permission_errorInsufficient identity or resource access permissions
404not_found_errorResource does not exist or does not belong to the current workspace