Skip to content
brain.GitHub
Developer docs OPEN SOURCE
HTTP APIEndpoints

Flush external state

POST
/sessions/{id}/flush

Uploads local event history and the latest completed checkpoint to external storage and returns the resulting checkpoint reference. Requires a management token and configured persistence.

Authorization

bearer
headerAuthorizationBearer <token>

Path Parameters

id*string

Opaque session ID.

Match^[a-fA-F0-9]{32}$

Response Body

Flush external state

application/json
  1. response
checkpoint?string
error?string
history_bytes*integer
native_checkpoint?string
pending*boolean
resume_offset*integer
time?string
Formatdate-time
curl -X POST 'http://127.0.0.1:8080/sessions/string/flush' \  -H 'Authorization: Bearer <BRAIN_TOKEN>'
{  "checkpoint": "string",  "error": "string",  "history_bytes": 0,  "native_checkpoint": "string",  "pending": true,  "resume_offset": 0,  "time": "2019-08-24T14:15:22Z"}