PUT

Cancel all queued jobs

Cancels all queued jobs. Does not affect jobs that are being processed at the moment.

Request

This request has no parameters.

Responses

Returns the number of cancelled jobs. If no jobs were cancelled, 0 is returned. Example response: 1

application/json

any

PUT/rest/api/backup-restore/jobs/clear-queue
1 2 3 curl --request PUT \ --url 'http://{baseurl}/confluence/rest/api/backup-restore/jobs/clear-queue' \ --header 'Accept: application/json'
PUT

Cancel job

Cancels the job. If the job is already cancelled or failed, the method will do nothing.

Request

Path parameters

jobId

string

Required

Responses

Returns a JSON representation of the cancelled job.

application/json

JobDetails
PUT/rest/api/backup-restore/jobs/{jobId}/cancel
1 2 3 curl --request PUT \ --url 'http://{baseurl}/confluence/rest/api/backup-restore/jobs/{jobId}/cancel' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 { "id": 1, "jobOperation": "BACKUP", "jobScope": "SITE", "jobState": "IN_PROGRESS", "createTime": "2020-01-01T01:01:01Z", "startProcessingTime": "2020-01-01T01:01:01Z", "finishProcessingTime": "2020-01-01T01:01:01Z", "cancelTime": "2020-01-01T01:01:01Z", "errorMessage": "Error message", "owner": "admin", "cancelledBy": "admin", "fileName": "backup-2020-01-01.zip", "spaceKeys": "spaceKey1,spaceKey2", "fileDeleteTime": "2020-01-01T01:01:01Z", "fileExists": true }
POST

Create site backup job

Starts the new site backup job.

Request

Request bodyapplication/json

Site backup settings

skipAttachments

boolean

keepPermanently

boolean

fileNamePrefix

string

Responses

Returns a JSON representation of the site backup job details.

application/json

SiteBackupJobDetails
POST/rest/api/backup-restore/backup/site
1 2 3 4 5 6 7 8 9 curl --request POST \ --url 'http://{baseurl}/confluence/rest/api/backup-restore/backup/site' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "skipAttachments": true, "keepPermanently": true, "fileNamePrefix": "backup" }'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 { "id": 1, "jobOperation": "BACKUP", "jobScope": "SITE", "jobState": "IN_PROGRESS", "createTime": "2020-01-01T01:01:01Z", "startProcessingTime": "2020-01-01T01:01:01Z", "finishProcessingTime": "2020-01-01T01:01:01Z", "cancelTime": "2020-01-01T01:01:01Z", "errorMessage": "Error message", "owner": "admin", "cancelledBy": "admin", "fileName": "backup-2020-01-01.zip", "spaceKeys": "spaceKey1,spaceKey2", "fileDeleteTime": "2020-01-01T01:01:01Z", "fileExists": true, "jobSettings": { "skipAttachments": true, "keepPermanently": true, "fileNamePrefix": "backup" }, "statistics": { "totalObjectsCount": 100, "processedObjectsCount": 50, "persistedObjectsCount": 50, "skippedObjectsCount": 0, "reusedObjectsCount": 10 }, "jobStatistics": { "totalObjectsCount": 100, "processedObjectsCount": 50, "persistedObjectsCount": 50, "skippedObjectsCount": 0, "reusedObjectsCount": 10 } }
POST

Create site restore job

Starts the new site restore job.

Request

Request bodyapplication/json

space restore settings

filename

string

skipReindex

boolean

fileName

string

Responses

Returns a JSON representation of the site restore job.

application/json

