I find very useful the views, but it seems that is not possible to create them through code, it would be very interesting to provide this feature to generate programmatically this views from code repositories
Hello there!
This was one of the workflows that I was looking for within one of my projects and managed to do it back then without official API support, but good news - this is now officially supported. The Foundry Platform SDK exposes a full set of REST endpoints for programmatically creating and managing Views under /api/v2/datasets/views/:
Create View — POST /api/v2/datasets/views/ (datasetsCreateView)
Get View metadata — GET /api/v2/datasets/views/{viewDatasetRid} (datasetsGetView)
Add backing datasets — POST …/views/{viewDatasetRid}/backingDatasets/add (datasetsAddBackingDatasets) — duplicates on the same dataset RID + branch are ignored
Replace backing datasets — PUT …/views/{viewDatasetRid}/backingDatasets (datasetsReplaceBackingDatasets)
Remove backing datasets — POST …/views/{viewDatasetRid}/backingDatasets/remove (datasetsRemoveBackingDatasets)
Add a primary key — POST …/views/{viewDatasetRid}/primaryKey (datasetsAddPrimaryKey)
You can call these directly via the Platform REST APIs or via the official Foundry SDKs, which expose the same operations under the datasets service. This lets you fully generate and evolve views from code (e.g. from a code repository).
All endpoints and documentation you can find here: https://www.palantir.com/docs/foundry/api/v2/datasets-v2-resources/views/view-basics/