查询会话列表
curl --request POST \
--url 'https://api.flashcat.cloud/safari/session/list?app_key=' \
--header 'Content-Type: application/json' \
--data '
{
"app_name": "ai-sre",
"limit": 2,
"orderby": "updated_at",
"scope": "all"
}
'import requests
url = "https://api.flashcat.cloud/safari/session/list?app_key="
payload = {
"app_name": "ai-sre",
"limit": 2,
"orderby": "updated_at",
"scope": "all"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({app_name: 'ai-sre', limit: 2, orderby: 'updated_at', scope: 'all'})
};
fetch('https://api.flashcat.cloud/safari/session/list?app_key=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.flashcat.cloud/safari/session/list?app_key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'app_name' => 'ai-sre',
'limit' => 2,
'orderby' => 'updated_at',
'scope' => 'all'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.flashcat.cloud/safari/session/list?app_key="
payload := strings.NewReader("{\n \"app_name\": \"ai-sre\",\n \"limit\": 2,\n \"orderby\": \"updated_at\",\n \"scope\": \"all\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.flashcat.cloud/safari/session/list?app_key=")
.header("Content-Type", "application/json")
.body("{\n \"app_name\": \"ai-sre\",\n \"limit\": 2,\n \"orderby\": \"updated_at\",\n \"scope\": \"all\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flashcat.cloud/safari/session/list?app_key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"app_name\": \"ai-sre\",\n \"limit\": 2,\n \"orderby\": \"updated_at\",\n \"scope\": \"all\"\n}"
response = http.request(request)
puts response.read_body{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"data": {
"total": 988,
"sessions": [
{
"session_id": "sess_f8oDvqiG64uur6sBNsTc4u",
"session_name": "Investigate cloud-assistant first heartbeat",
"app_name": "ai-sre",
"entry_kind": "web",
"person_id": "3790925372131",
"creator_name": "Alice Chen",
"team_id": 0,
"is_mine": true,
"can_view": true,
"can_continue": true,
"can_manage": true,
"can_fork": true,
"access_source": "owner",
"share_enabled": true,
"share_version": 3,
"shared_at": 1780367971000,
"shared_by": 3790925372131,
"status": "enabled",
"incognito": false,
"created_at": 1780367971228,
"updated_at": 1780367993457,
"token_usage": {
"input_tokens": 14948,
"cached_tokens": 11520,
"output_tokens": 888,
"reasoning_tokens": 351
},
"current_context_tokens": 14948,
"context_window": 0,
"archived_at": 0,
"pinned_at": 0,
"last_event_at": 1780367992649,
"is_running": false,
"turn_in_flight": false,
"standing_tasks": 0,
"has_unread": true,
"current_turn_started_at": 0,
"current_turn_active_ms": 0,
"current_turn_wait_ms": 0,
"current_turn_tokens": 0
}
]
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "InvalidParameter",
"message": "The specified parameter skill_id is not valid."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "Unauthorized",
"message": "You are unauthorized."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "AccessDenied",
"message": "Access Denied."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "RequestTooFrequently",
"message": "Request too frequently."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "InternalError",
"message": "We encountered an internal error, and it has been reported. Please try again later."
}
}会话
查询会话列表
分页查询调用者可见的智能体会话,可按应用、入口、归档状态与团队过滤。
POST
/
safari
/
session
/
list
查询会话列表
curl --request POST \
--url 'https://api.flashcat.cloud/safari/session/list?app_key=' \
--header 'Content-Type: application/json' \
--data '
{
"app_name": "ai-sre",
"limit": 2,
"orderby": "updated_at",
"scope": "all"
}
'import requests
url = "https://api.flashcat.cloud/safari/session/list?app_key="
payload = {
"app_name": "ai-sre",
"limit": 2,
"orderby": "updated_at",
"scope": "all"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({app_name: 'ai-sre', limit: 2, orderby: 'updated_at', scope: 'all'})
};
fetch('https://api.flashcat.cloud/safari/session/list?app_key=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.flashcat.cloud/safari/session/list?app_key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'app_name' => 'ai-sre',
'limit' => 2,
'orderby' => 'updated_at',
'scope' => 'all'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.flashcat.cloud/safari/session/list?app_key="
payload := strings.NewReader("{\n \"app_name\": \"ai-sre\",\n \"limit\": 2,\n \"orderby\": \"updated_at\",\n \"scope\": \"all\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.flashcat.cloud/safari/session/list?app_key=")
.header("Content-Type", "application/json")
.body("{\n \"app_name\": \"ai-sre\",\n \"limit\": 2,\n \"orderby\": \"updated_at\",\n \"scope\": \"all\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flashcat.cloud/safari/session/list?app_key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"app_name\": \"ai-sre\",\n \"limit\": 2,\n \"orderby\": \"updated_at\",\n \"scope\": \"all\"\n}"
response = http.request(request)
puts response.read_body{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"data": {
"total": 988,
"sessions": [
{
"session_id": "sess_f8oDvqiG64uur6sBNsTc4u",
"session_name": "Investigate cloud-assistant first heartbeat",
"app_name": "ai-sre",
"entry_kind": "web",
"person_id": "3790925372131",
"creator_name": "Alice Chen",
"team_id": 0,
"is_mine": true,
"can_view": true,
"can_continue": true,
"can_manage": true,
"can_fork": true,
"access_source": "owner",
"share_enabled": true,
"share_version": 3,
"shared_at": 1780367971000,
"shared_by": 3790925372131,
"status": "enabled",
"incognito": false,
"created_at": 1780367971228,
"updated_at": 1780367993457,
"token_usage": {
"input_tokens": 14948,
"cached_tokens": 11520,
"output_tokens": 888,
"reasoning_tokens": 351
},
"current_context_tokens": 14948,
"context_window": 0,
"archived_at": 0,
"pinned_at": 0,
"last_event_at": 1780367992649,
"is_running": false,
"turn_in_flight": false,
"standing_tasks": 0,
"has_unread": true,
"current_turn_started_at": 0,
"current_turn_active_ms": 0,
"current_turn_wait_ms": 0,
"current_turn_tokens": 0
}
]
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "InvalidParameter",
"message": "The specified parameter skill_id is not valid."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "Unauthorized",
"message": "You are unauthorized."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "AccessDenied",
"message": "Access Denied."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "RequestTooFrequently",
"message": "Request too frequently."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "InternalError",
"message": "We encountered an internal error, and it has been reported. Please try again later."
}
}限制说明
| 项目 | 说明 |
|---|---|
| 速率限制 | 每个账户 1,000 次/分钟;50 次/秒 |
| 权限要求 | 无 —— 持有有效的 app_key 即可调用 |
使用说明
- 分页使用
p/limit(默认 20,最大 100)。调用者置顶且符合过滤条件的会话会额外插在第 1 页最前面(不占limit),不会出现在后续页,也不计入total。 scope=all返回调用者创建的会话,以及绑定到调用者所在团队的会话。团队以实际成员关系为准,对所有角色一致;账户所有者和管理员在此看不到其他团队的会话。team_ids、person_ids、entry_kinds只会收窄可见范围。无痕会话永不列出;子智能体会话仅在include_subagent_sessions=true时返回。creator_name、has_unread、pinned_at按调用者计算。current_turn_*字段与context_window恒为0,且不返回state、bound_environment、context_resolved、automation、has_open_tasks;如需这些字段请使用POST /safari/session/get。
授权
请求体
application/json
查询智能体会话列表的过滤条件。all 表示调用者自己的个人会话和可访问团队的团队会话;账户管理员不可见他人的个人会话。
要查询其会话的智能体应用。可选值:
| 值 | 含义 |
|---|---|
ask-ai | Ask AI 问答助手 |
support | 客服支持智能体 |
support-website | 官网站点客服智能体(经 A2A 暴露,不内置于控制台) |
support-flashcat | Flashcat 站点客服智能体(经 A2A 暴露) |
ai-sre | AI SRE 主应用 |
template-assistant | 通知模板助手(模板编辑/校验场景) |
query-assistant | 监控查询语句编写助手 |
swe | 软件工程智能体应用(控制台不提供入口) |
可用选项:
ask-ai, support, support-website, support-flashcat, ai-sre, template-assistant, query-assistant, swe 响应
成功
所有 Flashduty 公开 API 共用的标准响应结构。成功时 data 为接口专属载荷且不含 error;失败时 error 存在而 data 缺失。request_id 始终存在,并会同步写入 Flashcat-Request-Id 响应头。
此页面对您有帮助吗?