Cannot Bind Slate Variables to Foundry Function—Custom Endpoints Access Request

Hello, I’ve read through existing posts about calling Foundry Functions (including the thread about AIP Logic Function endpoints), but my situation has some key differences. I’m hoping to get clarity on whether Custom Endpoints access is required, or if there’s another supported pattern I’ve missed.

What I’ve Built

I have a Python Foundry Function deployed from a Functions repository (not AIP Logic). It’s published to the Ontology and Function Registry:

  • Function Name: market_metrics_kpi

  • Repository Type: Python Functions (not AIP Logic, not TypeScript)

  • Parameters: market (Optional string), quarter (Optional string), asset_type (Optional string)

  • Output: Custom dataclass MarketMetricsKPIResult containing:

    • avgVacancy (float)

    • sumAbsorption (int)

    • sumUnderConstruction (int)

    • marketCount (int)

    • chartData (object with market and vacancy arrays)

The Function queries Ontology objects (MarketMetric), applies filters based on parameters, and returns computed aggregations. It works perfectly—I’ve tested it with hardcoded values and it returns correct data.

The Goal

I’m building a Slate dashboard with three dropdown widgets bound to Slate variables:

  • selectedMarket

  • selectedQuarter

  • selectedAssetType

When a user selects a value, I need to pass that variable to the Function and display the updated KPIs in Text/Chart widgets.

What I’ve Tried (Complete Technical Details)

1. Slate Platform Tab → Foundry Function

Setup:

  • Added Function via Platform tab

  • Function appears correctly with input fields for all three parameters

  • Version 0.0.6 selected

Tests:

  • :white_check_mark: Input: "Austin" (literal JSON string) → Function executes, returns Austin data

  • :white_check_mark: Input: "" (empty string) → Function executes, returns all markets

  • :cross_mark: Input: {{selectedMarket}} → JSON validation error: "Expected property name or '}' in JSON"

  • :cross_mark: Input: selectedMarket (no braces/quotes) → JSON validation error

  • :cross_mark: Input: "{{selectedMarket}}" → Passes literal string "{{selectedMarket}}", not the variable value

Conclusion: The Foundry Function input fields in Slate’s Platform tab perform strict JSON validation and do not evaluate Handlebars expressions. Only literal JSON values are accepted.

2. Slate Queries (API Gateway)

Environment:

  • Query panel Source dropdown: Only “API Gateway” available

  • No “HTTP JSON” option

  • No “Webhook” option

  • No “Function Registry” option

Available Services (complete list):

  • admin v2

  • audit v2

  • connectivity v2

  • dataset v1

  • filesystem v2

  • ontologies v1 (only get Ontology and list ontologies methods—no object query methods)

  • orchestration v2

  • sqlqueries v2

Attempted Workaround:

  • Tried to find a service that could proxy HTTP requests to external endpoints

  • None of the available services accept custom URLs or Function RIDs

Conclusion: Cannot configure a Query to call the Function Registry endpoint or any external REST endpoint.

3. Direct REST Endpoint Test

Based on the endpoint pattern shared in the AIP Logic Function thread (/function-registry/v1/functions/{rid}/invoke):

Test Command (PowerShell):

powershell

Invoke-RestMethod -Uri "https://[enrollment]/function-registry/v1/functions/[function-rid]/invoke" -Method POST -Headers $headers -Body '{"market": "Austin"}'

Result:

text

Invoke-RestMethod : Error: HTTP method POST is not supported by this URL

Also tested with curl.exe:

text

<html><head><title>Error</title></head><body>HTTP method POST is not supported by this URL</body></html>

Conclusion: The /function-registry/v1/functions/{rid}/invoke endpoint pattern is not exposed. Unlike the community user’s experience, this endpoint does not accept POST requests.

4. Developer Console

Setup:

  • Created application with Ontology SDK resources

  • Added MarketMetric object type successfully

  • SDK generation works

Issue:

  • Navigated to Functions section → “Add function”

  • Search for market_metrics_kpi returns “No results”

  • The UI displays message: “TS v1 uses the @Query decorator, TS v2 uses an exported config object… Make sure you tagged the latest version”

  • Appears Developer Console only surfaces TypeScript Functions/Queries, not Python Functions from a Functions repository

Conclusion: Python Functions deployed from a Functions repository do not appear in Developer Console’s Ontology SDK resources.

5. Code Sandbox Widget with State

Attempted Pattern (from Slate documentation):

json

