How to display Edit History for an object in OSDK / custom React app (outside Workshop)?

In Workshop, there’s a built-in Edits History widget that shows the full audit trail of changes made to an ontology object via Actions. It displays who changed what, when, and the previous vs. new values.

When building a custom front-end with OSDK (TypeScript / React), this widget is not available out of the box. How can we replicate this functionality?

3 Likes

(Note: self-answer)

We currently see two options to this - the first one being the more flexible & recommended.

Option 1: Call the Edits History API directly (recommended)

The Foundry V2 API exposes an editsHistory endpoint on each object type. You can call it directly and render the results however you want.

Here is an example curl call:

curl -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  "https://<your-stack>.palantirfoundry.com/api/v2/ontologies/<ontology-rid>/objectTypes/<ObjectTypeApiName>/editsHistory?preview=true" \
  -d '{
    "objectPrimaryKey": {
      "<primaryKeyProperty>": {
        "type": "stringValue",
        "value": "<your-object-pk>"
      }
    },
    "pageSize": 20
  }'

Note: As of writing, this endpoint requires the ?preview=true query parameter.

Response structure

The API returns an array of edit entries, each containing:

  • timestamp: when the edit happened

  • userId: the user who performed the action

  • actionTypeRid: which Action Type triggered the edit

  • edit.type: either modifyEdit, addEdit, or deleteEdit

  • edit.previousProperties: the property values before the edit

  • edit.properties: the property values after the edit

Here is a trimmed example response:

{
  "data": [
    {
      "userId": "7824194c-9ea0-421a-b934-79969049a987",
      "timestamp": "2026-04-08T20:54:48.751Z",
      "edit": {
        "type": "modifyEdit",
        "previousProperties": {
          "validatedValue": -4.0,
          "validation": false
        },
        "properties": {
          "validated Value": 0.0,
          "validation": true
        }
      }
    }
  ],
  "totalCount": 4
}

You can then build a React component that renders this as a timeline, a table, or a diff view, whatever fits your application’s design system.

Option 2: Embed Workshop via iframe

If you want a quicker, lower-effort path, you can create a minimal Workshop module containing only the Edits History widget, then embed it in your OSDK app using an iframe.

<iframe
  src="https://your-stack.palantirfoundry.com/workspace/module/your-module-rid"
  width="100%"
  height="600px"
/>

This works for internal tooling where visual consistency is not critical, but it gets painful fast if you need tight integration with your app’s UX.

Comparison

Direct API (recommended) Iframe embed
Setup effort Medium Low
Styling control Full None

For any serious OSDK application, I’d recommend Option 1. The API is straightforward, the response shape is clean, and you get full control over how the edit history is presented to your users.

Hope this helps others as it helped me!

2 Likes

Hi @louis-sibyl , can we access the last updated metadata for a objectsource which is being used as a backing datasource for objectType. Currently this is directly available as a widget in workshop as “Data freshness“ which has no output. But I want to access the last refresh details for other downstream tasks.

Hi @Benutzer7 ,

There’s no direct “Data Freshness” API endpoint, but you can get the same information by querying the backing dataset’s transaction history.

Step 1: Get the latest transaction RID from the branch

Call the Get Branch endpoint:

curl -H "Authorization: Bearer $TOKEN" \
  "https://$HOSTNAME/api/v2/datasets/{datasetRid}/branches/master"

Response:

{
  "name": "master",
  "transactionRid": "ri.foundry.main.transaction.00000987-2a11-48f1-b19f-e3bf0482079c"
}

Step 2: Get the transaction details

Call the Get Transaction endpoint with the RID from Step 1:

curl -H "Authorization: Bearer $TOKEN" \
  "https://$HOSTNAME/api/v2/datasets/{datasetRid}/transactions/{transactionRid}"

Response:

{
  "rid": "ri.foundry.main.transaction.00000987-2a11-48f1-b19f-e3bf0482079c",
  "transactionType": "SNAPSHOT",
  "status": "COMMITTED",
  "createdTime": "2026-04-08T14:30:00Z",
  "closedTime": "2026-04-08T14:35:00Z"
}

The closedTime is your “last updated” timestamp, equivalent to what the Data Freshness widget displays.

Alternative: Get the full history in one call

The Get Branch Transaction History endpoint returns all transactions in reverse chronological order:

curl -H "Authorization: Bearer $TOKEN" \
  "https://$HOSTNAME/api/v2/datasets/{datasetRid}/branches/master/transactions?preview=true"

Response:

{
  "data": [
    {
      "rid": "ri.foundry.main.transaction.00000987-2a11-48f1-b19f-e3bf0482079c",
      "transactionType": "SNAPSHOT",
      "status": "COMMITTED",
      "createdTime": "2026-04-08T14:30:00Z",
      "closedTime": "2026-04-08T14:35:00Z"
    },
    {
      "rid": "ri.foundry.main.transaction.00000986-1b22-37e0-a08e-d2ae9371068b",
      "transactionType": "SNAPSHOT",
      "status": "COMMITTED",
      "createdTime": "2026-04-07T14:30:00Z",
      "closedTime": "2026-04-07T14:34:12Z"
    }
  ],
  "nextPageToken": "..."
}

The first entry’s closedTime gives you the latest refresh timestamp. This is the simplest single-call approach.

1 Like