Generate a backup download
POST
/backups/export
const url = 'http://127.0.0.1:47821/api/v1/backups/export';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"ledger_id":"example","password":"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 http://127.0.0.1:47821/api/v1/backups/export \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "ledger_id": "example", "password": "example" }'Generate a backup download, optionally for one ledger and/or password-encrypted.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
ledger_id
string
password
string
Example generated
{ "ledger_id": "example", "password": "example"}Responses
Section titled “Responses”Success. JSON, or a file download for export endpoints and ?format=csv.
Validation error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Example generated
{ "error": { "code": "example", "message": "example", "details": "example" }}Missing or invalid bearer token
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Example generated
{ "error": { "code": "example", "message": "example", "details": "example" }}Not found
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Example generated
{ "error": { "code": "example", "message": "example", "details": "example" }}Conflict
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Example generated
{ "error": { "code": "example", "message": "example", "details": "example" }}