cURL
curl --request POST \ --url https://api.pathors.com/project/{projectId}/session/search \ --header 'Authorization: <authorization>' \ --header 'Content-Type: application/json' \ --data ' { "search_string": "<string>", "limit": 123, "offset": 123 } '
{ "results": [ { "sessionId": "<string>", "data": {}, "createdAt": "<string>", "updatedAt": "<string>" } ], "pagination": { "limit": 123, "offset": 123, "total": 123 } }
通过会话数据中的内容匹配来搜索会话,包括变量和消息。
POST /project/{projectId}/session/search
sk_
Bearer {your-api-key}
Show 会话对象
Show 分页对象
curl -X POST https://api.pathors.com/project/{projectId}/session/search \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "search_string": "张三", "limit": 10, "offset": 0 }'
{ "results": [ { "sessionId": "user-123-session-456", "data": { "variables": { "userName": "张三", "userRole": "admin" }, "messages": [ { "role": "user", "content": "你好" }, { "role": "assistant", "content": "您好,张三!有什么可以帮助您的吗?" } ] }, "createdAt": "2024-01-15T10:30:00.000Z", "updatedAt": "2024-01-15T10:35:00.000Z" }, { "sessionId": "user-456-session-789", "data": { "variables": { "userName": "张三", "userRole": "user" }, "messages": [] }, "createdAt": "2024-01-14T15:20:00.000Z", "updatedAt": "2024-01-14T15:25:00.000Z" } ], "pagination": { "limit": 10, "offset": 0, "total": 2 } }
updatedAt
limit
offset
{ "error": "search_string is required" }
{ "error": { "message": "Invalid authentication" } }