Push the audit log to your security tools within seconds of each event.
A stream delivers every audit event to one destination: Splunk's HTTP Event Collector, Microsoft Sentinel, or any HTTPS endpoint as a signed webhook. Use a webhook for tools that take JSON over HTTPS, such as Datadog, Sumo Logic, an Azure Logic App or a function of your own.
streams scope.A SIEM that prefers to pull can poll the audit log instead.
curl "https://tensorworks.net/enterprise/v1/streams" \
-H "Authorization: Bearer $TENSORWORKS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "SOC",
"kind": "webhook",
"url": "https://example.com/tensorworks-events"
}'Event streaming
id.2xx, or does not answer within 10 seconds, is tried again after 5 seconds, doubling each time up to an hour. Nothing is skipped: delivery continues from the first event not taken. The stream's error says what went wrong.https:// URL at a public address, with a valid certificate. Redirects are not followed.Streams stop delivering while the organization is not on Enterprise.
Event streaming
id string name string kind string splunk, sentinel or webhook.url string enabled boolean created_at string index string | null tenant_id, client_id, dcr_id, stream_name string | null delivered_at string | null error string | null failed_at string | null Secrets (a Splunk token, an Entra client secret, a webhook's signing secret) are never answered after the stream is made.
{
"id": "d3a9…",
"name": "SOC",
"kind": "webhook",
"url": "https://example.com/tensorworks-events",
"enabled": true,
"created_at": "2026-11-10T12:00:41.300Z",
"index": null,
"tenant_id": null,
"client_id": null,
"dcr_id": null,
"stream_name": null,
"delivered_at": "2026-11-10T14:03:25.012Z",
"error": null,
"failed_at": null
}GET /streams
Every stream of the organization, oldest first. The list is not paged: next_cursor is always null.
curl "https://tensorworks.net/enterprise/v1/streams" \
-H "Authorization: Bearer $TENSORWORKS_TOKEN"{
"data": [
{
"id": "d3a9…",
"name": "SOC",
"kind": "webhook",
"url": "https://example.com/tensorworks-events",
"enabled": true,
"created_at": "2026-11-10T12:00:41.300Z",
"index": null,
"tenant_id": null,
"client_id": null,
"dcr_id": null,
"stream_name": null,
"delivered_at": "2026-11-10T14:03:25.012Z",
"error": null,
"failed_at": null
}
],
"next_cursor": null
}POST /streams
Adds a stream and starts delivering. Answers 201 with the stream. A webhook's answer also carries its signing secret, this once.
name string Requiredkind string Requiredsplunk, sentinel or webhook.url string Requiredhttps:// URL: the HEC endpoint, the data collection endpoint, or your webhook.token string index string tenant_id string client_id string client_secret string dcr_id string dcr-….stream_name string Custom-TensorworksAudit_CL.A body that is refused answers 400 invalid_request with a message saying which field to fix.
curl "https://tensorworks.net/enterprise/v1/streams" \
-H "Authorization: Bearer $TENSORWORKS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Splunk Cloud",
"kind": "splunk",
"url": "https://http-inputs-example.splunkcloud.com/services/collector/event",
"token": "$HEC_TOKEN",
"index": "security"
}'{
"data": {
"id": "d3a9…",
"name": "SOC",
"kind": "webhook",
"url": "https://example.com/tensorworks-events",
"enabled": true,
"created_at": "2026-11-10T12:00:41.300Z",
"index": null,
"tenant_id": null,
"client_id": null,
"dcr_id": null,
"stream_name": null,
"delivered_at": null,
"error": null,
"failed_at": null,
"secret": "4b1f…64 hexadecimal characters"
}
}GET /streams/{stream}
One stream, with whether it is delivering and its last error. Poll it to monitor delivery.
curl "https://tensorworks.net/enterprise/v1/streams/$STREAM" \
-H "Authorization: Bearer $TENSORWORKS_TOKEN"{
"data": {
"id": "d3a9…",
"name": "SOC",
"kind": "webhook",
"url": "https://example.com/tensorworks-events",
"enabled": true,
"created_at": "2026-11-10T12:00:41.300Z",
"index": null,
"tenant_id": null,
"client_id": null,
"dcr_id": null,
"stream_name": null,
"delivered_at": "2026-11-10T14:03:25.012Z",
"error": "The destination answered 503.",
"failed_at": "2026-11-10T14:10:02.440Z"
}
}PATCH /streams/{stream}
Pauses a stream or resumes it. Resuming clears its error, tries again at once and delivers everything logged while it was paused.
enabled boolean Requiredfalse to pause, true to resume.curl -X PATCH "https://tensorworks.net/enterprise/v1/streams/$STREAM" \
-H "Authorization: Bearer $TENSORWORKS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"enabled": false}'POST /streams/{stream}/test
Sends one made-up event, stream.test, to the destination now, in the same form as real events. It answers { "data": { "delivered": true } }, or 400 invalid_request with what the destination said. The test event is in no log.
curl -X POST "https://tensorworks.net/enterprise/v1/streams/$STREAM/test" \
-H "Authorization: Bearer $TENSORWORKS_TOKEN"Destinations
Events go to Splunk's HTTP Event Collector, one JSON event each, with source tensorworks, sourcetype tensorworks:audit and the event's own time.
splunk with the collector's url, ending in /services/collector/event, its token, and optionally an index the token may write to.sourcetype="tensorworks:audit".Requests carry Authorization: Splunk <token>. The collector must be reachable from the internet with a certificate a public authority issued, as Splunk Cloud's is.
{"time": 1794405802.481, "source": "tensorworks", "sourcetype": "tensorworks:audit", "index": "security", "event": { …the event… }}
{"time": 1794405803.007, "source": "tensorworks", "sourcetype": "tensorworks:audit", "index": "security", "event": { … }}Destinations
Events go to your Log Analytics workspace through Azure Monitor's Logs Ingestion API, one row per event.
TensorworksAudit_CL, with the columns shown, and a data collection rule whose stream declares the same columns and sends them to the table.sentinel with the logs ingestion endpoint as url (the rule's own, or a data collection endpoint's), the directory's tenant_id, the application's client_id and client_secret, the rule's immutable id as dcr_id, and its stream_name, such as Custom-TensorworksAudit_CL.Tensorworks signs in to Microsoft Entra as the application and posts to <url>/dataCollectionRules/<dcr_id>/streams/<stream_name>. Details holds the event's details object.
TimeGenerated: datetime, EventId: string, Action: string, Category: string,
ActorType: string, ActorId: string, SessionId: string,
EntityType: string, EntityId: string, Organization: string,
Project: string, Resource: string, Scope: string, Details: dynamicTensorworksAudit_CL
| where Action == "user.login_failed"
| summarize Failures = count() by ActorId, tostring(Details.ip), bin(TimeGenerated, 10m)
| where Failures >= 5Destinations
A webhook receives a POST whose JSON body holds events, up to 500 at a time, each as the audit log answers it. Answer any 2xx within 10 seconds. Anything else is delivered again.
Each delivery is signed with the stream's secret, shown once when the stream is added. The Tensorworks-Signature header holds the time t in Unix seconds and v1, the HMAC-SHA256, in hexadecimal, of t, a period and the raw body. Check it before trusting a delivery, and refuse an old t so a captured delivery can't be replayed.
Content-Type string application/json.Tensorworks-Signature string t=<unix seconds>,v1=<hex HMAC-SHA256>.User-Agent string Tensorworks-Event-Stream/1.{
"events": [
{
"id": "5f0c9a1e2b7d4c3a8e6f1b20",
"at": "2026-11-10T14:03:22.481Z",
"action": "notes.created",
"category": "resource",
"actor": {
"type": "user",
"id": "8c1d…"
},
"session": "b7e4…",
"entity": {
"type": "notes",
"id": "41aa…"
},
"context": {
"organization": "2f9b…",
"scope": "resource",
"resource": "c05e…"
},
"details": {
"fields": [
"body",
"sender_user_id",
"sender_name"
]
}
}
]
}import { createHmac, timingSafeEqual } from 'node:crypto';
// header: Tensorworks-Signature: t=<unix seconds>,v1=<hex>
// body: the request's raw bytes, before any JSON parsing
function verified(header, body, secret) {
const [, t, v1] = header.match(/^t=(\d+),v1=([0-9a-f]{64})$/) ?? [];
if (!t || Math.abs(Date.now() / 1000 - Number(t)) > 300) return false;
const expected = createHmac('sha256', secret).update(`${t}.${body}`).digest();
return timingSafeEqual(expected, Buffer.from(v1, 'hex'));
}Questions or something missing? Contact us.