Programmatic Ontology Management in Palantir Foundry: Alternatives to GUI-based Approach?

The Palantir Foundry ontology appears to be primarily managed through the graphical Ontology Manager interface. Are there any Infrastructure-as-Code (IaC) approaches or APIs available for programmatically defining and managing the ontology structure? I’m looking for methods to automate ontology creation and updates with less reliance on the GUI. Any insights into more code-centric ways to manage the ontology would be appreciated

Hey! Unfortunately, this feature is not possible yet. The GUI is the only supported way at the moment :frowning_face:

Hi @nick_simpson - I am not sure what do you mean as Infrastructure-as-Code (IaC) and I am going to assume you are scoping just one organization.

The APIs available for programmatically defining and managing the ontology structure can be reverse-engineered by the devTools and then consolidated into Postman collections.

There’s also the GitHub - palantir/foundry-platform-python: The official Python library for the Foundry API. This effort is at embryonic stage and contains some ontology endpoints. If expanded and integrated with the OSDK developer console, could potentially solve your problem.

Hi @HugoRodrigues

Thanks for taking the time to respond.

I am not sure what do you mean as Infrastructure-as-Code (IaC)

The IaC (declarative) approach defines the desired state and the system executes what needs to happen to achieve that desired state.

Please see this post relating to IaC for the Ontology.

Thanks,
Nick

@nick_simpson, Have a look at OSDK if you haven’t already. “The Ontology Software Development Kit (SDK) allows you to access the full power of the Ontology directly from your development environment.” https://www.palantir.com/docs/foundry/ontology-sdk/overview/

@nick_simpson I hear this is being worked on, almost certainly not stable but you can peek here https://github.com/palantir/osdk-ts/tree/main/packages/maker

Hi @bwolcott @bobbyfidz The OSDK looks interesting but ideally I would like to use a declarative approach which defines the desired state and the system executes what needs to happen to achieve that desired state.

Please see this post relating to IaC for the Ontology.

Thanks

Hey @nick_simpson we are working on exactly what you described. @bobbyfidz found our package for defining ontologies in typescript :upside_down_face:. This package is our first step in enabling these kinds of declarative code → ontology workflows.

Right now it is early days but it should roughly enable you to define an ontology in code, and then in CI/CD take that definition and push to to foundry as a marketplace product. You can then install the marketplace product (which creates/updates the ontology) either manually or in CI/CD.

3 Likes

Thanks @ aparson. Are there any tutorials etc for using this? Appreciate its early days so probably not yet.

Currently there is no way for you to use this tooling. The infrastructure is still under development and testing.

1 Like