Endpoint
复制
GET /api/v1/pulse/providers
Overview
获取系统中所有可用健康设备 providers 的信息,包括配置状态与能力描述。Request
复制
curl http://localhost:18080/api/v1/pulse/providers
Response
复制
{
"providers": [
{
"slug": "theta_garmin",
"name": "Garmin",
"description": "Garmin health data integration via OAuth",
"logo": "https://static.thetahealth.ai/res/garmin.png",
"supported": true,
"auth_type": "oauth1",
"status": "available"
},
{
"slug": "theta_whoop",
"name": "Whoop",
"description": "Whoop health data integration via OAuth",
"logo": "https://static.thetahealth.ai/res/whoop.png",
"supported": true,
"auth_type": "oauth2",
"status": "available"
}
]
}
Response Fields
provider objects 数组
Example Usage
复制
import aiohttp
async def list_providers():
async with aiohttp.ClientSession() as session:
async with session.get("http://localhost:18080/api/v1/pulse/providers") as resp:
providers = await resp.json()
return providers["providers"]
providers = await list_providers()
for provider in providers:
print(f"{provider['name']}: {provider['status']}")
在链接 provider 或查询 provider 相关数据时,请使用
slug 字段。