SiteRestoreJobDetails
POST/rest/api/backup-restore/restore/site
1 2 3 4 5 6 7 8 9 curl --request POST \ --url 'http://{baseurl}/confluence/rest/api/backup-restore/restore/site' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "filename": "<string>", "skipReindex": true, "fileName": "backup-2020-01-01-01-01-01.zip" }'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 { "id": 1, "jobOperation": "BACKUP", "jobScope": "SITE", "jobState": "IN_PROGRESS", "createTime": "2020-01-01T01:01:01Z", "startProcessingTime": "2020-01-01T01:01:01Z", "finishProcessingTime": "2020-01-01T01:01:01Z", "cancelTime": "2020-01-01T01:01:01Z", "errorMessage": "Error message", "owner": "admin", "cancelledBy": "admin", "fileName": "backup-2020-01-01.zip", "spaceKeys": "spaceKey1,spaceKey2", "fileDeleteTime": "2020-01-01T01:01:01Z", "fileExists": true, "jobSettings": { "skipReindex": true, "fileName": "backup-2020-01-01-01-01-01.zip" }, "statistics": { "totalObjectsCount": 100, "processedObjectsCount": 50, "persistedObjectsCount": 50, "skippedObjectsCount": 0, "reusedObjectsCount": 10 }, "jobStatistics": { "totalObjectsCount": 100, "processedObjectsCount": 50, "persistedObjectsCount": 50, "skippedObjectsCount": 0, "reusedObjectsCount": 10 } }
POST

Create site restore job for upload backup file

This resource expects a multipart post. The media-type multipart/form-data is defined in RFC 1867.

Most client libraries have classes that make dealing with multipart posts simple.

For instance, in Java the Apache HTTP Components library provides a MultiPartEntity that makes it simple to submit a multipart POST.

In order to protect against XSRF attacks, because this method accepts multipart/form-data, it has XSRF protection on it. This means you must submit a header of X-Atlassian-Token: nocheck with the request, otherwise it will be blocked.

The name of the multipart/form-data parameter that contains attachments must be "file".

An example to attach the file:

curl -D- -u admin:admin -X POST -H "X-Atlassian-Token: nocheck" -F file=@myfile.zip http://myhost/rest/api/backup-restore/restore/space/upload

.

Request

Request bodymultipart/form-data

Backup file to be uploaded. Has to be a zip file.

file

string

Responses

Returns a JSON representation of the site restore job details.

application/json

SiteRestoreJobDetails
POST/rest/api/backup-restore/restore/site/upload
1 2 3 curl --request POST \ --url 'http://{baseurl}/confluence/rest/api/backup-restore/restore/site/upload' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 { "id": 1, "jobOperation": "BACKUP", "jobScope": "SITE", "jobState": "IN_PROGRESS", "createTime": "2020-01-01T01:01:01Z", "startProcessingTime": "2020-01-01T01:01:01Z", "finishProcessingTime": "2020-01-01T01:01:01Z", "cancelTime": "2020-01-01T01:01:01Z", "errorMessage": "Error message", "owner": "admin", "cancelledBy": "admin", "fileName": "backup-2020-01-01.zip", "spaceKeys": "spaceKey1,spaceKey2", "fileDeleteTime": "2020-01-01T01:01:01Z", "fileExists": true, "jobSettings": { "skipReindex": true, "fileName": "backup-2020-01-01-01-01-01.zip" }, "statistics": { "totalObjectsCount": 100, "processedObjectsCount": 50, "persistedObjectsCount": 50, "skippedObjectsCount": 0, "reusedObjectsCount": 10 }, "jobStatistics": { "totalObjectsCount": 100, "processedObjectsCount": 50, "persistedObjectsCount": 50, "skippedObjectsCount": 0, "reusedObjectsCount": 10 } }
POST

Create space backup job

Creates new space backup job and adds it to the queue.

Request

Request bodyapplication/json

Space backup settings

spaceKeys

array<string>

keepPermanently

boolean

fileNamePrefix

string

Responses

Returns a JSON representation of the space backup job

application/json

SpaceBackupJobDetails
POST/rest/api/backup-restore/backup/space
1 2 3 4 5 6 7 8 9 10 11 curl --request POST \ --url 'http://{baseurl}/confluence/rest/api/backup-restore/backup/space' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "spaceKeys": [ "['SPACE1', 'SPACE2']" ], "keepPermanently": true, "fileNamePrefix": "backup" }'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 { "id": 1, "jobOperation": "BACKUP", "jobScope": "SITE", "jobState": "IN_PROGRESS", "createTime": "2020-01-01T01:01:01Z", "startProcessingTime": "2020-01-01T01:01:01Z", "finishProcessingTime": "2020-01-01T01:01:01Z", "cancelTime": "2020-01-01T01:01:01Z", "errorMessage": "Error message", "owner": "admin", "cancelledBy": "admin", "fileName": "backup-2020-01-01.zip", "spaceKeys": "spaceKey1,spaceKey2", "fileDeleteTime": "2020-01-01T01:01:01Z", "fileExists": true, "jobSettings": { "spaceKeys": [ "['SPACE1', 'SPACE2']" ], "keepPermanently": true, "fileNamePrefix": "backup" }, "statistics": { "totalObjectsCount": 100, "processedObjectsCount": 50, "persistedObjectsCount": 50, "skippedObjectsCount": 0, "reusedObjectsCount": 10 }, "jobStatistics": { "totalObjectsCount": 100, "processedObjectsCount": 50, "persistedObjectsCount": 50, "skippedObjectsCount": 0, "reusedObjectsCount": 10 } }
POST

