Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com

Query creation and last update times

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
Query details of specimen with ID = 500
[
  {
    "objectName": "specimen",
    "objectId": 500
  }
]

Response

[
    {
        "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> identifies specimen record whose ID is 50

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. 
Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com