GET /api/v1/forward/templates
返回 Template 基线列表;归档 Template 仅在按状态请求时返回。
请求头
| Header | 是否必填 | 说明 |
|---|---|---|
| Authorization | 是 | Bearer <PAT> |
查询参数
| 参数 | 类型 | 是否必填 | 默认值 | 说明 |
|---|---|---|---|---|
| status | string | 否 | - | 按 active 或 archived 过滤。 |
| limit | integer | 否 | 20 | 分页大小,最大 100。 |
| after_id | string | 否 | - | 向后翻页游标,不能与 before_id 同用。 |
| before_id | string | 否 | - | 向前翻页游标,不能与 after_id 同用。 |
示例请求
示例响应
HTTP 200 OK响应字段
| 字段 | 类型 | 说明 |
|---|---|---|
| data | array | 当前页的 Template 摘要列表。 |
| first_id | string | null | 当前页第一条记录 ID。 |
| last_id | string | null | 当前页最后一条记录 ID。 |
| has_more | boolean | 是否还有更多记录。 |
错误
| HTTP | Type | Code | 触发条件 |
|---|---|---|---|
| 400 | invalid_request_error | - | 分页参数不合法或 limit 超过上限。 |
| 401 | authentication_error | authentication_required | PAT 无效或已过期。 |
| 403 | permission_error | - | 当前调用方无权访问该资源。 |
注意事项
- 结果只包含当前鉴权账号可见的 Template。
after_id和before_id不能同时传入。