How to add tag to a dataset using typescript function which will back an ontology action type


I would like to know how use typescript function to add a tag to an existing dataset, this typescript function will back an ontology action type.
my first intuition is not able to, if no, is there a hack around it? or we need to create third party app to call the api? what is the api endpoint for this addition of tag to dataset ?

You can achieve this with an external function that calls a Webhook which in turn calls the appropriate API endpoint, authenticating with 3rd Party Application client credentials. You can also skip the external function (just calling the Webhook directly from your Action).

Unfortunately, the public API does not yet expose an endpoint for adding or removing tags on resources, so you would need to use a legacy API endpoint (which brings the risk of future unannounced breaking changes). You should be able to find an appropriate endpoint under “Custom documentation” → “Legacy API documentation” inside your Foundry environment, at https://your-subdomain.palantirfoundry.com/workspace/documentation/developer/api/compass/services/CompassTagsService .

2 Likes