--- title: "How to Use the Table API" slug: "how-to-use-the-table-api" updated: 2025-01-08T14:13:19Z published: 2025-01-08T14:13:19Z canonical: "support.tulip.co/how-to-use-the-table-api" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.tulip.co/llms.txt > Use this file to discover all available pages before exploring further. # 如何使用表格 API *设置并使用 Tulip API,以便从其他系统与 Tulip 进行交互。* {{snippet.链接到 API 文档}) Advanced Content This article assumes previous experience with APIs. Tulip 通过连接器与许多其他系统的 API 进行交互。使用[连接器](https://support.tulip.co/docs/what-are-connectors),Tulip 应用程序可以启动 HTTP 或 SQL 查询。 在其他情况下,您可能希望允许外部系统查询仅存在于 Tulip 中的数据。可以使用 Tulip API 从外部系统与 Tulip 通信。本文将介绍 Tulip API 的设置和测试。 Tulip API 对于通过 Tulip[表将](https://support.tulip.co/r230/docs/an-overview-of-tables)这些外部系统与 Tulip 集成非常有用。这包括用新信息更新表记录、创建表格或获取表中的记录数。 ## 示例 以下示例介绍了向 Tulip API 提出请求的过程。这些示例使用 Postman 向 Tulip 发起请求。 ### 获取表名和信息 此 GET 请求允许外部系统检索 Tulip 实例中所有表的 ID 和列信息。这种方法可以用来查找感兴趣的表,以便设置 POST 请求。 在 Postman 中,将授权设置为**Basic Auth**,并输入**API** **密钥**和**秘密**。 ![](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/How%20to%20Use%20the%20Table%20API_206188425.png) 现在,请求需要发送到正确的地方。在 Tulip 中,从 API 文档中找到你想要的请求。在本例中,请求是获取所有表信息。 ![](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/How%20to%20Use%20the%20Table%20API_206188941.png) 为了获取请求 URL,请运行 "**执行**"按钮,并检查 "请求信息"。 ![](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/How%20to%20Use%20the%20Table%20API_206477530.png) 然后,就可以将此请求 URL 用作服务器 URL,以处理 Postman 发送的 GET 请求。 ![](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/How%20to%20Use%20the%20Table%20API_206477936.png) 单击 "**发送"**,请求将返回表中的所有信息。 ![](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/How%20to%20Use%20the%20Table%20API_206189542.png) ### 创建表格记录 使用 POST 和上面的表 ID,可以从外部系统创建表记录。授权和标题将保持不变,但请求 URL 会有些不同。 首先,确定要创建记录的表。请求 URL 将始终遵循以下结构: NOTE If you are using a global API key, you need to specify the workspace. If your API key is workspaced scoped, it is optional. *https://(yourinstancenamehere).tulip.co/api/v3/w/(workspace)/tables/(TableID)/records* ![](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/How%20to%20Use%20the%20Table%20API_206478239.png) 输入后,请求还需要一个正文来正确处理 POST。列模式已在上文的测试部分给出,并可在 API 文档中找到。唯一完全必要的列是 ID 列。其他未添加的列在创建时将以空值存储在表记录中。添加以下内容作为请求的正文。 ![](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/How%20to%20Use%20the%20Table%20API_206191458.png) 提交时,Postman 会验证记录是否已创建。 ![](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/How%20to%20Use%20the%20Table%20API_206191590.png) --- 找到您要找的东西了吗? 您还可以前往[community.tulip.co](https://community.tulip.co/?utm_source=intercom&utm_medium=article-link&utm_campaign=all)发布您的问题,或查看其他人是否遇到过类似问题!