Purge Learnings
POST
/api/admin/memory/purge
const url = 'https://example.com/api/admin/memory/purge';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"scope":{"level":"example","team_id":"example","components":["all"]},"dry_run":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/admin/memory/purge \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "scope": { "level": "example", "team_id": "example", "components": [ "all" ] }, "dry_run": true }'Purge learning pipeline data.
Requires superadmin auth. Supports dry_run for previewing deletions.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”Responses
Section titled “ Responses ”Successful Response
Media type application/json
PurgeReportResponse
Response from a purge operation.
object
dry_run
required
Dry Run
boolean
level
required
Level
string
components
required
Components
Array<string>
items_by_component
required
Items By Component
object
key
additional properties
any
total_items
required
Total Items
integer
audit_id
required
Audit Id
string
timestamp
required
Timestamp
string
verification
Any of:
PurgeVerificationResponse
Post-purge infrastructure verification.
null
Example
{ "verification": { "signal_write_ok": false, "signal_read_ok": false, "signal_cleanup_ok": false }}Validation Error
Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}