curl --request GET \
--url http://localhost:3001/workflow/{id}/history/streamimport requests
url = "http://localhost:3001/workflow/{id}/history/stream"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://localhost:3001/workflow/{id}/history/stream', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3001",
CURLOPT_URL => "http://localhost:3001/workflow/{id}/history/stream",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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 := "http://localhost:3001/workflow/{id}/history/stream"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:3001/workflow/{id}/history/stream")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3001/workflow/{id}/history/stream")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body"<string>"{
"error": "ValidationError",
"message": "Invalid Payload",
"issues": [
{}
]
}{
"error": "<string>",
"message": "<string>",
"workflowId": "<string>"
}{
"error": "<string>",
"message": "<string>",
"workflowId": "<string>"
}Stream workflow history events via Server-Sent Events
Opens a persistent SSE connection that delivers Temporal workflow history events in real time. Emits named events: workflow (metadata, once), history (event batches), done (terminal state), server_error (post-flush errors). The done event carries { reason, newRunId? } where reason is the terminal Temporal event type (WORKFLOW_EXECUTION_COMPLETED, WORKFLOW_EXECUTION_FAILED, WORKFLOW_EXECUTION_TIMED_OUT, WORKFLOW_EXECUTION_CANCELED, WORKFLOW_EXECUTION_TERMINATED, WORKFLOW_EXECUTION_CONTINUED_AS_NEW) and newRunId is present only when the terminal event chains a follow-on run. server_error carries { error, message, workflowId, runId }. Errors before the stream opens are returned as JSON HTTP responses (400/404); once open, failures arrive as a server_error event. Supports reconnect via Last-Event-ID header or lastEventId query param.
curl --request GET \
--url http://localhost:3001/workflow/{id}/history/streamimport requests
url = "http://localhost:3001/workflow/{id}/history/stream"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://localhost:3001/workflow/{id}/history/stream', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3001",
CURLOPT_URL => "http://localhost:3001/workflow/{id}/history/stream",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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 := "http://localhost:3001/workflow/{id}/history/stream"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:3001/workflow/{id}/history/stream")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3001/workflow/{id}/history/stream")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body"<string>"{
"error": "ValidationError",
"message": "Invalid Payload",
"issues": [
{}
]
}{
"error": "<string>",
"message": "<string>",
"workflowId": "<string>"
}{
"error": "<string>",
"message": "<string>",
"workflowId": "<string>"
}Path Parameters
The workflow execution ID
Query Parameters
Include decoded input/output payloads in events
Resume from this event ID (alternative to Last-Event-ID header)
Response
SSE stream of workflow history events
The response is of type string.