Developer Center

Database Backups

Last Updated: Oct 24, 2017 05:24PM CEST

URL

/api/database/backup/
/api/database/backup/LATEST

Description

Allows API users to trigger Mambu database backups and download them once they are ready.

Execution flow example

1. Use POST call to request the database backup to be generated and register/define the callback endpoint.
  • this call triggers the database copy creation, which is a prerequisite to download a backup
  • the callback parameter is not required but recommended
2. If a callback parameter is defined, a callback will be sent to the endpoint, confirming that step 1 has been completed and that the database backup can be downloaded.
  • the response to such callback should be ok (200)
  • the endpoint is useful to ensure that the creation process has finished and step 3 can be performed
3. Use GET call to request the download of the database backup.
  • if an endpoint is defined, it can be triggered immediately after the callback (step 2) is received
  • if there is no endpoint defined, please wait several minutes, up to one hour, to allow Mambu some time to finish the creation of the database from step 1.

Methods

GET Database Backup

Download the latest database backup that was triggered via the POST call (see below).

The response headers will contain more information about the backup:
  • Content Type: application/zip
  • ContentDisposition: attachment; filename="demo_tenantMANUALDATABASEBACKUP.zip"
  • Last Modified: the date when the database backup execution finished

Required permissions:
  • "Download Backups" for triggering and downloading a database backup

Usage examples

//download the latest db backup
GET /api/database/backup/LATEST

POST Database Backup Request

Allow the trigger of database backups. The developer can be notified via a callback defined in the POST call when the backup is ready.

Note #1: While a backup is in progress, Mambu will not allow starting another one.

Note #2: If you need to create backups after Mambu's nightly processing, you can setup the "End of Day Processing" / "Accounts Updated" WebHook in Mambu to get notified and then trigger the backup request with this API.

Required permissions:
  • "Download Backups" for triggering and downloading a database backup

Parameters

callback A valid URL. It will receive a WebHook call from Mambu once the backup is available (Optional)

Usage examples

//trigger the backup
POST /api/database/backup

//trigger the backup and define a callback
POST '{
    "callback" : "https://example.com"
}' /api/database/backup

WebHook / Callback request example



// in case the trigger was successful and a database backup process started
{
    "returnCode": 0,
    "returnStatus": "SUCCESS"
}

// in case there is another database backup process running
{
    "returnCode": 1201,
    "returnStatus": "DATABASE_BACKUP_IN_PROGRESS",
    "errorSource": "Database backup job execution is skipped as you already have one in progress"
}

// after the database backup process is completed, 
// it will send the following payload to the callback
{
   "tenantId":"demo",
   "result":"COMPLETE",
   "domain":"demo.mambu.com",
   "fileName":"demo-MANUAL-DATABASE-BACKUP"
}
support@mambu.com
https://cdn.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete