Mass Edit Job Resource
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 that contains the state of the job.
Example Request:
GET http://<hostname>/api/massedits/1493
Host: hostname
Accept: application/json
Example Response:
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. 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 succesful update of the job. In all other cases the server refuses the request with 403 Forbidden
.
Example Request:
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/1.1 204 No Content
Can we improve this article ? Provide feedback