GET /api/v1/forward/identities/{identity_id}/templates
返回该 Identity 下 active 或 archived 的 Identity Config 记录。
请求头
| Header | 是否必填 | 说明 |
|---|---|---|
| Authorization | 是 | Bearer <PAT> |
路径参数
| 参数 | 类型 | 是否必填 | 说明 |
|---|---|---|---|
| identity_id | string | 是 | Forward Identity ID。 |
查询参数
| 参数 | 类型 | 是否必填 | 默认值 | 说明 |
|---|---|---|---|---|
| template_id | string | 否 | - | 按 Forward Template ID 过滤。 |
| status | string | 否 | active | 按 active 或 archived 过滤。 |
| limit | integer | 否 | 20 | 分页大小,最大 100。 |
| after_id | string | 否 | - | 来自上一页响应 last_id 的向后游标。 |
| before_id | string | 否 | - | 来自上一页响应 first_id 的向前游标。 |
示例请求
示例响应
HTTP 200 OK响应字段
| 字段 | 类型 | 说明 |
|---|---|---|
| data | array | 当前页的 Config 摘要。 |
| first_id | string | null | 当前页第一条 Config ID。 |
| last_id | string | null | 当前页最后一条 Config ID。 |
| has_more | boolean | 是否还有更多记录。 |
错误
| HTTP | Type | Code | 触发条件 |
|---|---|---|---|
| 400 | invalid_request_error | - | 分页参数不合法。 |
| 404 | not_found_error | - | Identity 不存在或当前调用方不可见。 |
| 401 | authentication_error | authentication_required | PAT 无效或已过期。 |
注意事项
- 分页游标来自 Identity Config ID,不是 Template ID。
- 同一个 Identity + Template 下最多只有一条 active Config。