Chief Tools Logo
Backup Chief API v1

Endpoints for the backup jobs of the team. A job backs up files or databases of one server to a storage destination on a schedule. The agent on the server runs it, so changes and runs take effect when the agent next checks in.


List backup jobs

GET
https://backup.chief.app/api/v1
/jobs
OpenID Connect
or
Bearer (ctp_*)
or
Bearer (ctt_*)

List the team's backup jobs by name. The query matches the name, the backed-up path and the names of the server and storage destination.

List backup jobs › query Parameters

query
​string | null · maxLength: 255

Search results by name.

per_page
​integer · min: 1 · max: 100

Number of results per page.

Default: 50
page
​integer · min: 1

Page number to return.

Default: 1
status
​string | null · enum

Only return jobs in this state: attention for jobs with a problem to look at, or a job status.

Enum values:
attention
pending
active
paused
deleting
server
​string | null

Only return the jobs of this server.

List backup jobs › Responses

Paginated set of BackupJob

​BackupJob[] · required
​object · required
​object · required

Create a backup job

POST
https://backup.chief.app/api/v1
/jobs
OpenID Connect
or
Bearer (ctp_*)
or
Bearer (ctt_*)

Create a backup job on an enrolled server. Test the source first with the source inspections endpoint and pass the ID of the successful test as source_inspection; it must test exactly this source and be at most 10 minutes old. The job starts as pending while Backup Chief sets up its repository. It only starts running after its recovery document is saved and confirmed in the Backup Chief app.

Create a backup job › Request Body

Validates a backup job and turns its source into the configuration of its type, the same way the job forms do.
name
​string · maxLength: 255 · required

Display name of the backup job.

Example: Website files
server
​string · required

Formatted ID of the enrolled server that runs the job. It cannot be changed later.

Example: server_01j8q8zk2f4m6n7p9r1s3t5v7x
storage_destination
​string · required

Formatted ID of the storage destination that keeps the main copy. It cannot be changed later.

Example: storage_01j8q8zk2f4m6n7p9r1s3t5v7x
type
​string · enum · required

What the job backs up. It cannot be changed later.

Enum values:
file
mysql
postgresql
​object · required

What to back up. The fields depend on the type, see the description of each field. Fields left out keep their value on an existing job.

source_inspection
​string | null

Formatted ID of a completed, successful source test of exactly this source, at most 10 minutes old. Required when creating a job and when changing the source of a job.

Example: inspection_01j8q8zk2f4m6n7p9r1s3t5v7x
​object

When the job runs. A new job runs every day at the next full hour when it is left out; fields left out keep the schedule of an existing job.

​object

How many backups to keep. Tiers left out keep their value, or the default for the schedule on a new job. Tiers the schedule makes redundant are folded into last.

attempt_id
​string

ULID that identifies this creation attempt. Retrying with the same ID and the same job returns the job created the first time instead of a second job.

Example: 01j8q8zk2f4m6n7p9r1s3t5v7x

Create a backup job › Responses

The backup job was created.

​BackupJob · required

Get a backup job

GET
https://backup.chief.app/api/v1
/jobs/{job}
OpenID Connect
or
Bearer (ctp_*)
or
Bearer (ctt_*)

Get one of the team's backup jobs with its source, schedule, retention and storage state. Passwords are never returned.

Get a backup job › path Parameters

job
​string · required

Get a backup job › Responses

BackupJob

​BackupJob · required

Update a backup job

PATCH
https://backup.chief.app/api/v1
/jobs/{job}
OpenID Connect
or
Bearer (ctp_*)
or
Bearer (ctt_*)

Change the name, source, schedule or retention of a backup job. Fields left out keep their value, including a stored database password. A changed source must pass a new source test first: pass the ID of a successful test of the changed source, made with the job argument, as source_inspection. The server, storage destination and type cannot be changed.

Update a backup job › path Parameters

job
​string · required

Update a backup job › Request Body

Validates a backup job and turns its source into the configuration of its type, the same way the job forms do.
name
​string · maxLength: 255 · required

Display name of the backup job.

Example: Website files
server
​string · required

Formatted ID of the enrolled server that runs the job. It cannot be changed later.

Example: server_01j8q8zk2f4m6n7p9r1s3t5v7x
storage_destination
​string · required

Formatted ID of the storage destination that keeps the main copy. It cannot be changed later.

Example: storage_01j8q8zk2f4m6n7p9r1s3t5v7x
type
​string · enum · required

What the job backs up. It cannot be changed later.

Enum values:
file
mysql
postgresql
​object · required

What to back up. The fields depend on the type, see the description of each field. Fields left out keep their value on an existing job.

