Skip to main content
POST
Create a backup policy

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

organization
string
required

Organization name slug from list_organizations. Example: acme.

database
string
required

Database name slug from list_databases. Example: app-db.

Body

application/json
name
string

The name of the backup policy

target
enum<string>

Whether the policy is for production or development branches

Available options:
production,
development
retention_value
integer

A number value for the retention period of the backup policy

retention_unit
enum<string>

The unit for the retention period of the backup policy

Available options:
hour,
day,
week,
month,
year
frequency_value
integer

A number value for the frequency of the backup policy

frequency_unit
enum<string>

The unit for the frequency of the backup policy

Available options:
hour,
day,
week,
month
schedule_time
string

The time of day that the backup is scheduled, in HH:MM format

schedule_day
integer

Day of the week that the backup is scheduled. 0 is Sunday, 6 is Saturday

schedule_week
integer

Week of the month that the backup is scheduled. 0 is the first week, 3 is the fourth week

Response

Returns the created backup policy

id
string
required

The ID of the backup policy

display_name
string
required

The display name of the backup policy

name
string
required

The name of the backup policy

target
enum<string>
required

Whether the policy is for production or development branches

Available options:
production,
development
retention_value
integer
required

A number value for the retention period of the backup policy

retention_unit
string
required

The unit for the retention period of the backup policy

frequency_value
integer
required

A number value for the frequency of the backup policy

frequency_unit
string
required

The unit for the frequency of the backup policy

schedule_time
string
required

The time of day that the backup is scheduled, in HH:MM format

schedule_day
integer | null
required

Day of the week that the backup is scheduled. 0 is Sunday, 6 is Saturday

schedule_week
integer | null
required

Week of the month that the backup is scheduled. 0 is the first week, 3 is the fourth week

created_at
string
required

When the backup policy was created

updated_at
string
required

When the backup policy was last updated

last_ran_at
string | null
required

When the backup was last run

next_run_at
string | null
required

When the backup will next run

required
boolean
required

Whether the policy is a required system backup