---
ai:
  exclude: true
search:
  tags:
    - Backup and Restore
    - PUT
seo:
  description: >-
    Cancels the job. If the job is already… Reference for the PUT
    /rest/api/backup-restore/jobs/{jobId}/cancel endpoint in the Confluence Data
    Center API.
sidebar:
  label: Cancel job
  badge: PUT
title: Cancel job
type: openapi-operation
---
Cancels the job. If the job is already cancelled or failed, the method will do nothing.

`PUT /rest/api/backup-restore/jobs/{jobId}/cancel`

**Responses**

- `200` — Returns a JSON representation of the cancelled job.
- `404` — Returned if job not found or user doesn't have permission to cancel it

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
}
```
