On this page:

26.2Batch Job Endpoint

 

The Batch Job Endpoint can be used to view the status of running background jobs.

26.2.1Fetch Batch Job Names

 
This method requires the VIEW_BATCH_JOBS permission.

This method will return the names of all batch jobs on the server for a given module.


To invoke:

GET http://localhost:9000/batch-job/{module_id}

The server will produce a response resembling the following:

{
   "jobs": [
      {
         "name": "bulkImportJob"
      }
   ]
}

26.2.2Fetch All Instances

 
This method requires the VIEW_BATCH_JOBS permission.

This method will return all instances (including running, complete, and failed) of a given batch job.


To invoke:

GET http://localhost:9000/batch-job/{module_id}/{job_name}

You may also add the following URL parameters:

  • start=[int] – The index of the first result to return
  • count=[int] – The number of results to return

For example, to view a list of all BulkImportJob instances on the persistence module, the following URL could be used: http://localhost:9000/batch-job/persistence/bulkImportJob?count=20&start=0

The server will produce a response resembling the following:

{
   "jobInstances": [
      {
         "jobName": "bulkImportJob",
         "jobExecutions": [
            {
               "jobParameters": {
                  "jobUUID": "dffff719-23ca-4722-b945-3f483928c7d4",
                  "commitInterval": "1000"
               },
               "createTime": "2021-04-14T08:15:01.382-04:00",
               "startTime": "2021-04-14T08:15:01.425-04:00",
               "lastUpdatedTime": "2021-04-14T08:15:01.425-04:00",
               "status": "STARTED",
               "exitStatus": {
                  "exitCode": "UNKNOWN",
                  "exitDescription": "",
                  "running": true
               },
               "failureExceptions": []
            }
         ]
      }
   ]
}