Variables endpoint

Given a StudyKey, fetch the set of variables. A variable is a data point on an electronic clinical case report form (eCRF). An eCRF contains many variables. Variables are related to records in that each record will contain responses to each variable on the eCRF, within the recordData property.

Accessing the index

A GET request is used to access the index

Request structure

GET /api/v1/edc/studies/PHARMADEMO/variables?page=0&size=25&sort=variableId%2CASC&filter=variableId%3D%3D10299 HTTP/1.1
Content-Type: application/json
Host: localhost:8080

Path parameters are required.

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

studyKey

StudyKey to retrieve list of variables

Request parameters

Request parameters are optional. Default values are used unless specified.

Parameter Description

page

Which index page to be returned. Default value is 0.

size

Items per page to be returned. Default value is 25. Maximum items allowed per page is 500

sort

Name of the property by which to sort the result set. To sort in a particular direction add a comma to the property name and either asc or desc. To sort by multiple properties add additional sort parameters. Default value is formId,asc.

filter

Optional filter search criteria. Must follow correct syntax. Refer to filter section for details.

Response body

Below is an example response payload.

{
  "metadata" : {
    "status" : "OK",
    "method" : "GET",
    "path" : "/api/v1/edc/studies/PHARMADEMO/variables",
    "timestamp" : "2023-12-27 22:15:15",
    "error" : { }
  },
  "pagination" : {
    "currentPage" : 0,
    "size" : 25,
    "totalPages" : 1,
    "totalElements" : 1,
    "sort" : [ {
      "property" : "variableId",
      "direction" : "ASC"
    } ]
  },
  "data" : [ {
    "studyKey" : "PHARMADEMO",
    "variableId" : 1,
    "variableType" : "RADIO",
    "variableName" : "Pain Level",
    "sequence" : 1,
    "revision" : 1,
    "disabled" : false,
    "dateCreated" : "2023-12-27 22:15:15",
    "dateModified" : "2023-12-27 22:15:16",
    "formId" : 108727,
    "variableOid" : "OID-1",
    "deleted" : false,
    "formKey" : "FORM_1",
    "formName" : "Pre-procedure screening",
    "label" : "Select patient pain level between 1 and 10",
    "blinded" : false
  } ]
}

Response fields

Path Type Description

metadata.status

String

Http status

metadata.method

String

Http method

metadata.path

String

Requested URI path

metadata.timestamp

String

Timestamp when response was generated

metadata.error

Object

Detail error message from request if error occur

pagination.currentPage

Number

Current index page

pagination.size

Number

Size per page

pagination.totalPages

Number

Total pages return from search

pagination.totalElements

Number

Total elements return from search

pagination.sort[].property

String

Sort property

pagination.sort[].direction

String

Sort direction

data[].studyKey

String

Unique study key for a given study

data[].variableId

Number

Mednet Variable ID

data[].variableType

String

Variable Type

data[].variableName

String

Name of the variable on the eCRF

data[].sequence

Number

User defined sequence of variable

data[].revision

Number

Number of modifications of the form metadata

data[].disabled

Boolean

Variable disabled flag

data[].dateCreated

String

Date when this form was created

data[].dateModified

String

Date when this form was last modified

data[].formId

Number

Mednet Form ID

data[].variableOid

String

Client-assigned variable OID

data[].deleted

Boolean

Variable deleted flag

data[].formKey

String

Form key

data[].formName

String

Name of the eCRF

data[].label

String

User defined field identifier

data[].blinded

Boolean

Blinded flag