11.5.2.3. Listing Scanning Tasks

You can display a list of scanning tasks that have completed, and those that are in progress, by running a RESTful GET on "http://localhost:8080/openidm/taskscanner". The following example displays all scanning tasks.

$curl
 --header "X-OpenIDM-Username: openidm-admin"
 --header "X-OpenIDM-Password: openidm-admin"
 --request GET
 "http://localhost:8080/openidm/taskscanner"
    

The output of such a request is similar to the following, with one item for each scanning task. The output appears on a single line, but has been indented here, for legibility.

{"tasks": [
    {
      "_id": "edfaf59c-aad1-442a-adf6-3620b24f8385",
      "progress": {
        "state": "COMPLETED",
        "processed": 2400,
        "total": 2400,
        "successes": 2400,
        "failures": 0
      },
      "started": 1352455546149,
      "ended": 1352455546182
    }
  ]
}
    

Each scanning task has the following properties:

_id

The ID of the scanning task.

progress

The progress of the scanning task, summarised in the following fields:

state - the overall state of the task, INITIALIZED, ACTIVE, COMPLETED, CANCELLED, or ERROR
processed - the number of processed records
total - the total number of records
successes - the number of records processed successfully
failures - the number of records not able to be processed
started

The time at which the scanning task started, .

ended

The time at which the scanning task ended.

The number of processed tasks whose details are retained is governed by the "openidm.taskscanner.maxcompletedruns" property in the conf/boot.properties file. By default, the last one hundred completed tasks are retained.