palantir-foundrypalantir-foundry-api

Using a Code Repo to call a Webhook created in Palantir Foundry


I've used Foundry's default REST API connector to build a connection to an external API with 3 parameters. Testing the code works fine using the webhooks testing options. Now I want to call the webhook and return the data but I'm at a loss for any method to do that in Foundry. The one thing I've been able to find is a note in the Webhook API Name that says you can use that name to reference it in a code repo but I can't find any examples and my searching through the methods available in code (Python Code Repo) haven't pointed to anything either.

Is connecting to a REST API webhook via the API name using code even possible in a code repo? And if not, what's the point of the REST API connector? It seems pretty powerful but to have it dead end into a webhook and not be able to do anything with it seems like a significant functionality miss for Foundry.


Solution

  • You have a few ways to integrate with an API from Foundry:

    You can't call a web-hook from a pipeline or from a function as of today.

    There are more ways, but shouldn't be relevant for your case (legacy methods, etc.)