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/1c90fb39-9bc6-432a-ae29-c888cb48f41e 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" : "2567940b-3df7-4a05-9d92-99347b59f26a",
  "batchId" : "e82ef4a3-d959-43dd-9fb7-b77f2271d090",
  "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