REST

Foundry can integrate with external systems that expose a REST (representational state transfer) API. You may need to use a different approach depending on whether you are syncing, exporting, or interactively calling REST APIs. On this page you can find several connection options for secure and efficient integration with REST APIs.

REST API source

The REST API source may be used for workflows requiring interactive HTTP requests to external systems directly from Foundry applications via Actions. For example, you can create a Workshop application with a button that uses a webhook to calls a REST endpoint when clicked, connecting that application to existing workflows and source systems.

Webhooks to HTTP endpoints should use the REST API source type in Data Connection. You will need to configure the base URL, authentication, and an optional port.

OptionRequiredDescription
DomainYesAt least one domain must be specified.
AuthenticationYesFor each domain, the authentication must be specified. Options include None, Basic, Bearer Token, and API Key.
PortNoA port may be optionally specified. By default, all REST webhooks will use HTTPS on port 443. Ports other than 443 are only supported when using an agent runtime.
Request OptionsNoWhen selecting API Key authentication, you may choose whether you want to pass the API Key as a query param or header in the webhook requests.

The example configuration below shows how to configure a connection to https://my-domain.com using bearer token authentication.

New webhook

The REST API source type does not support other capabilities such as syncs or exports. The legacy magritte-rest-v2 source type is no longer recommended for Webhooks workflows. Syncs and exports to REST APIs should use external transforms.

Learn more about Webhooks in Foundry.

External transforms in Code Repositories

Use a Python transform repository to configure network egress and credentials and write logic to reach out to APIs. For example, you can use external transforms to query an API to process Foundry dataset metadata or interact with an API service to output images to a dataset. External transforms is the recommended way to configure syncs and exports that require calling REST APIs.

External transforms do not currently support agent runtimes to communicate with on-premise systems. The legacy magritte-rest-v2 source type may be used for on-premise REST API calls, but it is no longer recommended for direct connections. If you need to call REST APIs that are behind a firewall, contact your Palantir representative for more information.

Learn more about calling APIs with external transforms.

Foundry REST API

For cases where you want to build applications on top of the Foundry platform, use the Foundry REST API. The Foundry API uses the OAuth 2.0 protocol for authentication, primarily uses JSON requests and responses, and provides support for Ontology and Modeling resources.

Learn more about the Foundry API.