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/6935e7c8-19e0-4f1f-bf56-cb54b0f1dc7b 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" : "345a2ee7-c5a3-4af4-bf38-6c3ff948ba77",
  "batchId" : "b4988fb5-c6b4-466e-9efa-857fe2fec265",
  "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