Create space restore job

Creates new space restore job and adds it to the queue.

Request

Request bodyapplication/json

space restore settings

filename

string

skipReindex

boolean

fileName

string

Responses

Returns a JSON representation of the space restore job.

application/json

SpaceRestoreJobDetails
POST/rest/api/backup-restore/restore/space
1 2 3 4 5 6 7 8 9 curl --request POST \ --url 'http://{baseurl}/confluence/rest/api/backup-restore/restore/space' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "filename": "<string>", "skipReindex": true, "fileName": "space123.zip" }'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 { "id": 1, "jobOperation": "BACKUP", "jobScope": "SITE", "jobState": "IN_PROGRESS", "createTime": "2020-01-01T01:01:01Z", "startProcessingTime": "2020-01-01T01:01:01Z", "finishProcessingTime": "2020-01-01T01:01:01Z", "cancelTime": "2020-01-01T01:01:01Z", "errorMessage": "Error message", "owner": "admin", "cancelledBy": "admin", "fileName": "backup-2020-01-01.zip", "spaceKeys": "spaceKey1,spaceKey2", "fileDeleteTime": "2020-01-01T01:01:01Z", "fileExists": true, "jobSettings": { "skipReindex": true, "fileName": "space123.zip" }, "statistics": { "totalObjectsCount": 100, "processedObjectsCount": 50, "persistedObjectsCount": 50, "skippedObjectsCount": 0, "reusedObjectsCount": 10 }, "jobStatistics": { "totalObjectsCount": 100, "processedObjectsCount": 50, "persistedObjectsCount": 50, "skippedObjectsCount": 0, "reusedObjectsCount": 10 } }
POST

Create space restore job for upload backup file

This resource expects a multipart post. The media-type multipart/form-data is defined in RFC 1867.

Most client libraries have classes that make dealing with multipart posts simple.

For instance, in Java the Apache HTTP Components library provides a MultiPartEntity that makes it simple to submit a multipart POST.

In order to protect against XSRF attacks, because this method accepts multipart/form-data, it has XSRF protection on it. This means you must submit a header of X-Atlassian-Token: nocheck with the request, otherwise it will be blocked.

The name of the multipart/form-data parameter that contains attachments must be "file".

An example to attach the file:

curl -D- -u admin:admin -X POST -H "X-Atlassian-Token: nocheck" -F file=@myfile.zip http://myhost/rest/api/backup-restore/restore/space/upload

.

Request

Request bodymultipart/form-data

backup file uploaded. Has to be a zip file.

file

string

Responses

Returns a JSON representation of the space restore job details.

application/json

SpaceRestoreJobDetails
POST/rest/api/backup-restore/restore/space/upload
1 2 3 curl --request POST \ --url 'http://{baseurl}/confluence/rest/api/backup-restore/restore/space/upload' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 { "id": 1, "jobOperation": "BACKUP", "jobScope": "SITE", "jobState": "IN_PROGRESS", "createTime": "2020-01-01T01:01:01Z", "startProcessingTime": "2020-01-01T01:01:01Z", "finishProcessingTime": "2020-01-01T01:01:01Z", "cancelTime": "2020-01-01T01:01:01Z", "errorMessage": "Error message", "owner": "admin", "cancelledBy": "admin", "fileName": "backup-2020-01-01.zip", "spaceKeys": "spaceKey1,spaceKey2", "fileDeleteTime": "2020-01-01T01:01:01Z", "fileExists": true, "jobSettings": { "skipReindex": true, "fileName": "space123.zip" }, "statistics": { "totalObjectsCount": 100, "processedObjectsCount": 50, "persistedObjectsCount": 50, "skippedObjectsCount": 0, "reusedObjectsCount": 10 }, "jobStatistics": { "totalObjectsCount": 100, "processedObjectsCount": 50, "persistedObjectsCount": 50, "skippedObjectsCount": 0, "reusedObjectsCount": 10 } }
GET