// Interactions tab state
{
  "avgVacancy": "{{s_filteredMarketMetrics.aggregations.avgVacancy.0}}"
}

Result:

  • JSON validation error when Handlebars included

  • Escaping braces ({ { ... } }) saves but passes literal string instead of evaluating

Conclusion: Same JSON validation issue—Handlebars cannot be placed in any JSON field in Slate widgets.

6. Dataset Sync + SQL Queries

Attempted:

  • Checked Datasets panel for sync option

  • Hover message: “Dataset syncs are only available when a Foundry type data source is configured”

  • No Foundry-type data source exists in Query panel

Conclusion: Dataset Sync not available in this environment.

7. Custom Endpoints Application

  • :cross_mark: Not available in app switcher

  • Documentation states: “The Custom Endpoints application is in the beta phase of development and may not be available on your enrollment. Contact Palantir Support to request access.”

Key Differences from Previous Community Posts

Previous Posts My Situation
AIP Logic Function Python Function from Functions repository
TypeScript Query/Function Python Function
Support-provided endpoint worked Endpoint returns “POST not supported”
Custom Endpoints available Custom Endpoints not in app switcher
HTTP JSON queries available Only API Gateway services available
Dataset Sync available No Foundry data source configured

Summary of Blockers

Method Blocker
Slate Platform Tab → Function inputs JSON validator rejects Handlebars
Slate Queries → Function call No Function service or HTTP JSON option
Direct REST endpoint POST method not supported
Developer Console → OSDK Python Functions don’t appear
Code Sandbox state binding JSON validator rejects Handlebars
Dataset Sync + SQL No Foundry data source
Custom Endpoints Not in app switcher

My Questions

  1. Is Custom Endpoints the only supported way to expose a Python Foundry Function as an HTTP endpoint that can accept dynamic parameters from Slate variables?

  2. What is the correct channel to request Custom Endpoints access? The documentation says “Contact Palantir Support”—should I use the in-app feedback mechanism, the developer community, or is there a specific process?

  3. Given the complete list of services available in API Gateway (ontologies v1 with only metadata methods), is there ANY way to call a Function Registry endpoint or proxy an HTTP request?

  4. Why does the /function-registry/v1/functions/{rid}/invoke endpoint return “POST not supported” when it worked for the AIP Logic Function user? Is this endpoint only enabled for specific Function types or enrollments?

  5. Is there any alternative pattern I haven’t discovered? For example:

    • Can a Function be registered as an Action on an Object Type and called that way?

    • Can the Ontology SDK be used within Slate (not external app) to call Functions?

    • Is there a way to configure API Gateway to include additional services?

Thank you for any guidance. I’m happy to provide additional technical details if needed.

  1. Is Custom Endpoints the only supported way to expose a Python Foundry Function as an HTTP endpoint that can accept dynamic parameters from Slate variables?

The correct functionality you are looking to use is indeed the first option you tried: Slate Platform Tab → Foundry Function

All Foundry Function inputs in the Slate Platform tab supports Handlebars to connect Slate logic to Foundry Functions. I’ve also independently verified that Python Foundry Functions should work as expected. The correct format for a String input from within Slate is "{{selectedMarket}}"

Please verify that your Handlebar is referencing the expected component and substate. An easy way to quickly test Handlebar values is to create a Slate Function and return {{component}}; and see what value is being returned.

  1. What is the correct channel to request Custom Endpoints access?

You’ll want to use the Contact Support option under the Support button above your profile picture in the Workspace sidebar. However, note that access to internal Palantir endpoints is generally restricted in favor of API Gateway, especially for situations like this where functionality is available without direct endpoint access.

  1. Given the complete list of services available in API Gateway (ontologies v1 with only metadata methods), is there ANY way to call a Function Registry endpoint or proxy an HTTP request?

The functionality available via API Gateway is viewable in the relevant docs. However, in this instance, you may find better functionality by using OSDK through Slate Functions.

  1. Why does the /function-registry/v1/functions/{rid}/invoke endpoint return “POST not supported” when it worked for the AIP Logic Function user?

Direct access to Palantir endpoints is generally not supported.

  1. Is there any alternative pattern I haven’t discovered?

Your first instinct was correct and your attempt may have just had a syntax misconfiguration. I’d recommend verifying the value you’re receiving through the Handlebar within Slate before jumping to debugging the Foundry Function itself. If you can’t get it working after some debugging, I’d recommend filing a Support ticket to help get a closer look.

Thanks big dawg, appreciate you confirming the syntax. I’ll file a Support ticket and have them take a look. Cheers