跳转至

Custom Endpoints(自定义端点)

:::callout{theme="neutral" title="Beta"} The Custom Endpoints application is in the beta phase of development and may not be available on your enrollment. Functionality may change during active development. Contact Palantir Support to request access to Custom Endpoints. :::

The Custom Endpoints application enables developers to configure and deploy user-defined API endpoints with their own URL patterns. Users can also configure request and response shapes and endpoint specifications, while leveraging Foundry's back-end capabilities. Custom endpoints are backed by the ontology through actions and functions.

The Custom Endpoints application displaying deployed endpoints.

The Custom Endpoints application provides managed infrastructure for treating Foundry as a back-end service. Developers can define endpoint metadata describing how HTTP requests map to ontology operations, eliminating the need for external middleware services. This enables organizations to expose Foundry data through APIs that conform to their existing enterprise standards and specifications.

Below is an example of a standard Foundry API call:

POST https://{your enrollment}.palantirfoundry.com/api/v2/ontologies/{ontology}/queries/{queryApiName}/execute
Body: {"parameters": {"form_id": 62536, "section_id": 5}}
Response: {"code": 200, "data": {"value": ["Val1", "Val2", "Val3"]}}

Below is the same API call, customized to accommodate existing organizational standards and remapped to a GET request:

GET https://subdomain.domain.com/myApi/form/{form_id}/section/{section_id}
Response: {"code": 200, "data": {"section1": "Val1", "section2": "Val2", "section3": "Val3"}}

Some examples of custom endpoint use cases include creating a unified API that combines Foundry data with third-party services, or a legacy-compatible endpoint that matches existing enterprise URL patterns and response formats.


中文翻译

自定义端点

:::callout{theme="neutral" title="Beta"} 自定义端点(Custom Endpoints)应用程序目前处于beta开发阶段,可能未在您的环境中启用。在活跃开发期间,功能可能会发生变化。请联系Palantir支持团队申请访问自定义端点。 :::

自定义端点(Custom Endpoints)应用程序使开发者能够配置和部署具有自定义URL模式的用户定义API端点。用户还可以配置请求和响应格式以及端点规范,同时利用Foundry的后端能力。自定义端点通过操作(actions)和函数(functions)由本体(ontology)提供支持。

显示已部署端点的自定义端点应用程序。

自定义端点应用程序提供了将Foundry作为后端服务使用的托管基础设施。开发者可以定义描述HTTP请求如何映射到本体操作的端点元数据,从而无需外部中间件服务。这使得组织能够通过符合其现有企业标准和规范的API来暴露Foundry数据。

以下是标准Foundry API调用的示例:

POST https://{your enrollment}.palantirfoundry.com/api/v2/ontologies/{ontology}/queries/{queryApiName}/execute
Body: {"parameters": {"form_id": 62536, "section_id": 5}}
Response: {"code": 200, "data": {"value": ["Val1", "Val2", "Val3"]}}

以下是同一API调用经过自定义以适配现有组织标准并重新映射为GET请求的示例:

GET https://subdomain.domain.com/myApi/form/{form_id}/section/{section_id}
Response: {"code": 200, "data": {"section1": "Val1", "section2": "Val2", "section3": "Val3"}}

自定义端点的一些用例包括:创建将Foundry数据与第三方服务相结合的统一API,或构建与现有企业URL模式和响应格式相匹配的兼容旧系统的端点。