webhookspalantir-foundryfoundry-data-connection

Overriding Safety for Webhook Multiple Calls in Palantir Foundry


I'm trying to create a webhook with multiple calls on a direct connection REST-API in Palantir. The first call is to get a token and then pass it to second call and post some data to the source.

But when i'm saving the webhook, its throwing an error that it is Invalid Rest Webhook Configuration.

Safe Error Message: Can have at most one safe call.

When i checked the documentation it mentioned that we should specify isHttpMethodSafe as true in the call. Where should i set this?


Solution

  • Short Answer: I don't think this is possible today when using a Direct Connection Source, but I do think it would work with an Agent-based Source.

    Details: That part of the documentation you reference is under the Rest API (Legacy) section. Using the docs on this page that describe the legacy version in more detail, I was able to create a Direct Connection source by starting from scratch with a Custom Connector. However, when I go to create a Webhook for that source, I see this message: "Webhooks are not yet supported for cloud-based runtimes". That makes me think that your only option is to create an Agent-based Source for this webhook.

    webhook not supported

    In my opinion, enabling isHttpMethodSafe in the current Direct Connection Rest API source would be a very reasonable feature request for you to make to your Palantir representative. After all, today if you open your network tab when you load a Webhook in Data Connection you can see that isHttpMethodSafe is set to null in the response delivering all the details about the Webhook you're looking at (look for a request to /ri.webhooks.main.webhook.<uuid>).