Chief Tools Logo
Backup Chief API v1

Endpoints for hosted downloads: ZIPs of a file, a directory or a database dump from a snapshot, prepared by Backup Chief so they can be downloaded without access to the server. A download copies backup contents out of the team's own storage for a limited time, so only prepare one when it is needed. Restores on the team's own servers with the agent or restic need no download.


List downloads

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

List the hosted downloads of all the team's backup jobs, newest first.

List downloads › query Parameters

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 downloads that are available (ready and not expired), in_progress (being prepared or deleted) or history (failed, cancelled or expired).

Enum values:
available
in_progress
history
job
​string | null

Only return the downloads of this backup job.

List downloads › Responses

Paginated set of Download

​Download[] · required
​object · required
​object · required

List the downloads of a backup job

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

List the hosted downloads of one backup job, newest first.

List the downloads of a backup job › path Parameters

job
​string · required

List the downloads of a backup job › query Parameters

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 downloads that are available (ready and not expired), in_progress (being prepared or deleted) or history (failed, cancelled or expired).

Enum values:
available
in_progress
history
job
​string | null

Only return the downloads of this backup job.

List the downloads of a backup job › Responses

Paginated set of Download

​Download[] · required
​object · required
​object · required

Prepare a download

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

Prepare a ZIP from a snapshot of an active or paused job: the database dump of a database backup snapshot, or a file or directory of a file backup snapshot given by its absolute path. The path must be inside the job's backed-up path; whether it exists in the snapshot is checked while the download is prepared, and a path that does not exist fails the download with failure_code source_unavailable. Preparing runs in the background: poll the download until it is ready, then create a download URL. Requesting the same content again while a download of it is being prepared or ready returns that download. The team's plan limits the size, the number of downloads per day and the downloads being prepared at once.

Prepare a download › path Parameters

job
​string · required

Prepare a download › Request Body

snapshot
​string · required

Formatted ID of the snapshot to download from, as listed by the job's snapshots.

Example: snapshot_01j8q8zk2f4m6n7p9r1s3t5v7x
path
​string | null · maxLength: 4096

For a file backup: the absolute path of the file or directory to download, inside the job's backed-up path. Not used for database backups, which download the snapshot's database dump.

Example: /var/www/shop/storage/invoices
path_type
​string | null · enum

For a file backup: whether the path is a file or a directory.

Enum values:
file
directory
repository
​string | null

Formatted ID of the repository to read from, the main repository when left out. Use it to download from an extra copy.

Example: repository_01j8q8zk2f4m6n7p9r1s3t5v7x

Prepare a download › Responses

The download is being prepared, or an earlier download of the same content is returned.

​Download · required

Get a download

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

Get one hosted download, to follow its preparation until it is ready.

Get a download › path Parameters

download
​string · required

Get a download › Responses

Download

​Download · required

Delete a ready download

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

Delete the ZIP of a ready download before it expires. Download URLs created for it stop working. The download stays listed in the history.

Delete a ready download › path Parameters

download
​string · required

Delete a ready download › Responses

Download

​Download · required

Cancel a download

POST
https://backup.chief.app/api/v1
/downloads/{download}/cancel
OpenID Connect
or
Bearer (ctp_*)
or
Bearer (ctt_*)

Stop preparing a download. A queued download is cancelled right away, one being prepared stops at its next check, and the ZIP of a ready download is deleted.

Cancel a download › path Parameters

download
​string · required

Cancel a download › Responses

Download

​Download · required

Create a download URL

POST
https://backup.chief.app/api/v1
/downloads/{download}/url
OpenID Connect
or
Bearer (ctp_*)
or
Bearer (ctt_*)

Create a URL that downloads the ZIP of a ready download. Anyone with the URL can download the backup contents, without signing in, until it expires after 60 minutes, so share it only with whoever needs it. A ready download is kept at least until the URL expires.

Create a download URL › path Parameters

download
​string · required

Create a download URL › Responses

​object · required