Flush a disk
Start a self-hosted server and use its connection variables for these requests.
Endpoint
Section titled “Endpoint”POST /v1/disks/{disk}/flush| Query parameter | Default | Meaning |
|---|---|---|
tables |
false |
With true, additionally force an SST-table flush. |
Request
Section titled “Request”curl --fail-with-body -X POST "$WABE_DISK_URL/v1/disks/demo/flush" \ -H "Authorization: Bearer $WABE_DISK_API_KEY"Response
Section titled “Response”{"success":true}The response confirms a successful persistence barrier for prior writes on the disk, covering both files and KV namespaces. The operation waits for storage. A request failure does not confirm persistence.
The default barrier persists the write-ahead log. ?tables=true also requests an SST flush; it does not compact tables or create a separately named checkpoint. Ordinary application code can use the default barrier.
Inside JavaScript, await fs.flush() provides the default disk-wide barrier. See durability for buffered writes and remote-mode acknowledgements.
Errors
Section titled “Errors”400 for invalid parameters or disk names, 401 for authentication, and 500 for storage failure. An unresponsive store can delay completion.