API 参考
提供 REST API 与 GraphQL API,所有接口均使用 HTTPS,返回标准 JSON 格式。
认证
所有 API 请求需在 Header 中携带 API 密钥:
HTTP Header
Authorization: Bearer YOUR_API_KEY Content-Type: application/json
基础 URL
Endpoint
https://api.example.com/v3
数据管道 API
| 方法 | 路径 | 描述 |
|---|---|---|
| GET | /pipelines | 获取所有管道列表 |
| POST | /pipelines | 创建新管道 |
| GET | /pipelines/{id} | 获取管道详情 |
| PUT | /pipelines/{id} | 更新管道配置 |
| DELETE | /pipelines/{id} | 删除管道 |
请求示例(Python)
Python
import requests
api_key = "dn_live_xxxxxxxxxxxxxxxx"
headers = {"Authorization": f"Bearer {api_key}"}
resp = requests.get(
"https://api.example.com/v3/pipelines",
headers=headers
)
print(resp.json())
响应格式
JSON Response
{
"data": [
{
"id": "pipe_abc123",
"name": "订单实时分析",
"status": "running",
"created_at": "2025-01-15T08:30:00Z"
}
],
"meta": { "total": 1, "page": 1 }
}
📘 完整 API 规范支持 OpenAPI 3.0 格式,可直接在 Postman 或 Apifox 中导入使用。