---
ai:
  exclude: true
search:
  tags:
    - Backup and Restore
    - POST
seo:
  description: >-
    This resource expects a multipart post. The… Reference for the POST
    /rest/api/backup-restore/restore/space/upload endpoint in the Confluence
    Data Center API.
sidebar:
  label: Create space restore job for upload backup file
  badge: POST
title: Create space restore job for upload backup file
type: openapi-operation
---
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 

.

`POST /rest/api/backup-restore/restore/space/upload`

**Request body** (`multipart/form-data`)

backup file uploaded. Has to be a zip file.

- `file` (string) — backup file uploaded. Has to be a zip file.

Request body example:

```json
{
  "file": "string"
}
```

**Responses**

- `200` — Returns a JSON representation of the space restore job details.
- `400` — Returned if the uploaded file is not a zip file
- `403` — Returned if user doesn't have permission to restore space

Response example, 200:

```json
{
  "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
  }
}
```
