1

I'm trying to create a Slate application which uses the compass search endpoint.

I've managed to connect to the endpoint trough postman just fine using <host>/foundry-search/api/compass/v0/search, and get the desired results.

However in Slate I'm unable to get a 200 response with the same query, using search in the path, example:

{
    "path": "search",
    "method": "POST",
    "bodyJson": {
        "query": {},
        "limit": 5
    },
    "extractors": {
        "results": "$"
    },
    "headers": {
        "Content-Type": "application/json",
        "Content-Length": 64
    }
}

Other compass endpoints work fine, its just the search one I cant manage to work out. For this query in particular I get 500, with errorCode INTERNAL. Is there any magic trick one needs to do for search?

igyate
  • 68
  • 6
  • 1
    It may be worth to hit your internal support channels since there isn't anything in the public docs about it. Once there is a public api documentation of these endpoints I'll return with an answer. – fmsf Sep 27 '22 at 16:11

1 Answers1

1

From the layout of the request, it looks like the Compass datasource being queried has been configured with an HttpJson type. It's generally not recommended to query Foundry services through the HttpJson configuration as certain endpoints may only be considered internally supported, and liable to change at any time (which could possibly break your Slate application without warning).

Slate datasources that point to Foundry services should be configured as a ServiceApi type as they provide an easy editor layout that displays available supported endpoints, endpoint parameter inputs (with Handlebar support), and the expected parameter types.

Please contact your Palantir rep and ask for the Compass service to be configured as a ServiceApi with the search Compass endpoint enabled. Doing so will allow you to query any supported Compass endpoint without needing to worry about correctly formatting the HttpJson structure, or guessing which endpoint parameters are required.

NeonWolf
  • 21
  • 5