Addons /
Import addon backup
Imports a database from an external archive or existing live database.
Required permission
Project > Addons > General > Update
Path parameters
projectId
string requiredID of the projectaddonId
string requiredID of the addon
Request body
- {object}Import using a connection string. The database will be imported from the live database located at the connection string's location.
name
stringThe name of the backup. If not provided, a default name will be generated containing the current date.min length3max length39pattern^[a-zA-Z0-9]+((-|\s|\/|:)[a-zA-Z0-9]+)*$connectionString
string requiredA database connection string.
OR
- {object}Import using an external archive. The database will be imported from an existing backup.
name
stringThe name of the backup. If not provided, a default name will be generated containing the current date.min length3max length39pattern^[a-zA-Z0-9]+((-|\s|\/|:)[a-zA-Z0-9]+)*$importUrl
string requiredA url pointing to an existing backup stored as a GNU zip (.gz) file.
API
CLI
JS Client
POST /v1/projects/{projectId}/addons/{addonId}/import
Example request
Request body
Import using a connection string. The database will be imported from the live database located at the connection string's location.
curl
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request POST \
--data '{"name":"Example Backup","connectionString":"mongodb://mongodb0.example.com:27017"}' \
https://api.northflank.com/v1/projects/{projectId}/addons/{addonId}/import
OR
Import using an external archive. The database will be imported from an existing backup.
curl
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request POST \
--data '{"name":"Example Backup","importUrl":"https://example.com/backup.db.gz"}' \
https://api.northflank.com/v1/projects/{projectId}/addons/{addonId}/import
Example response
200 OK
success