Using
Starts an on-demand backup job.
applies to v0.5.1POST
/store-api/backups
const url = 'https://example.com/store-api/backups';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"include_auth":true,"scope":"example"}'};
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/store-api/backups \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "include_auth": true, "scope": "example" }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
include_auth
Only effective for all/kv scopes (auth records live in the KV instance).
boolean
scope
required
all | kv | json | rel | kv:<domain> | json:<domain> |
rel:<domain> | domain:<name>. all covers every enabled engine;
domain:<name> covers the domain of that name in each engine that has
it. Relational domains go in with schema, rows and AUTOINCREMENT state.
string
Example generated
{ "include_auth": true, "scope": "example"}Responses
Section titled “Responses”Backup job started
Media typeapplication/json
object
id
required
string
state
required
string
Example generated
{ "id": "example", "state": "example"}Invalid scope
Media typetext/plain
string
Scope targets a missing domain
Media typetext/plain
string
A backup or restore job is already running
Media typetext/plain
string
Backup is disabled, or scope requires the JSON or relational engine, which is disabled
Media typetext/plain
string
Insufficient Storage — disk space or memory runs short; the write was not applied. Reads go on; retry after the seconds in Retry-After.
Media typetext/plain
string
Headers
Section titled “Headers”Retry-After
integer