🔑 认证配置 已配置
GET /v2/sites

获取当前用户有权限访问的所有站点列表

请求参数

参数名 类型 必填 描述
page integer 页码,从 1 开始
pageSize integer 每页数量,默认 20
status string 站点状态筛选

请求 URL

GET https://api.franklinwh.com/v2/sites?page=1&pageSize=20

响应结果

200 OK 128ms
// 响应 Headers Content-Type: application/json X-Request-Id: req_abc123 X-RateLimit-Remaining: 998 // 响应 Body { "success": true, "data": { "items": [ { "id": "site_001", "name": "Home Energy System", "address": "123 Main St, San Jose, CA", "timezone": "America/Los_Angeles", "status": "online", "deviceCount": 3, "createdAt": "2025-01-15T08:00:00Z" }, { "id": "site_002", "name": "Office Building", "address": "456 Tech Blvd, Palo Alto, CA", "timezone": "America/Los_Angeles", "status": "online", "deviceCount": 5, "createdAt": "2025-02-20T10:30:00Z" } ], "pagination": { "page": 1, "pageSize": 20, "total": 2, "totalPages": 1 } } }
响应状态码
状态码 描述 示例
200 请求成功 返回站点列表数据
400 请求参数错误 page 参数必须为正整数
401 认证失败 API Key 无效或已过期
403 权限不足 无权访问该资源
429 请求过于频繁 已超出速率限制
500 服务器错误 内部服务异常