Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This API can be used to query the creation and last update times of one or more records identified by the object type and object ID.


Request

URL
/openspecimen/rest/ng/audit
Method
POST
Body


Code Block
titleQuery details of specimen with ID = 500
[
  {
    "objectName": "specimen",
    "objectId": 500
  }
]



Response

Code Block
[
    {
        "createdBy": {
            "id": 1,
            "firstName": "John",
            "lastName": "Doe",
            "emailAddress": "john.doe@localhost",
        },
        "createdOn": 1441217413000,
        "lastUpdatedBy": {
            "id": 2,
            "firstName": "Jannie",
            "lastName": "Doe",
            "emailAddress": "jannie.doe@localhost",
        },
        "lastUpdatedOn": 1441917413000,
        "revisionsCount": 2
    }
]


Request parameters

ParameterDescription
objectNameThe object type whose audit data is being queried. Example - collection_protocol_registration, collection_protocol, participant, visit, specimen, etc
objectIdOpenSpecimen assigned unique integer ID that identifies the object/record within the object type domain. For example:  <specimen, 50> is 


Response parameters

ParameterDescription
createdByUser who created the object/record.
createdOnDate and time when the object/record was created.
lastUpdatedByUser responsible for the latest update.
lastUpdatedOnDate and time when the last update was effected.
revisionsCountNumber of times the object/record is modified.