--- title: "Stations API 指南" slug: "how-to-use-the-stations-api" updated: 2026-10-22T14:33:01Z published: 2026-10-22T14:33:01Z canonical: "support.tulip.co/how-to-use-the-stations-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. # Stations API 指南 *配置并使用 Tulip API,即可从其他系统与 Tulip 进行交互。* Advanced Content This article assumes previous experience with APIs. Tulip 通过连接器(Connectors)与其他系统的 API 进行交互。借助连接器,Tulip 应用可以发起 HTTP 或 SQL 查询。 在其他情况下,您可能希望允许外部系统查询仅存在于 Tulip 中的数据。通过 Tulip API,外部系统可以与 Tulip 进行通信。本文将详细介绍 Tulip API 的配置和测试流程。 Tulip API 通过多种方式有助于将这些外部系统与 Tulip 集成。该 API 目前仅支持 Tulip 表,这可能包括使用新信息更新表记录、创建表,或获取表中记录的数量。 ## Stations API 功能 Stations API 可帮助您快速管理和接入新站点。其主要功能包括创建、列出和修改站点、站点组以及接口(原称显示设备)。[点击此处](https://support.tulip.co/apidocs)了解更多。 例如,您可以编写一个脚本,每当接入新用户时,该脚本会自动发送一个链接以设置新的接口。 ## 操作指南 Feature rename Prior to r383, Service Accounts were called "API Tokens". ## 配置 Stations API 请参阅本文了解如何设置服务账户。 NOTE If you have a Service Account already set up, you may use that API Key and Secret 1. 在**“账户设置**”中,选择**“Tulip API**”选项卡。 2. 点击**“创建服务账户**”。 3. 为您的服务账户命名。 4. 在“权限范围”中,选择`“stations: read`”和`“stations: write`”: ![Stations API 1](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/Stations%20API%201.png) NOTE Make sure to save the Service Account information for the API Key, Secret, and Authorization Header. 1. 点击**“保存**”。 ## 使用 Stations API 设置好 Stations API 后,您可以创建一个电台。本示例使用 Postman 进行创建操作。 1. 将您的 API 端点添加到 POST 请求中。![Stations API 2](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/Stations%20API%202.png) 2. 在“标头”下,添加“Auth”标头。 ![Stations API 3](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/Stations%20API%203.png) 1. 在“请求正文”中,将请求格式设置为包含 JSON 对象。此请求的通用格式如下: ![Stations API 4](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/Stations%20API%204.png) 构建请求时,请包含工作区。**示例:**`<您的实例名称>`.tulip.co/api/stations/v1/w/1/stations 此示例调用了 stations 端点。如果您没有工作区,则应将其设置为 1。 1. 点击**“发送**”执行请求,您将收到 200 状态码,表示请求成功。 要验证结果,请转到**“工位”**页面中的**“车间”**选项卡,确认该工位已创建。 ![Stations API 5](https://cdn.document360.io/7c6ff534-cad3-4fc8-9583-912c4016362f/Images/Documentation/Stations%20API%205.png)