Record Revisions endpoint

Given a StudyKey, fetch the set of record revisions. Each record revision represents a distinct state (revision) in the lifecycle of a record. Record revisions are related to records in that each record has one-to-many record revisions. Any time data is modified on a record, or a record progresses to a new status, a new record revision is captured.

Accessing the index

A GET request is used to access the index

Request structure

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

Path parameters are required.

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

studyKey

StudyKey to retrieve list of record revisions

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 recordRevisionId,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/recordRevisions",
    "timestamp" : "2024-03-22 15:32:18",
    "error" : { }
  },
  "pagination" : {
    "currentPage" : 0,
    "size" : 25,
    "totalPages" : 1,
    "totalElements" : 1,
    "sort" : [ {
      "property" : "recordRevisionId",
      "direction" : "ASC"
    } ]
  },
  "data" : [ {
    "studyKey" : "PHARMADEMO",
    "recordRevisionId" : 1,
    "recordId" : 1,
    "recordOid" : "REC-1",
    "recordRevision" : 1,
    "dataRevision" : 1,
    "recordStatus" : "Record Complete",
    "subjectId" : 247,
    "subjectOid" : "OID-1",
    "subjectKey" : "001-003",
    "siteId" : 2,
    "formKey" : "AE",
    "intervalId" : 15,
    "role" : "Research Coordinator",
    "user" : "jdoe",
    "reasonForChange" : "Data entry error",
    "deleted" : true,
    "dateCreated" : "2024-03-22 15:32:18"
  } ]
}

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

Detailed error message from request if an error occured

pagination.currentPage

Number

Current index page

pagination.size

Number

Size per page

pagination.totalPages

Number

Total pages returned from search

pagination.totalElements

Number

Total elements returned 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[].recordRevisionId

Number

Unique system identifier for the record revision

data[].recordId

Number

Unique system identifier for the related record

data[].recordOid

String

Client-assigned record OID

data[].recordRevision

Number

Record revision number

data[].dataRevision

Number

Data revision number

data[].recordStatus

String

User defined record status

data[].subjectId

Number

Mednet Subject ID

data[].subjectOid

String

Client-assigned subject OID

data[].subjectKey

String

Protocol-assigned subject identifier

data[].siteId

Number

Unique system identifier for the related site

data[].formKey

String

Form key

data[].intervalId

Number

Unique system identifier for Interval

data[].role

String

Role name of the user who saved the record revision

data[].user

String

Username of the user who saved the record revision

data[].reasonForChange

String

Record revision’s Reason For Change data

data[].deleted

Boolean

Record deleted flag

data[].dateCreated

String

Date when this record revision was created