Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: First published version

...

This resource supports the following methods: GET

 

Methods

GET

...

Retrieves the status of a running or completed job. Note that after some time completed jobs will be flushed. At this point, this method will return a '404 Not Found' response.

...

StatusDescription
200 - OKReturned if the request was completed successfully.
404 - NotFoundReturned if no job was found with the sepcified specified identifier.

 

Example - In Progress Task

 

Example of retrieving the progress status for a task that is running in the background.

Request Headers

KeyValueDescription
Acceptapplication/json 

Request Parameters

KeyValueDescription
{id}reindex-7bdba522-590a-4df4-b409-a2939851241bThe Unique identifier of the job (string).

Response Headers

KeyValueDescription
Content-Typeapplication/json; charset=utf-8 

Response Body

Code Block
languagenone
{
  "Complete": false,
  "TotalElements": 10,
  "ProcessedElements": 5,
  "StartedAt": "2011-12-31T11:00:00Z",
  "ProgressInPercent": 0.5,
  "Id": "reindex-7bdba522-590a-4df4-b409-a2939851241b",
  "Message": "Reticulating Splines",
  "Self": "http://localhost/api/backgroundtask/reindex-7bdba522-590a-4df4-b409-a2939851241b"
}

Status Code

200 - OK

 

Example - Completed Task

 

Example of retrieving the progress for a task that has finished.

Request Headers

KeyValueDescription
Acceptapplication/json 

Request Parameters

KeyValueDescription
{id}reindex-7bdba522-590a-4df4-b409-a2939851241bUnique identifier of the job (string)

Response Headers

KeyValueDescription
Content-Typeapplication/json; charset=utf-8 

Response Body

Code Block
languagenone
{
  "Complete": true,
  "TotalElements": 10,
  "ProcessedElements": 10,
  "StartedAt": "2011-12-31T12:00:00Z",
  "FinishedAt": "2011-12-31T12:10:14Z",
  "ProgressInPercent": 1.0,
  "Id": "reindex-7bdba522-590a-4df4-b409-a2939851241b",
  "Message": "Task Completed",
  "Self": "http://localhost/api/backgroundtask/reindex-7bdba522-590a-4df4-b409-a2939851241b"
}

Status Code

200 - OK