List Workflow Logs
Available for: Chatflow, Workflow apps.
List past workflow runs with optional filters. Each entry is a run-level summary (status, token usage, step count, and timing), not a node-by-node execution log.
To follow a run’s node-level events, stream it instead:
- A run you start: use Run Workflow in streaming mode, which emits
node_startedandnode_finishedas the run executes. - A run already in progress: call Stream Workflow Events with
include_state_snapshot=trueto replay each executed node’s status, then stream the rest.
A finished run’s node-level logs aren’t available through the Service API.
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{
"data": [
{
"created_at": 1705407629,
"created_by_account": null,
"created_by_end_user": {
"id": "f1e2d3c4-b5a6-7890-abcd-ef1234567890",
"is_anonymous": false,
"session_id": "user_workflow_123",
"type": "service-api"
},
"created_by_role": "end_user",
"created_from": "service-api",
"id": "b7e2f8a1-3c4d-5e6f-7890-abcdef123456",
"workflow_run": {
"created_at": 1705407629,
"elapsed_time": 1.23,
"error": null,
"exceptions_count": 0,
"finished_at": 1705407630,
"id": "fb47b2e6-5e43-4f90-be01-d5c5a088d156",
"status": "succeeded",
"total_steps": 3,
"total_tokens": 150,
"triggered_from": "app-run",
"version": "2025-01-16 12:00:00.000000"
}
}
],
"has_more": false,
"limit": 20,
"page": 1,
"total": 1
}{
"code": "invalid_param",
"message": "Account not found: name@example.com",
"status": 400
}Authorizations
Every request authenticates with an API key: Authorization: Bearer {API_KEY}. App endpoints take an app API key; knowledge endpoints take a knowledge base API key (Get Started).
Keep keys server-side; never embed them in client code. Requests with a missing or invalid key fail with HTTP 401 (unauthorized).
Query Parameters
Keyword to search in logs.
Filter by execution status.
succeeded, failed, stopped Page number.
1 <= x <= 99999Number of items per page.
1 <= x <= 100Filter logs created before this ISO 8601 timestamp.
Filter logs created after this ISO 8601 timestamp.
Filter by end user session ID.
Filter by the creator's account email (e.g., name@example.com).
Was this page helpful?
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{
"data": [
{
"created_at": 1705407629,
"created_by_account": null,
"created_by_end_user": {
"id": "f1e2d3c4-b5a6-7890-abcd-ef1234567890",
"is_anonymous": false,
"session_id": "user_workflow_123",
"type": "service-api"
},
"created_by_role": "end_user",
"created_from": "service-api",
"id": "b7e2f8a1-3c4d-5e6f-7890-abcdef123456",
"workflow_run": {
"created_at": 1705407629,
"elapsed_time": 1.23,
"error": null,
"exceptions_count": 0,
"finished_at": 1705407630,
"id": "fb47b2e6-5e43-4f90-be01-d5c5a088d156",
"status": "succeeded",
"total_steps": 3,
"total_tokens": 150,
"triggered_from": "app-run",
"version": "2025-01-16 12:00:00.000000"
}
}
],
"has_more": false,
"limit": 20,
"page": 1,
"total": 1
}{
"code": "invalid_param",
"message": "Account not found: name@example.com",
"status": 400
}