source_inspection
​string | null

Formatted ID of a completed, successful source test of exactly this source, at most 10 minutes old. Required when creating a job and when changing the source of a job.

Example: inspection_01j8q8zk2f4m6n7p9r1s3t5v7x
​object

When the job runs. A new job runs every day at the next full hour when it is left out; fields left out keep the schedule of an existing job.

​object

How many backups to keep. Tiers left out keep their value, or the default for the schedule on a new job. Tiers the schedule makes redundant are folded into last.

attempt_id
​string

ULID that identifies this creation attempt. Retrying with the same ID and the same job returns the job created the first time instead of a second job.

Example: 01j8q8zk2f4m6n7p9r1s3t5v7x

Update a backup job › Responses

BackupJob

​BackupJob · required

Delete a backup job

DELETE
https://backup.chief.app/api/v1
/jobs/{job}
OpenID Connect
or
Bearer (ctp_*)
or
Bearer (ctt_*)

Delete a paused backup job once its agent dropped it from its configuration and no run is pending or running. Without delete_repository only the job and its history are deleted and its backups stay in storage, where restic can still restore them with the recovery document. With delete_repository the job turns deleting and its repositories are deleted from storage in the background before the job is removed.

Delete a backup job › path Parameters

job
​string · required

Delete a backup job › query Parameters

delete_repository
​boolean

Also delete the job's repositories and every backup in them from storage. Without it only the job and its history are deleted from Backup Chief and the backups stay in storage.

Delete a backup job › Responses

The backups are being deleted, the job is removed once they are.

​BackupJob · required

Pause a backup job

POST
https://backup.chief.app/api/v1
/jobs/{job}/pause
OpenID Connect
or
Bearer (ctp_*)
or
Bearer (ctt_*)

Stop running an active backup job on its schedule. Its backups and history are kept. Queued runs are cancelled, a running backup may still finish, and the schedule stops once the agent checks in. A job must be paused before it can be deleted.

Pause a backup job › path Parameters

job
​string · required

Pause a backup job › Responses

BackupJob

​BackupJob · required

Resume a backup job

POST
https://backup.chief.app/api/v1
/jobs/{job}/resume
OpenID Connect
or
Bearer (ctp_*)
or
Bearer (ctt_*)

Run a paused backup job on its schedule again once the agent checks in.

Resume a backup job › path Parameters

job
​string · required

Resume a backup job › Responses

BackupJob

​BackupJob · required

Run a backup now

POST
https://backup.chief.app/api/v1
/jobs/{job}/run
OpenID Connect
or
Bearer (ctp_*)
or
Bearer (ctt_*)

Queue a backup of an active job outside its schedule. The agent starts it the next time it checks in; follow it in the job's runs.

Run a backup now › path Parameters

job
​string · required

Run a backup now › Responses

The backup was queued.

​BackupJob · required

Run maintenance now

POST
https://backup.chief.app/api/v1
/jobs/{job}/maintenance
OpenID Connect
or
Bearer (ctp_*)
or
Bearer (ctt_*)

Queue a maintenance operation of an active job outside its schedule: remove the backups the keep policy no longer needs, free the storage space they used, or recheck which backups are still stored. The agent starts it the next time it checks in.

Run maintenance now › path Parameters

job
​string · required

Run maintenance now › Request Body

operation
​string · enum · required

forget removes the backups the keep policy no longer needs, prune frees the storage they used at every storage destination, snapshot_inventory rechecks which backups are still stored.

Enum values:
forget
prune
snapshot_inventory

Run maintenance now › Responses

The maintenance was queued.

​BackupJob · required

Retry the storage setup

POST
https://backup.chief.app/api/v1
/jobs/{job}/retry-provisioning
OpenID Connect
or
Bearer (ctp_*)
or
Bearer (ctt_*)

Continue setting up the storage of a pending job from the last safe step, after its setup stopped with provisioning_error_code. Fix the cause first, such as the storage credentials.

Retry the storage setup › path Parameters

job
​string · required

Retry the storage setup › Responses

BackupJob

​BackupJob · required

List the repositories of a backup job

GET
https://backup.chief.app/api/v1
/jobs/{job}/repositories
OpenID Connect
or
Bearer (ctp_*)
or
Bearer (ctt_*)

List the restic repositories of a backup job: the main repository first, then its extra copies at other storage destinations. Extra copies are added and managed in the Backup Chief app, because they need the job's recovery password.

List the repositories of a backup job › path Parameters

job
​string · required

List the repositories of a backup job › Responses

Array of BackupRepository

​BackupRepository[] · required