按筛选条件分页列出 Forward Session。
请求头
|
Header |
是否必填 |
说明 |
|
Authorization |
是 |
|
查询参数
|
参数 |
类型 |
是否必填 |
默认值 |
说明 |
|
|
string或array |
否 |
- |
按一个或多个 Identity ID 过滤,支持逗号分隔。 |
|
|
string |
否 |
- |
按 Forward Template ID 过滤。 |
|
|
string |
否 |
- |
按 |
|
|
string |
否 |
- |
创建时间严格大于该 RFC 3339 时间。 |
|
|
string |
否 |
- |
创建时间大于等于该 RFC 3339 时间。 |
|
|
string |
否 |
- |
创建时间严格小于该 RFC 3339 时间。 |
|
|
string |
否 |
- |
创建时间小于等于该 RFC 3339 时间。 |
|
|
string |
否 |
- |
更新时间严格大于该 RFC 3339 时间。 |
|
|
string |
否 |
- |
更新时间大于等于该 RFC 3339 时间。 |
|
|
string |
否 |
- |
更新时间严格小于该 RFC 3339 时间。 |
|
|
string |
否 |
- |
更新时间小于等于该 RFC 3339 时间。 |
|
|
integer |
否 |
20 |
分页大小,最大 100。 |
|
|
string |
否 |
- |
向后翻页游标。 |
|
|
string |
否 |
- |
向前翻页游标。 |
|
|
string |
否 |
desc |
排序方向: |
|
|
boolean |
否 |
false |
是否包含已归档 Session。 |
示例请求
curl -s -X GET 'https://api.qoder.com.cn/api/v1/forward/sessions' \
-H "Authorization: Bearer $QODER_PAT"
示例响应
HTTP 200 OK
{
"data": [
{
"id": "sess_xxx",
"type": "session",
"identity_id": "idn_xxx",
"template": {
"id": "tmpl_support",
"type": "template",
"name": "Support assistant",
"model": "ultimate",
"version": 3
},
"source_type": "im",
"status": "idle",
"title": "Customer support session",
"incremental_streaming_enabled": true,
"metadata": {
"source": "dingtalk"
},
"config": {
"environment_variables": {
"API_KEY": "sk-xxx"
}
},
"stats": {
"active_seconds": 30,
"duration_seconds": 3600
},
"usage": {
"credits": 12.5
},
"created_at": "2026-06-22T10:00:00Z",
"updated_at": "2026-06-22T11:00:00Z"
}
],
"first_id": "sess_xxx",
"last_id": "sess_xxx",
"has_more": false
}
响应字段
|
字段 |
类型 |
说明 |
|
|
array |
当前页的 Session 对象。 |
|
|
string|null |
当前页第一条记录 ID。 |
|
|
string|null |
当前页最后一条记录 ID。 |
|
|
boolean |
是否还有更多记录。 |
错误
|
HTTP |
Type |
Code |
触发条件 |
|
400 |
|
|
时间筛选范围不合法。 |
|
400 |
|
|
分页参数不合法。 |
|
401 |
|
|
PAT 无效或已过期。 |
备注
-
after_id和before_id不能同时传入。 -
当前设计不支持按
status筛选。 -
Credits 模块未启用时可省略
usage.credits。