Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
cURL
curl --request GET \ --url https://{api_base_url}/workflows/logs \ --header 'Authorization: Bearer <token>'
import requests url = "https://{api_base_url}/workflows/logs" headers = {"Authorization": "Bearer <token>"} response = requests.get(url, headers=headers) print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}}; fetch('https://{api_base_url}/workflows/logs', 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_base_url}/workflows/logs", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Authorization: Bearer <token>" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
package main import ( "fmt" "net/http" "io" ) func main() { url := "https://{api_base_url}/workflows/logs" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer <token>") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) }
HttpResponse<String> response = Unirest.get("https://{api_base_url}/workflows/logs") .header("Authorization", "Bearer <token>") .asString();
require 'uri' require 'net/http' url = URI("https://{api_base_url}/workflows/logs") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer <token>' response = http.request(request) puts response.read_body
{ "page": 1, "limit": 20, "total": 1, "has_more": false, "data": [ { "id": "b7e2f8a1-3c4d-5e6f-7890-abcdef123456", "workflow_run": { "id": "fb47b2e6-5e43-4f90-be01-d5c5a088d156", "version": "2025-01-16 12:00:00.000000", "status": "succeeded", "error": null, "elapsed_time": 1.23, "total_tokens": 150, "total_steps": 3, "created_at": 1705407629, "finished_at": 1705407630, "exceptions_count": 0, "triggered_from": "app-run" }, "created_from": "service-api", "created_by_role": "end_user", "created_by_account": null, "created_by_end_user": { "id": "f1e2d3c4-b5a6-7890-abcd-ef1234567890", "type": "service-api", "is_anonymous": false, "session_id": "user_workflow_123" }, "created_at": 1705407629 } ] }
{ "status": 400, "code": "invalid_param", "message": "Account not found: name@example.com" }
适用于:Chatflow、Workflow。
列出过往的工作流运行,支持可选筛选。每条记录是运行级摘要(状态、Token 用量、步数和耗时),而非逐节点的执行日志。
如需跟踪某次运行的节点级事件,请改用流式方式:
node_started
node_finished
include_state_snapshot=true
已结束运行的节点级日志无法通过服务 API 获取。
每个请求都通过 API 密钥认证:Authorization: Bearer {API_KEY}。应用接口使用应用 API 密钥,知识库接口使用知识库 API 密钥(快速开始)。
Authorization: Bearer {API_KEY}
API 密钥应保存在服务端,切勿嵌入客户端代码。缺失或无效的密钥会返回 HTTP 401(unauthorized)。
401
unauthorized
在日志中搜索的关键词。
按执行状态筛选。
succeeded
failed
stopped
页码。
1 <= x <= 99999
每页条目数。
1 <= x <= 100
筛选在此 ISO 8601 时间戳之前创建的日志。
筛选在此 ISO 8601 时间戳之后创建的日志。
按终端用户会话 ID 筛选。
按创建者的账户邮箱筛选(例如 name@example.com)。
name@example.com
成功获取工作流日志。
当前页码。
日志条目总数。
是否有更多可用页面。
工作流日志条目列表。
Show child attributes