---
title: "Mass edit job"
slug: "mass-edit-job-1523354"
abstract: ""
---
# Mass edit job

Each mass edit job is represented by a mass edit job resource. This resource can be used to retrieve the state of the job, or to cancel it.

The following methods are supported: `GET`, `HEAD`, `PUT`, and `POST`.

## GET /api/massedits/id

Returns a [Mass Edit Job Object](https://doc.sitecore.com/ch/en/developers/cloud-dev/mass-edit-job.html "Mass edit job") that contains the state of the job.

Example Request:

```http
GET http://<hostname>/api/massedits/1493
Host: hostname
Accept: application/json

```

Example Response:

```csharp
HTTP/1.1 200 OK
Content-Length: content length
Content-Type: application/json; charset=utf-8
ETag: "hash string"

{
    "state_description":"Pending",
    "state":"Pending",
    "condition":"Pending",
    "started_on":"...",
    "completed_on":null,
    "target_count":215,
    "targets_completed":100,
    "self":{
        "href":"http://<hostname>/api/massedits/1493",
        "title":"This mass edit job."
    },
    "targets":{
        "href":"http/<hostname>/api/massedits/1493/targets",
        "title":"The collection of targets for this Mass Edit Job."
    }
}

```

## PUT /api/entities/id

Offers the opportunity to cancel a [Mass Edit Job](https://doc.sitecore.com/ch/en/developers/cloud-dev/mass-edit-job.html "Mass edit job"). Only jobs that are in the `Pending `state can be cancelled, by assigning the `Cancelled `state to the resource and then making the PUT request. The request body must contain a Mass Edit Job. All properties are ignored, and only the `state `property is checked if it's set to `Cancelled`. The server then responds with `204 No Content` to indicate a successful update of the job. In all other cases the server refuses the request with `403 Forbidden`.

Example Request:

```json
PUT http://<hostname>/api/entities/1493
Host: hostname
Content-Type: application/json

{
    "state_description":"In progress",
    "state":"Cancelled",
    "condition":"Pending",
    "started_on":"...",
    "completed_on":null,
    "target_count":215,
    "targets_completed":100,
    "self":{
        "href":"http://<hostname>/api/massedits/1493",
        "title":"This mass edit job."
    },
    "targets":{
        "href":"http/<hostname>/api/massedits/1493/targets",
        "title":"The collection of targets for this Mass Edit Job."
    }
}

```

Example response:

```http
HTTP/1.1 204 No Content

```