Versions Compared

Key

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

This API can be used to retrieve the revisions list of objects that satisfy the request criteria. A revision represents an action of creating, modifying or deleting the object/record.


Request

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


Code Block
[
	{
		"objectName": "collection_protocol_registration",
		"objectId": 1
	}
]



Response

Code Block
[
    {
        "revisionId": 2286,
        "changedBy": {
            "id": 2,
            "firstName": "Jannie",
            "lastName": "Doe",
            "emailAddress": "jannie.doe@localhost"
        },
        "changedOn": 1443534843000,
    },
    {
        "revisionId": 22,
        "changedBy": {
            "id": 1,
            "firstName": "John",
            "lastName": "Doe",
            "emailAddress": "john.doe@localhost"
        },
        "changedOn": 1430723985000,
    }
]

Request parameters

ParameterDescription
objectNameThe object type whose revisions list 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
revisionIdUnique ID assigned to every revision in OpenSpecimen.
changedByUser who effected the revision.
changedOnDate and time of the revision.