/versions/entity   Demo console

Retrieve a past value of single entity by primary key and timestamp.

The example below shows how to retrieve the past value of an entity of type user by id and timestamp.

Endpoint URL

POST https://{your-capture-domain.com}/versions/entity

Request Parameters

Parameter ReqRequired Description
type_name
string
Yes

The entityType of the entity.

id
string
Yes

The primary key of the parent object.

timestamp
string
Yes

The date and time to search for. The value of the record as it existed at that timestamp is returned.

To format this parameter, see the Timestamp section in the Attribute Data Types topic.

client_id
string
Yes

The client identifier.

client_secret
string
Yes

The shared secret paired with the client_id.

Example Request

# Returns the versions of the entity of type "user" and id 1 from yesterday

curl -X POST 
-d client_id=12345abcde12345abcde 
-d client_secret=edcba54321edcba54321 
-d type_name=user 
-d timestamp='yesterday'  # formatted as a proper DateTime, of course!
-d id=1 

https://my-app.janraincapture.com/versions/entity

{
  "result":
  {
    "id": "1",
    "firstName":"Robert"
  },
  "stat": "ok"
}