跳转至

Ontology SDK(Ontology SDK(本体SDK))

What is the difference between tokens from the Developer Console and those from third-party applications in the context of configuring a service user for group administration?

Developer Console tokens are always locked down to specific resource scopes and are not designed for group administration tasks. To configure a service user for group administration, one should create a third-party application via the Control Panel, ensuring the application is set to unrestricted to avoid project scoping restrictions. This will provide the appropriate token for the desired operations.

Timestamp: April 13, 2024

Can the Upload File endpoint in Foundry's API be used to upload a file from a local machine to a Foundry dataset?

Yes, the Upload File endpoint is for uploading a file to an existing Foundry dataset from a local machine.

Timestamp: March 21, 2024

Why might a user receive a 403 PermissionDenied error when trying to write rows to stream-data-proxy using a backend service/client credentials OSDK client, and how can this be resolved?

The user should use the control-panel to create an OAuth2 client, as the tokens from the Developer Console are only intended to work with the selected data scopes and may not include necessary permissions for raw datasets/streams.

Timestamp: March 21, 2024

Can an OSDK be pinned to Python 3.8 version to avoid conflicts with other packages that require Python 3.8?

No, the Python OSDK requires a Python version >=3.9 and <3.13. The other packages need to be upgraded to the supported Python versions.

Timestamp: March 8, 2024

Is there a C# SDK available to work with an API, and if not, what is the alternative solution?

No, there is no C# SDK currently available. The alternative solution is to export the OpenAPI and use an open-source generator like OpenAPI Generator ↗ to create a C# client. Additionally, Microsoft's OpenAPI.NET SDK ↗ can be used for the C# generator along with OAuth libraries for .NET ↗ for managing OAuth.

Timestamp: March 2, 2024

How can one use the Typescript SDK to perform a contains search on a string property?

The current Typescript SDK does not support arbitrary substring matching; it can only match on whole terms and prefixes.

Timestamp: March 6, 2024

Why does the /loadObjects API call not return properties using the inherited shared property API name?

The /loadObjects API call does not return properties using the inherited shared property API name because interfaces are treated as views. When you are looking at the concrete object type, you have the local properties, and when you are looking at it as an interface, you have the shared/interface properties. This design means that properties are contextually based on whether they are viewed as a part of the local concrete object or as part of an interface.

Timestamp: March 27, 2024

How can custom headers be added to each call in the Python OSDK?

Custom headers can be added to each call in the Python OSDK by updating the session headers of the FoundryClient instance as follows:

client = FoundryClient(auth=auth, hostname="<https://YOUR_ENROLLMENT.palantirfoundry.com>")
client._session._session.headers = client._session._session.headers.update({
"YOUR_API_KEY_HEADER": "key_goes_here"
})

MyObject = client.ontology.objects.MyObject
print(MyObject.take(1))

Timestamp: April 15, 2024

How can I resolve the Authorization error invalid_request Client authentication failed issue when trying to log into an OSDK application?

Ensure that the application is enabled for the right Organizations. The OSDK application needs to be enabled for the following Organizations:

  • The Organization the application belongs to after creation. If the creator has admin permissions on the Organization, this is enabled automatically.
  • Any other Organizations with users that intend to use the application. This must be done manually, and guest membership do not appl.

Timestamp: December 2, 2024


中文翻译


Ontology SDK(本体SDK)

在配置服务用户进行组管理时,开发者控制台(Developer Console)生成的令牌与第三方应用生成的令牌有何区别?

开发者控制台令牌始终限定在特定资源范围内,不适用于组管理任务。要配置服务用户进行组管理,应通过控制面板(Control Panel)创建第三方应用,并确保该应用设置为unrestricted(无限制)以避免项目范围限制。这将为所需操作提供合适的令牌。

时间戳: 2024年4月13日

Foundry API中的Upload File(上传文件)端点能否用于将本地文件上传到Foundry数据集?

可以,Upload File端点用于将本地文件上传到现有的Foundry数据集中。

时间戳: 2024年3月21日

用户在使用后端服务/客户端凭证OSDK客户端向stream-data-proxy写入行时,为何可能收到403 PermissionDenied错误?如何解决?

用户应使用控制面板创建OAuth2客户端,因为开发者控制台生成的令牌仅适用于所选数据范围,可能不包含原始数据集/流(raw datasets/streams)所需的权限。

时间戳: 2024年3月21日

OSDK能否固定使用Python 3.8版本,以避免与其他需要Python 3.8的包发生冲突?

不能。Python OSDK要求Python版本>=3.9且<3.13。其他包需要升级到支持的Python版本。

时间戳: 2024年3月8日

是否有C# SDK可用于与API交互?如果没有,替代方案是什么?

目前没有可用的C# SDK。替代方案是导出OpenAPI,并使用开源生成器(如OpenAPI Generator ↗)创建C#客户端。此外,可结合Microsoft的OpenAPI.NET SDK ↗用于C#生成器,以及.NET的OAuth库 ↗用于管理OAuth。

时间戳: 2024年3月2日

如何使用Typescript SDK对字符串属性执行contains(包含)搜索?

当前Typescript SDK不支持任意子字符串匹配,仅支持完整词条和前缀匹配。

时间戳: 2024年3月6日

为什么/loadObjects API调用无法使用继承的共享属性API名称返回属性?

/loadObjects API调用无法使用继承的共享属性API名称返回属性,因为接口(interfaces)被视为视图(views)。当查看具体对象类型时,显示的是本地属性;当将其作为接口查看时,显示的是共享/接口属性。这种设计意味着属性会根据其作为本地具体对象的一部分还是接口的一部分而具有上下文相关性。

时间戳: 2024年3月27日

如何在Python OSDK中为每次调用添加自定义标头?

可通过更新FoundryClient实例的会话标头来为Python OSDK的每次调用添加自定义标头,示例如下:

client = FoundryClient(auth=auth, hostname="<https://YOUR_ENROLLMENT.palantirfoundry.com>")
client._session._session.headers = client._session._session.headers.update({
"YOUR_API_KEY_HEADER": "key_goes_here"
})

MyObject = client.ontology.objects.MyObject
print(MyObject.take(1))

时间戳: 2024年4月15日

尝试登录OSDK应用时遇到Authorization error invalid_request Client authentication failed(授权错误:无效请求,客户端认证失败)错误,如何解决?

请确保该应用已为正确的组织(Organizations)启用。OSDK应用需要为以下组织启用:

  • 创建后应用所属的组织。如果创建者对该组织拥有管理员权限,则会自动启用。
  • 任何其他包含打算使用该应用的用户的组织。这需要手动启用,且来宾成员身份不适用。

时间戳: 2024年12月2日