admin

Restore Context

Restore a soft-deleted context and the memories its deletion tombstoned.

#1804: clears deleted_at on the context and on the memories deleted with it, and marks those memories pending so the embedding sweep rebuilds their vectors (about 2,400 an hour; until then recall does not find them). Memories forgotten before the deletion, Sleep tombstones and rows the tombstone purge already removed stay gone, as do the context's neural edges, members' allowed_context_ids entries and revoked resource tokens.

Default is dry_run=True. 404 for a context with no row (see /contexts/recover), 409 for one that is not deleted, is in a deleted workspace, or whose name or resource a live context now uses.

post/api/v1/admin/contexts/{context_id}/restore

Request

  • Base URL: https://memory.kagura-ai.com (the document declares no server; this is the origin it was published from)
  • URL: https://memory.kagura-ai.com/api/v1/admin/contexts/{context_id}/restore
  • Auth: none declared

Path parameters

context_idstring uuid required

Request body

dry_runboolean

Count only (default); false restores.

new_namestring nullable

Restore under this name when a live context has taken the old one.

Response

Successful Response

context_idstring required
workspace_idstring required
namestring required
renamed_fromstring nullable required
deleted_atstring required
deleted_bystring nullable required
memories_restoredinteger required
memories_left_deletedinteger required
files_restoredinteger

Files the deletion purged that come back with the context (#1960)

file_bytes_restoredinteger

Their bytes, re-added to the storage usage

warningsstring[] required
dry_runboolean required

Changes

No recorded changes to this operation across all 1 revision of this API.