Triggering an Action from Typescript-repository without bearer Token

We are trying to edit the ontology from a typescript repository.
The solutions we found so far:

  • using a webhook hitting foundrys API to perform an action
  • using Webrequests within the repository (untested but described here) to trigger an action

Both ways are using a bearer token which is hardcoded or needs the user to interact with Foundry to allow API access (every 24h).

Is there any cleaner way to acieve this? Best case without bearer token or user interaction.

Hi! The most supported way would be to create a third party application configured as a confidential client with client credentials authentication.

This will generate a service user and a client ID + secret pair. Using our OAuth token endpoint, you can retrieve a token for the service user in your function. Then you can use that bearer token in any subsequent API calls.

You will need to give the service user permission to do the ontology editing that you would like the action to accomplish.

Is there any particular requirement that it must be done via an API call?
If not, you could directly edit the ontology in your typescript function and then call the function from an action to apply the edits.
https://www.palantir.com/docs/foundry/action-types/function-actions-getting-started

I will look into that. Thank you.
We are asked to not create technical users on our environment, but maybe it is viable if its the only solution.

We are trying to orchestrate Ontology Edits. Therefore it is neccesary that a call to @Function can trigger different @OntologyEditFunctions.
Calling an OntolgoyEditFunction via a “normal function” does not yield an edit in the ontology. You have to call the action itself to get the change in an Ontology Object.
Or am I missing soemthing?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.