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 |
[
{
"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
Parameter | Description |
---|
objectName | The object type whose audit data is being queried. Example - collection_protocol_registration, collection_protocol, participant, visit, specimen, etc |
objectId | OpenSpecimen assigned unique integer ID that identifies the object/record within the object type domain. For example: <specimen, 50> is |
Response parameters
Parameter | Description |
---|
createdBy | User who created the object/record. |
createdOn | Date and time when the object/record was created. |
lastUpdatedBy | User responsible for the latest update. |
lastUpdatedOn | Date and time when the last update was effected. |
revisionsCount | Number of times the object/record is modified. |