Addons /
Create addon backup schedule
Required permission
Project > Addons > General > Update
Path parameters
projectId
string requiredID of the project
addonId
string requiredID of the addon
Request body
- {object}
scheduling
{object} requiredSchedule for the backup.
interval
string requiredThe interval between backups. Each addon can only have one backup schedule of each interval for each backup type.
one ofhourly, daily, weeklyminute
[array] requiredAn array of minutes when the backup should be performed.
- integer
A minute when the backup should be performed.
min0max59 hour
[array]An array of hours in 24 hour format when the backup should be performed. At these hours, a backup will be performed at each of the minutes provided in the
minute
field. Required fordaily
andweekly
intervals and unavailable forhourly
intervals.- integer
An hour when the backup should be performed, in 24 hour format.
min0max23 day
[array]An array of days of the week when the backup should be performed, where
0
represents Monday and6
represents Sunday. On these days, a backup will be performed at each of the minutes provided in theminute
field whenever it is an hour from thehour
field. Required forweekly
intervals and unavailable forhourly
anddaily
intervals.- integer
A day of the week when the backup should be performed, where
0
represents Monday and6
represents Sunday.min0max6 backupType
string requiredThe type of the backup to be performed.
one ofdump, snapshotcompressionType
stringThe compression algorithm of the backup. Only applicable for dump backups. Defaults to
gz
.one ofgz, zstdretentionTime
integer requiredThe time the backup is retained for, in days.
hourly
backups have a maximum retention of 7 days,daily
backups have a maximum retention of 60 days andweekly
backups have a maximum retention of 120 days.min1max120
Response body
- {object}
Response object.
data
{object} requiredResult data.
id
string requiredID of the schedule.
POST /v1/projects/{projectId}/addons/{addonId}/backup-schedules
Example request
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request POST \
--data '{"scheduling":{"interval":"weekly","minute":[30],"hour":[18],"day":[4]},"backupType":"snapshot","compressionType":"gz","retentionTime":7}' \
https://api.northflank.com/v1/projects/{projectId}/addons/{addonId}/backup-schedules
Example response
200 OK
JSON
{
"data": {
"id": "62cc20b90956ab62a58e8474"
}
}