curl --request GET \
--url https://api.occtoo.com/v1/events/stream \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.occtoo.com/v1/events/stream"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.occtoo.com/v1/events/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_URL => "https://api.occtoo.com/v1/events/stream",
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.occtoo.com/v1/events/stream"
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.occtoo.com/v1/events/stream")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.occtoo.com/v1/events/stream")
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"id: 003.00000000000000184467\nevent: source.updated\ndata: {\"specversion\":\"1.0\",\"id\":\"0197a2b4-7c1e-59f3-a8d4-1b2c3d4e5f60\",\"type\":\"source.updated\",\"source\":\"/sources/products\",\"subject\":\"products\",\"time\":\"2026-07-04T09:15:12.345Z\",\"datacontenttype\":\"application/json\",\"dataschema\":\"https://api.occtoo.com/v1/events/schemas/source.updated/1.0\",\"sequence\":\"003.00000000000000184467\",\"tenantid\":\"9f3c2a10-2e2e-4e67-b941-89e8d3190c47\",\"data\":{\"sourceId\":\"products\",\"changes\":[\"settings\"],\"correlationIds\":[\"0197a2b4-56bb-7b38-b82c-33b55b61ef2a\"]}}\n\n"{
"message": "Property 'entryId' is not filterable."
}Stream public events using SSE
Opens a long-lived Server-Sent Events connection and emits the same structured CloudEvents returned by the pull endpoint.
With no cursor, the connection starts at the current tenant-stream tail and emits only events that occur after the subscription is established. Each SSE frame uses the CloudEvent sequence as id, its type as event, and the complete CloudEvent JSON as data.
Reconnect with Last-Event-ID to resume strictly after the last successfully processed event. The after query parameter is available when an explicit historical position is needed for the initial connection. When both are supplied, Last-Event-ID takes precedence.
Comment-only heartbeats keep the connection and gateway activity window alive. Consumers must ignore comment frames and persist the last successfully processed event id.
curl --request GET \
--url https://api.occtoo.com/v1/events/stream \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.occtoo.com/v1/events/stream"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.occtoo.com/v1/events/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_URL => "https://api.occtoo.com/v1/events/stream",
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.occtoo.com/v1/events/stream"
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.occtoo.com/v1/events/stream")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.occtoo.com/v1/events/stream")
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"id: 003.00000000000000184467\nevent: source.updated\ndata: {\"specversion\":\"1.0\",\"id\":\"0197a2b4-7c1e-59f3-a8d4-1b2c3d4e5f60\",\"type\":\"source.updated\",\"source\":\"/sources/products\",\"subject\":\"products\",\"time\":\"2026-07-04T09:15:12.345Z\",\"datacontenttype\":\"application/json\",\"dataschema\":\"https://api.occtoo.com/v1/events/schemas/source.updated/1.0\",\"sequence\":\"003.00000000000000184467\",\"tenantid\":\"9f3c2a10-2e2e-4e67-b941-89e8d3190c47\",\"data\":{\"sourceId\":\"products\",\"changes\":[\"settings\"],\"correlationIds\":[\"0197a2b4-56bb-7b38-b82c-33b55b61ef2a\"]}}\n\n"{
"message": "Property 'entryId' is not filterable."
}Authorizations
Sign in with the existing Occtoo Studio identity and selected organization.
Headers
Raw sequence from the last successfully processed SSE event. Sent automatically by conforming SSE clients when they reconnect.
Query Parameters
Optional opaque pull cursor or raw fixed-width event sequence used to position the initial SSE connection. Omit it to receive only events occurring after the connection is established. Last-Event-ID takes precedence on reconnect.
RFC 7644-derived event filter. Supports eq, and, or, parentheses and double-quoted strings. Example: (type eq "source.updated" and sourceId eq "products") or (type eq "segment.updated" and segmentId eq "summer-sale"). Filterable properties are listed by GET /v1/event-types.
4096Response
A resumable Server-Sent Events stream of structured CloudEvents.
SSE frames containing one structured CloudEvent per data field.
Was this page helpful?