Jobs endpoint

Given a batch ID, fetch the job information. A job is an API operation that is created by submitting request to the POST records endpoint.

Accessing the index

A GET request is used to access the index

Request structure

GET /api/v1/edc/studies/MOCK-STUDY/jobs/1601b8a0-45ba-4136-8c55-17fab704bc80 HTTP/1.1
Content-Type: application/json
Host: localhost:8080

Path parameters are required.

Table 1. /api/v1/edc/studies/{studyKey}/jobs/{batchId}
Parameter Description

studyKey

Study Key to retrieve job state

batchId

Batch ID that is provided from the postRecords endpoint

Response body

Below is an example response payload.

{
  "jobId" : "afa2d61e-07ed-4efe-99c5-6f358f5e7d38",
  "batchId" : "75e63db6-fa41-40bc-b939-cf3bdb246ae8",
  "state" : "completed",
  "dateCreated" : "2020-12-01 21:47:36",
  "dateStarted" : "2020-12-01 21:47:42",
  "dateFinished" : "2020-12-01 21:47:45"
}

Response fields

Path Type Description

jobId

String

Job ID

batchId

String

Batch ID

state

String

State of the job

dateCreated

String

Timestamp when this job was created

dateStarted

String

Timestamp when the job started running

dateFinished

String

Timestamp when the job was completed