Download backup file

Downloads the backup file for the given job. Requires site admin or space export permissions for all spaces included in the backup job.

Request

Path parameters

jobId

string

Required

Responses

Returns a data stream of the backup file content.

application/json

JobDetails
GET/rest/api/backup-restore/jobs/{jobId}/download
1 2 3 curl --request GET \ --url 'http://{baseurl}/confluence/rest/api/backup-restore/jobs/{jobId}/download' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 { "id": 1, "jobOperation": "BACKUP", "jobScope": "SITE", "jobState": "IN_PROGRESS", "createTime": "2020-01-01T01:01:01Z", "startProcessingTime": "2020-01-01T01:01:01Z", "finishProcessingTime": "2020-01-01T01:01:01Z", "cancelTime": "2020-01-01T01:01:01Z", "errorMessage": "Error message", "owner": "admin", "cancelledBy": "admin", "fileName": "backup-2020-01-01.zip", "spaceKeys": "spaceKey1,spaceKey2", "fileDeleteTime": "2020-01-01T01:01:01Z", "fileExists": true }
GET

Find jobs by filters

Returns jobs based on the filters provided. The user must have permission to see the jobs.

Request

Query parameters

owner

string

spaceKey

string

fromDate

string

jobStates

string

toDate

string

jobOperation

string

limit

string

jobScope

string

Responses

Returns the List of backup/restore jobs visible to user based on the filter provided and the user's permissions.

application/json

array<JobDetails>

GET/rest/api/backup-restore/jobs
1 2 3 curl --request GET \ --url 'http://{baseurl}/confluence/rest/api/backup-restore/jobs' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 [ { "id": 1, "jobOperation": "BACKUP", "jobScope": "SITE", "jobState": "IN_PROGRESS", "createTime": "2020-01-01T01:01:01Z", "startProcessingTime": "2020-01-01T01:01:01Z", "finishProcessingTime": "2020-01-01T01:01:01Z", "cancelTime": "2020-01-01T01:01:01Z", "errorMessage": "Error message", "owner": "admin", "cancelledBy": "admin", "fileName": "backup-2020-01-01.zip", "spaceKeys": "spaceKey1,spaceKey2", "fileDeleteTime": "2020-01-01T01:01:01Z", "fileExists": true } ]
GET

Get files in restore directory

returns list of information on files in conf-home/restore/(jobScope).

Request

Query parameters

jobScope

string

Responses

Returns a list of FileInfo objects, containing fileName, fileCreationTime, fileSize, and jobScope.

application/json

array<FileInfo>

GET/rest/api/backup-restore/restore/files
1 2 3 curl --request GET \ --url 'http://{baseurl}/confluence/rest/api/backup-restore/restore/files' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 [ { "name": "backup-2020-01-01-01-01-01.zip", "creationTime": "2020-01-01T01:01:01.000Z", "size": 1000, "jobScope": "SITE" } ]
GET

Get job by ID

Get job by id. The user must be a sysadmin or the owner of the job.

Request

Path parameters

jobId

string

Required

Responses

Returns a JSON representation of the backup/restore job

application/json

JobDetails
GET/rest/api/backup-restore/jobs/{jobId}
1 2 3 curl --request GET \ --url 'http://{baseurl}/confluence/rest/api/backup-restore/jobs/{jobId}' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 { "id": 1, "jobOperation": "BACKUP", "jobScope": "SITE", "jobState": "IN_PROGRESS", "createTime": "2020-01-01T01:01:01Z", "startProcessingTime": "2020-01-01T01:01:01Z", "finishProcessingTime": "2020-01-01T01:01:01Z", "cancelTime": "2020-01-01T01:01:01Z", "errorMessage": "Error message", "owner": "admin", "cancelledBy": "admin", "fileName": "backup-2020-01-01.zip", "spaceKeys": "spaceKey1,spaceKey2", "fileDeleteTime": "2020-01-01T01:01:01Z", "fileExists": true }

Rate this page: