Cancels all queued jobs. Does not affect jobs that are being processed at the moment.
This request has no parameters.
Returns the number of cancelled jobs. If no jobs were cancelled, 0 is returned.
Example response: 1
any
1
2
3
curl --request PUT \
--url 'http://{baseurl}/confluence/rest/api/backup-restore/jobs/clear-queue' \
--header 'Accept: application/json'
Cancels the job. If the job is already cancelled or failed, the method will do nothing.
string
RequiredReturns a JSON representation of the cancelled job.
1
2
3
curl --request PUT \
--url 'http://{baseurl}/confluence/rest/api/backup-restore/jobs/{jobId}/cancel' \
--header 'Accept: application/json'
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
}
Starts the new site backup job.
Site backup settings
boolean
boolean
string
Returns a JSON representation of the site backup job details.
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"
}'
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
}
}
Starts the new site restore job.
space restore settings
string
boolean
string
Returns a JSON representation of the site restore job.
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"
}'
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
}
}
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
.
Backup file to be uploaded. Has to be a zip file.
string
Returns a JSON representation of the site restore job details.
1
2
3
curl --request POST \
--url 'http://{baseurl}/confluence/rest/api/backup-restore/restore/site/upload' \
--header 'Accept: application/json'
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
}
}
Creates new space backup job and adds it to the queue.
Space backup settings
array<string>
boolean
string
Returns a JSON representation of the space backup job
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"
}'
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
}
}
Creates new space restore job and adds it to the queue.
space restore settings
string
boolean
string
Returns a JSON representation of the space restore job.
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"
}'
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
}
}
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
.
backup file uploaded. Has to be a zip file.
string
Returns a JSON representation of the space restore job details.
1
2
3
curl --request POST \
--url 'http://{baseurl}/confluence/rest/api/backup-restore/restore/space/upload' \
--header 'Accept: application/json'
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
}
}
Downloads the backup file for the given job. Requires site admin or space export permissions for all spaces included in the backup job.
string
RequiredReturns a data stream of the backup file content.
1
2
3
curl --request GET \
--url 'http://{baseurl}/confluence/rest/api/backup-restore/jobs/{jobId}/download' \
--header 'Accept: application/json'
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
}
Returns jobs based on the filters provided. The user must have permission to see the jobs.
string
string
string
string
string
string
string
string
Returns the List of backup/restore jobs visible to user based on the filter provided and the user's permissions.
array<JobDetails>
1
2
3
curl --request GET \
--url 'http://{baseurl}/confluence/rest/api/backup-restore/jobs' \
--header 'Accept: application/json'
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
}
]
returns list of information on files in conf-home/restore/(jobScope).
string
Returns a list of FileInfo objects, containing fileName, fileCreationTime, fileSize, and jobScope.
array<FileInfo>
1
2
3
curl --request GET \
--url 'http://{baseurl}/confluence/rest/api/backup-restore/restore/files' \
--header 'Accept: application/json'
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 job by id. The user must be a sysadmin or the owner of the job.
string
RequiredReturns a JSON representation of the backup/restore job
1
2
3
curl --request GET \
--url 'http://{baseurl}/confluence/rest/api/backup-restore/jobs/{jobId}' \
--header 'Accept: application/json'
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: