curl --request GET \
--url https://api.usenexio.com/events/stream \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.usenexio.com/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.usenexio.com/events/stream', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"account_id": "<string>",
"event": "<string>",
"kind": "notice",
"outbox_id": "<string>",
"payload": "<unknown>",
"run_id": "<string>",
"topic": "<string>"
}{
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}Stream the org's change notices
The realtime notices of the token’s org that its principal may read, as server-sent events. Each message’s id is the resume cursor (send it back as Last-Event-ID), its event line the notice’s event name, its data one ChangeFrame. On the org topic a notice about an account reaches only a seat that can open the account, and a notice about no account only when its event is org-wide. A Last-Event-ID older than the stream’s retained window answers one resync frame first: refetch what the page shows. : ka comes every 15 s; : end closes the window at the token’s expiry or when the server restarts, after which the reader mints a new token and reconnects with Last-Event-ID. Browsers on an allowed origin may call it directly (CORS).
curl --request GET \
--url https://api.usenexio.com/events/stream \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.usenexio.com/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.usenexio.com/events/stream', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"account_id": "<string>",
"event": "<string>",
"kind": "notice",
"outbox_id": "<string>",
"payload": "<unknown>",
"run_id": "<string>",
"topic": "<string>"
}{
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}Headers
Query Parameters
Response
An event stream. Each message carries id (the resume cursor), event (the frame type) and data (one ChangeFrame as JSON). : ka comments keep an idle stream open; a final : end comment closes the server's window, after which the reader resubscribes with after= its last id if it needs more.
- Option 1
- Option 2
One frame of the stream, discriminated by kind.