@@ -394,94 +394,69 @@ paths:
394394 schema :
395395 $ref : ' #/components/schemas/ErrorResponse'
396396
397- /db/export :
398- get :
399- summary : Export Database
400- operationId : export_database
401- x-pass-as-object : true
402- x-annotations :
403- readOnlyHint : true
404- description : |
405- Exports the entire memory database (both memories and summaries) to a JSONL file.
406-
407- **When to Use:**
408- For creating backups or migrating memory data between environments.
409- tags : [Database]
410- parameters :
411- - name : include
412- in : query
413- required : false
414- description : Which collections to export
415- schema :
416- type : array
417- items :
418- type : string
419- enum : [memories, summaries]
420- default : [memories, summaries]
421- style : form
422- explode : false
423- responses :
424- ' 200 ' :
425- description : Database exported successfully
426- content :
427- application/x-jsonlines :
428- schema :
429- type : string
430- format : binary
431- ' 503 ' :
432- description : Cannot connect to database
433- content :
434- application/json :
435- schema :
436- $ref : ' #/components/schemas/ErrorResponse'
437-
438- /db/import :
397+ /db/backup/manage :
439398 post :
440- summary : Import Database
441- operationId : import_database
399+ summary : Manage Database Backup
400+ operationId : manage_database_backup
442401 x-pass-as-object : true
443402 description : |
444- Imports a previously exported JSONL file back into the database .
403+ Manages database backups (import/export) .
445404
446405 **When to Use:**
447- To restore a backup or migrate memory from another environment.
406+ - **Export:** For creating backups or migrating memory data between environments.
407+ - **Import:** To restore a backup or migrate memory from another environment.
448408 tags : [Database]
449409 requestBody :
450410 required : true
451411 content :
452412 multipart/form-data :
453413 schema :
454414 type : object
415+ required :
416+ - action
455417 properties :
418+ action :
419+ type : string
420+ enum : [import, export]
421+ description : The action to perform.
422+ include :
423+ type : array
424+ items :
425+ type : string
426+ enum : [memories, summaries]
427+ default : [memories, summaries]
428+ description : (Export only) Which collections to export.
456429 file :
457430 type : string
458431 format : binary
459- description : The JSONL backup file to import
432+ description : (Import only) The JSONL backup file to import.
460433 mode :
461434 type : string
462435 enum : [merge, replace]
463436 default : merge
464437 description : |
438+ (Import only) Import mode.
465439 - merge: Add new records, skip existing IDs
466440 - replace: Clear existing data and import
467441 reEmbed :
468442 type : boolean
469443 default : false
470444 description : |
471- If true, ignores stored embeddings and generates new ones using the current model.
472- Crucial for model migration (e.g., to gemini-embedding-001).
473- NOTE: This is a slow operation due to rate limiting (batching).
474- required :
475- - file
445+ (Import only) If true, ignores stored embeddings and generates new ones.
476446 responses :
477447 ' 200 ' :
478- description : Import completed successfully
448+ description : Operation completed successfully
479449 content :
480450 application/json :
481451 schema :
482- $ref : ' #/components/schemas/ImportResponse'
452+ oneOf :
453+ - $ref : ' #/components/schemas/ImportResponse'
454+ - type : object
455+ properties :
456+ message :
457+ type : string
483458 ' 400 ' :
484- description : Invalid file or request format
459+ description : Invalid request
485460 content :
486461 application/json :
487462 schema :
0 commit comments