REST API
Consumer endpoints live under /ox-api/ on your workspace host (https://openx.fathym.com). The full
OpenAPI spec, filtered to your access rights, is at GET /ox-api/openapi. Every call takes a bearer
token - see Call the API from your app for which token and headers to
send, and Auth & Tokens. There is no GraphQL API; use REST or
connect any AI over MCP.
Warm queries
Run a named warm query - GET /ox-api/warm-queries/{lookup}
Runs a saved warm query by its lookup (or its API path). A query's declared parameters are read from the query string.
curl -X GET 'https://openx.fathym.com/ox-api/warm-queries/{lookup}' \
-H 'Authorization: Bearer YOUR_TOKEN'
The answer is one JSON object with an output for each output the query declares, keyed by the output's name. A
query saved as plain text has one, named result. A row is a list of values in the order of Columns, not a
record:
{
"Engine": "steps",
"Outputs": {
"result": {
"Status": "Succeeded",
"Columns": [{ "Name": "Hour", "Type": "datetime" }, { "Name": "Signups", "Type": "long" }],
"Rows": [["2026-10-18T09:00:00Z", 12]],
"Page": { "Truncated": false }
}
}
}
An output's Status is Succeeded, Skipped or Failed; a Skipped or Failed one carries no Columns or
Rows, and a Failed one carries a Code, a Message and a Remedy. Page.Truncated is true, with a
Reason, when the source cut the table. The API adds no row cap of its own; the engine's limits apply (see
Limits). A saved query that does not exist is 404; one with no query text yet is 400.
Run a draft query - POST /ox-api/warm-queries
Body: the envelope { WarmQuery, Arguments?, Steps?, Sample?, CheckOnly?, Compile? }, with the whole draft record as
WarmQuery: the same shape a saved query has, its Details with Steps and Outputs (over MCP,
get_workspace with kinds: ["WarmQueries"] returns saved ones to start from). CheckOnly: true checks it and reads no data; Sample returns the first rows of one step. A
draft run is bounded to 10,000 rows a step, 30 seconds and a 100-row preview, and saves nothing. A bare
{ "Query": ... } body is refused with WARM_QUERY_BODY_LEGACY.
Compile: true goes one step further than CheckOnly: it runs the same save rules, then asks the engine to plan
each step against this workspace's real data. It answers 200 { Valid, Refusals, Steps }. Steps holds, per step,
the Columns the step's text would answer (each with its Name and Type). A step the engine refuses, a wrong
column name or text that is not valid KQL, is a refusal that names the Step, carries a Remedy, and gives the
engine's own words in EngineDetail. Send Steps with Compile to compile only the steps you name. CheckOnly
keeps its contract and calls no engine. Compile is the step between checking a draft and running it.
What compiling reads depends on the step's engine:
| Engine | What Compile does | What the step's entry in Steps holds |
|---|---|---|
kql | Azure Data Explorer plans the text against the real table. No rows are read. | Columns, each with a Name and a Type |
cosmos-nosql | Reads one document of the step's container with the step's own query, on the workspace's own Cosmos account, within at most 5,000 RU (the step's own Limits.CostBudgetRU when that is lower). | Columns with the Name of each field of that document and its JSON Type, never a value, and a Note. No columns when the step read no document or its rows are plain values |
The Note on a Cosmos step says what compiling did not prove: Cosmos holds no schema, so only the query text was
checked, and a wrong field name is not an error in Cosmos, it reads as missing. Check a Cosmos field name against
the documents retrieve_inventory returns with includeSample (see
retrieve_inventory).
A draft run answers Warnings beside its outputs, an empty list when there is nothing to say. A warning never
stops a run, and it names a column, an output or a step, never a row value. Each is { Code, Message, Remedy }, with
Output, Step or Column when one applies, and Nearest on FIELD_NOT_SENT:
| Code | Means |
|---|---|
NO_ROWS | An output came back with no rows. Check the time window and the filters |
EMPTY_COLUMN | A column is null or blank text in every row the run shows, often a field no device sends. A hint from those rows only, and Message says how many it saw. An empty object, an empty list or a date is a value and never warns |
TAKE_WITHOUT_ORDER | A kql step takes rows with take or limit and no order first, so each run can answer other rows |
FIELD_NOT_SENT | A kql step reads a payload field (Column, such as RawData.temp) that no device of the query's connections sent in the last 7 days. Nearest names the 3 closest fields they did send. When those 7 days cannot be read, it is not warned |
A saved query's run answers no Warnings.
Cold-data export
A data connection or a surface
GET /ox-api/downloads/data-connections/{lookup}/cold streams one data connection's stored cold files, and
GET /ox-api/downloads/surfaces/{surfaceLookup} the stored cold files of every connection on a surface, in
one file. The rows come back in the response; there is no second step.
| Query key | Meaning |
|---|---|
from | Start of the window (ISO 8601). Default: 7 days before to |
to | End of the window (ISO 8601). Default: now |
format | csv or jsonl. Default jsonl |
download | true (or just download) answers the rows as an attachment |
curl 'https://openx.fathym.com/ox-api/downloads/data-connections/<lookup>/cold?format=csv&download=true' \
-H 'Authorization: Bearer <YOUR_JWT_TOKEN>'
Any other key is refused with 400 COLD_FILE_UNKNOWN_QUERY_KEY, naming the keys it reads. Another format is
400 COLD_FILE_BAD_FORMAT, another download value 400 COLD_FILE_BAD_DOWNLOAD, and a window that cannot be
read, or a from after to, 400 COLD_EXPORT_BAD_WINDOW.
A warm query's rows as a file
A warm query's whole result can be built as one file, on the query's own address. Two reserved query keys turn
the address into the download: $cold, which takes only true, and $requestId, which names one build.
| Step | Saved query | Draft |
|---|---|---|
| Start | POST /ox-api/warm-queries/{lookup}?$cold=true | POST /ox-api/warm-queries?$cold=true |
| Fetch | GET /ox-api/warm-queries/{lookup}?$cold=true&$requestId=<id> | GET /ox-api/warm-queries?$cold=true&$requestId=<id> |
| List | GET /ox-api/warm-queries/{lookup}?$cold=true | GET /ox-api/warm-queries?$cold=true |
In a shell, quote the URL in single quotes, or the shell reads $cold as a variable:
curl -X POST 'https://openx.fathym.com/ox-api/warm-queries/<lookup>?$cold=true' \
-H 'Authorization: Bearer <YOUR_JWT_TOKEN>' \
-H 'Content-Type: application/json' \
-d '{"format": "csv"}'
curl 'https://openx.fathym.com/ox-api/warm-queries/<lookup>?$cold=true&$requestId=<requestId>' \
-H 'Authorization: Bearer <YOUR_JWT_TOKEN>'
Start. A saved query takes its declared parameters in the query string, as a run does, and an optional
body { format, from, to, includeHeaders }: format is csv (the default) or jsonl, and includeHeaders
(a csv header row) is on unless you send false. A draft sends its envelope { WarmQuery, Arguments?, Steps? }
plus those keys. The answer is 202 { status: "building", requestId, downloadUrl }, with a Location header for
the fetch and Retry-After: 2. The file builds in the background, even if you hang up.
Fetch. 202 { status: "building", requestId } while it builds. Then the file, once: text/csv or
application/x-ndjson, as an attachment. A second fetch is 404 COLD_EXPORT_NOT_FOUND. Only the caller who
started a build can fetch it; anyone else gets 403 COLD_EXPORT_OTHER_CALLER. A finished file is kept for one
hour.
List. $cold=true with no $requestId lists your own downloads of that query, never anyone else's.
The file is every row; there is no paging and no row cap. To get fewer rows, say so in the query.
| Status | Code | When |
|---|---|---|
| 405 | none (Allow: GET) | A POST to a saved query with no $cold key: a saved query runs on GET |
| 405 | none (Allow: POST) | A GET of /ox-api/warm-queries with no $cold key: a draft runs on POST |
| 400 | WARM_QUERY_RESERVED_KEY_INVALID | $cold with any value but true ($cold=false too), $requestId on a GET without $cold=true, or $requestId on a POST |
| 400 | WARM_QUERY_RESERVED_KEY_UNKNOWN | Any other query key starting with $. The answer names it, and the known keys |
| 400 | COLD_EXPORT_UNKNOWN_BODY_KEY | A body key the start does not read, such as page or pageSize |
| 400 | COLD_EXPORT_MODE_REFUSED | A draft start with Sample, CheckOnly or Compile: none makes a file |
| 409 | COLD_EXPORT_CHECK_REFUSED | The query fails the checks made before anything is built; Refusals lists each |
| 409 | TELEMETRY_REQUIRES_PRIVATE_IOT | "Set up IoT for this workspace first. Telemetry is read only from the workspace's own analytics database, and this workspace does not have one yet." (was 503; the status moved, the Code did not) |
| 500 | COLD_EXPORT_INTERRUPTED | The build was lost when the api restarted; start it again |
| 500 | COLD_EXPORT_FAILED | The build failed |
| 422 | another COLD_EXPORT_... code | The build refused the query, in its own words. A run refusal keeps its own status and code |
A request that has no $cold key where its method needs one gets the 405 before any other check.
Reserved keys are case-sensitive, so $Cold is an unknown key. Because every query key starting with $ is
reserved, a warm query's parameter names may not start with $. A warm query that names one is refused when it
is saved, proposed or accepted, as PARAMETER_NAME_RESERVED: "Name the parameter without the leading $."
There is no /cold suffix on a warm query's address: a warm query named cold is an ordinary saved query.
Where it is listed. The API catalogue (GET /ox-api/openapi) lists the POST beside the GET on each saved
query's address, and GET /ox-api/warm-queries beside the draft POST. Each declares $cold, and the fetch
routes declare $requestId too. Because they are catalogue routes, a person's or a job's directory token reaches
them as it reaches any other catalogue route, on the rights its access cards grant; see
Call the API from your app. A team key reaches every route above in Team or Hybrid mode.
In the API Manager. The Warm Queries tab shows each of these as a card. A saved query's card under
Configured Queries has $cold and $requestId fields in Try it; the POST and the draft's GET are
cards under Generic Endpoints. Try it shows the answer as text in the window. See
API Explorer.
From an AI. The MCP server's call_api passes $cold and $requestId through. Start the file with
{ "route": "POST /warm-queries/<lookup>", "query": { "$cold": true }, "body": { "format": "csv" } }, then fetch it
once with { "route": "GET /warm-queries/<lookup>", "query": { "$cold": true, "$requestId": "<requestId>" } }.
See call_api.
Live stream
GET /ox-api/live-stream (WebSocket) - streams events as they arrive. Optional filters: connection,
surface.
Open it with an API key whose rights include Workspace.Telemetry.Read, sent as
Authorization: Bearer <key> on the WebSocket handshake. A browser socket cannot set that header, so a key opens it
from a server or a script; a signed-in OpenX page opens it on its own sign-in. The stream is the key's own workspace,
and in App mode it is closed to keys, as every /ox-api route is.
| Status | Code | Meaning |
|---|---|---|
| 403 | OX_LIVE_STREAM_RIGHT_MISSING | The key does not hold Workspace.Telemetry.Read |
| 426 | OX_LIVE_STREAM_UPGRADE_REQUIRED | The request was a plain GET, not a WebSocket upgrade |
| 401 | The key is expired, revoked or not valid, or App mode is on |
Change feed
GET /ox-api/eac-changes/stream (Server-Sent Events) - emits a message after every committed change to
your workspace.
Connect an AI (MCP)
/ox-api/mcp (Streamable HTTP, ⛔ not SSE) - the MCP endpoint any AI uses to read your warm queries and
build via proposals. Per-client setup is in Bring Any AI.
The transport is owned by @fathym/eac's MCP processor, not by this surface: it builds the MCP SDK's
WebStandardStreamableHTTPServerTransport (SDK 1.27.1). Streamable HTTP frames some responses as
text/event-stream, so an event stream on the wire is ⛔ not SSE and ⛔ not a reason to reconfigure a
client for SSE.
Change history
Once Provenance is set up, OpenX records saved changes to tracked records and the corrections made to your data (what is and is not recorded is on the Compliance Matrix). The concept guide is Ship with Confidence; the how-to is Change History & Corrections.
Scope is a filter, not part of the path. Reads pass scopeKey as a query parameter; writes carry
ScopeKey in the body. Leave it off an activity-log read and you get the workspace-level
Platform-Config records - the platform's own change history, which the earlier per-log URL shape had
no way to address. Corrections always describe a change to a scope's data, so scopeKey is required
on every corrections endpoint.
target names the container and is always a query parameter, on reads and writes alike: PlatformConfig,
AccessControl, DomainEvents, DomainAmendments or DomainSignatures. Leave it off and the route infers
one: a request with a scopeKey reads that scope's domain container, and one without reads PlatformConfig.
An unknown target, a workspace target together with a scopeKey, or a domain target without one, is a 400
that says so, never a guess. Provenance that has not been set up answers 409 PROVENANCE_NOT_PROVISIONED (it answered 503 before 2026-10-22; the status moved, the Code did not).
Activity log (what changed, when, by whom):
POST /ox-api/provenance/events- append an event (ScopeKeyin the body; actor and timestamp are server-set, never caller-supplied).GET /ox-api/provenance/events/query- query events (scopeKey,target,entityId,entityType,actionType,userId,startDate,endDate,data,fromSequence,toSequence,limit,offset).POST /ox-api/provenance/events/verify- verify the chain, and optionally one record in it (body:ScopeKey, plus an optionalRecordID).GET /ox-api/provenance/events/head- the newest record'sRecordIDandHash, and nothing more.GET /ox-api/provenance/events/export- export events (format=csv|json,scopeKey, and the query's filters,dataincluded).
Append an event. The body reads ScopeKey (required: an event is written to a scope), ActionType,
EntityType and EntityID (required), and NodeID, BeforeState, AfterState, Name and Description
(optional). A body key the route does not read, UserID and Hash included, is refused by name with 400
UNKNOWN_BODY_KEY; it is never dropped. UserID and Timestamp are set from the signed-in identity and the
server clock, and RecordID, PreviousHash and Hash are computed in the append. The answer is 201 with the
stored record. There is no check on the values of ActionType or EntityType: any non-empty text is stored as
written. A call with no identity is 401, a missing ScopeKey is 400 SCOPE_REQUIRED, and a record that fails
the schema is 400. The first write to a new scope builds that scope's storage, so it is slower than the ones
after it, by seconds.
Query events. Newest first, as a JSON array; a scope that has never been written to is 200 with an empty
array, not 404. An absent or blank filter means "do not filter on this". limit defaults to 100. A
fromSequence, toSequence, limit or offset that is not a non-negative integer is a 400, never read as 0.
Three headers describe the answer: x-provenance-scanned (the records actually read, the cost signal),
x-provenance-has-more (true when you have a prefix, not the whole history) and x-provenance-target (which
container answered). To walk a log that is still growing, use fromSequence and toSequence rather than
offset: the scan runs newest first, so an offset is a position in a list that gains records at the end you
started from, while a sequence number names one record for good.
Search by a field inside the saved data. data=<BeforeState|AfterState>.<dotted.path>=<value> keeps the
events whose saved BeforeState or AfterState holds exactly that value at that path; send it more than once
to combine filters. For example ?data=AfterState.Status=Released&data=AfterState.Lot.Number=42. You name the
path; OpenX knows nothing about what your app saves. The rules:
- The path ends at the first
=, so a value may contain=. - The value is typed by how it is written: a JSON number,
true,false,nullor a quoted string is that value, and anything else is the text as sent.=42is the number and="42"the string, and the two never match each other. nullmatches a field saved as null. A missing field is not null, and a missing path never matches.- Arrays are not searched: a path cannot step into one, and a field whose value is an array or an object matches nothing.
- Every
datafilter must hold, as must every other filter in the request. A blank value (data=AfterState.Status=) filters nothing; use=""to find an empty string. - Limits: a path of 1 to 8 names after the side (each starts with a letter or
_, then letters, digits,_or-, up to 64 characters), a value of at most 256 characters, at most 5datafilters, and each side and path once. Anything else is a 400PROVENANCE_DATA_FILTER_INVALIDnaming the filter, with aRemedy.
The filter runs before offset and limit, like every other filter, so a page holds up to limit matching
events and x-provenance-has-more: true means more matches exist. x-provenance-scanned still counts every
record read, so a narrow filter on a long log can read a lot and return little. The export applies the same
filter in the same way and records it in its footer's Query line.
Export events. format is json (the default) or csv; it takes the same filters as a query (no offset)
and a limit of 10,000 by default. It downloads as an attachment named provenance-<scope>.csv or .json
(provenance-<target>.csv for a workspace container, with the target in lower case, such as
provenance-platformconfig.csv). The CSV columns are RecordID, Timestamp, UserID,
ActionType, EntityType, EntityID, BeforeState, AfterState, PreviousHash and Hash, with the two
states written as JSON in their cells, and it ends with a manifest footer after the line
# --- PROVENANCE EXPORT MANIFEST ---: the file's SHA-256 Digest (over every byte before that line), the chain
head it was taken against (HeadRecordID, HeadHash), RecordCount, ScannedCount, HasMore and the
Query. The manifest says ChainVerified: false: an export does not verify the chain, so call verify if you
need that. The digest also comes back in the x-provenance-digest header, with x-provenance-export-version.
An export has no paging. If x-provenance-has-more is true you have a prefix of the log; narrow the date
range or the scope instead.
RecordID is optional, and leaving it off asks a different question. Omit it and you get a
whole-chain verification, genesis to tip - which is what a "verify this log" button wants, and what
you need when you hold no record id. Supply one and you additionally get that record's own digest
recomputed. A supplied id must be the 12-digit zero-padded sequence the platform assigned; a
malformed one is rejected rather than treated as "verify everything", because a typo must never come
back as a clean bill of health.
verify returns independent verdicts, and the differences matter. Valid is this record's digest,
recomputed and compared - and it is null when you did not name a record, because nothing was
recomputed. It is never true in that case: that would claim a check that never ran. ChainValid is
the whole container's chain. A valid record on a broken chain - Valid: true with
ChainValid: false - is a real state, and usually the one an auditor cares about most. Empty tells
you whether there was anything to check at all: ChainValid: true with Empty: true means the
container is unwritten or does not exist, not that everything checks out. BrokenAt identifies the
first bad link, ForkDetected flags a split chain, and Reason puts the verdict in words.
A whole-chain verify reads every record in the container and recomputes every digest. It is authoritative, and it is not cheap - it is a deliberate action, not something to poll.
The key must be left out, not blanked: a RecordID sent as "", null or 0 is a 400, because it looks like a
variable that did not get filled in. An unknown record is 404 "Record not found".
The answer also carries Checked (how many records the verdict walked, so a pass over none reads differently from
a pass over ten thousand), Target (which container was verified, in the body here rather than in a header),
Head (the newest record's RecordID and Hash on a whole-chain verify, and null on a record-scoped one or
an empty container) and Range. Two runs that quote the same Head verified the same chain state.
fromSequence and toSequence on the query string limit a verify to a window. That verdict is a segment proof,
not an inclusion proof: it says the records in the window link to each other and to the one below it, and it
cannot say the window reaches the chain head. Range is echoed back for that reason, and is null for a
genesis-to-tip verify. A fromSequence above toSequence is a 400.
Corrections (documented edits, original always preserved):
POST /ox-api/provenance/amendments- create a correction (reason + before/after,ScopeKeyin the body); pending or applied depending on whether approval is required.GET /ox-api/provenance/amendments- query corrections (scopeKey,entityId,entityType,reasonCategory,amendedBy,status, dates,limit,offset). A decided correction keepsStatuspendingand carriesDecisionandDecisionRecordID;statusmatches the decision.GET /ox-api/provenance/amendments/chain?entityId=...- the full correction chain for one record, oldest first, ordered by chain link rather than by timestamp (scopeKeyrequired).GET /ox-api/provenance/reason-categories- the configurable reason list, workspace-wide and unscoped (defaults includedata-entry-error,transcription-error,recalculation,delayed-entry, and others).POST /ox-api/provenance/amendments/{id}/approve- approve a pending correction (a second person, when two-person approval is on;scopeKeyon the query string).POST /ox-api/provenance/amendments/{id}/reject- reject one, with a reason.
Signatures (a person's recorded sign-off on one provenance record, on its own chain in the
DomainSignatures container of the scope):
POST /ox-api/provenance/signatures/check- may this person sign now? Asked before the record is shown.POST /ox-api/provenance/signatures/step-up- ask for a signing challenge, for an app that writes the record after the login.POST /ox-api/provenance/signatures- sign a record.POST /ox-api/provenance/signatures/batch- sign a list of records with one login.GET /ox-api/provenance/signatures- read the signatures about a record, an entity or a ceremony.GET /ox-api/provenance/signatures/certificate- a printable certificate of those signatures.GET /ox-api/provenance/signatures/seal-keys- the public keys that check each signature's seal.GET /ox-api/provenance/signature-meanings- the meanings this workspace accepts.GET /ox-api/provenance/signature-events- the newest signature event deliveries.
Signature event subscriptions have no route: a person sets them in Cloud -> Provenance -> Signature events. How a signature is made, step by step, is in Sign Records from Your App.
A signing refusal answers its status with { "Code": "<code>", "error": "<what happened and how to fix it>" },
plus the fields named for that code below. Nothing is written, and each refused signing is recorded in the
workspace's AccessControl history. Do not renew the person's token on a signing refusal: a renewal could turn a
refusal into a signature the person did not make.
May this person sign now? POST /ox-api/provenance/signatures/check with { "Meaning": "Approval", "TargetType": "DomainEvents" }, before your app writes or shows the record. It needs no record and no digest, and it
writes and spends nothing, so ask as often as you need. It needs Workspace.Provenance.Sign. The OK is 200:
{
"Allowed": true,
"Meaning": "Approval",
"TargetType": "DomainEvents",
"ProofForms": ["Nonce", "Challenge"],
"Login": {
"Authority": "<your login system>",
"ClientID": "<the client to log in with>",
"Scopes": ["openid", "profile"],
"Prompt": "login",
"MaxAgeSeconds": 900
}
}
Login is the login to run against your login system: always prompt=login, and max_age set to
MaxAgeSeconds, the freshness window for this meaning (15 minutes unless the workspace sets another window; a
meaning can only shorten it). ProofForms lists the forms the sign route takes, preferred
first.
| Status | Code | When |
|---|---|---|
| 401 | none | No signed-in identity |
| 403 | SIGNER_NOT_A_PERSON | The caller is not a person. Reason names which: CONNECTED_APP, APP_SIGNER, DELEGATED_AI or SWAPPED_TOKEN |
| 403 | JOB_SIGNATURE_REFUSED | An automated job asked |
| 403 | ACCESS_RIGHT_REQUIRED | The person does not hold Workspace.Provenance.Sign. Carries MissingRights and a Remedy |
| 403 | SIGNER_LOGIN_NOT_TRUSTED | The person did not come through the API door on a login from the workspace's signing App Identity (an OpenX sign-in, or another App Identity's login) |
| 400 | none | Meaning or TargetType is missing, or TargetType is not a container |
| 400 | SIGNATURE_MEANING_NOT_CONFIGURED | The meaning is not one of this workspace's. Carries submitted and allowed |
| 409 | PROVENANCE_NOT_PROVISIONED | Provenance is not set up |
| 409 | STEP_UP_PROVIDER_UNAVAILABLE | The workspace's login system is not ready to sign in with |
Sign a record. The body has Pointer, SignatureMeaning, DisplayedDigest and Proof; CeremonyID only to
join a ceremony that already exists; and an optional Comment from the signer (up to 1000 characters), kept on
the signature.
{
"Pointer": { "ScopeKey": "study-7", "Target": "DomainEvents", "RecordID": "000000000042" },
"SignatureMeaning": "Approval",
"DisplayedDigest": "<the SHA-256 digest of the record, as your client showed it>",
"Proof": {
"IdToken": "<the ID token from the person's login>",
"Salt": "<the salt the nonce was made with>"
}
}
Proof is the person's own login, made for this record and meaning, in one of two forms, never both:
- Nonce form,
{ "IdToken", "Salt" }: your app worked out the login's nonce withcomputeSigningLoginNoncefrom@o-industrial/commonover the workspace, the record, its digest, the meaning and a salt of at least 16 random bytes (base64url, no padding). OpenX works the nonce out again from its own digest of the record, so a login made for one record or meaning signs no other. - Challenge form,
{ "IdToken", "ChallengeID" }: the login's nonce is a signing challenge fromstep-up(below), for an app that writes the record after the login.
OpenX checks that the ID token comes from the login system this workspace trusts for signing, with its public keys; that its nonce is the one for this signature; that the login is inside the freshness window; that it is the signer's own; and that it has not signed before. Each login signs once. The signature records the signer's printed name (and title, when the login gives one), the login system, the signer's id there, the calling app, the proof form and the login time, all from the verified token and never from the body.
A signature with no Proof is refused 401 and nothing is written. Today that answer is the older
REAUTH_REQUIRED re-authentication, which is being retired for signatures and is not described here; from wave 3
of the signing rollout it is PROOF_REQUIRED. Sign with a Proof.
Pointer is a tuple: Target and RecordID are both required, because the same RecordID exists in every
container of a scope (the first is always 000000000000), so a bare id is a 400. The scope comes from
Pointer.ScopeKey or the scopeKey query parameter, and a scope is required. The signer, the time, the digest
bound and the rights the signer held are all set by the server from the session. A SignedBy, SignedAt,
BindingDigest, GrantedRights, RecordID, PreviousHash or Hash you send is ignored, never honoured and
never a 400. DisplayedDigest is compared and then discarded; it is not stored. The answer is 201 with the stored
signature, including its CeremonyID (a new one unless you joined one), the EntityType and EntityID of the
record, and the Meaning.
The digest check, and the 409. The server computes its own SHA-256 digest over the stored record and compares
it with the DisplayedDigest you sent. If they differ, the answer is 409, and no signature is written:
{
"Code": "SIGNATURE_DIGEST_MISMATCH",
"error": "The record changed between render and signing. No signature was written. Re-read the record and sign again.",
"Expected": "<the server's digest>",
"Displayed": "<the digest you sent>"
}
This is the point of the route: it detects a record that changed between the moment the signer saw it and the
moment they signed it, so a signature never attests a state that did not exist. Re-read the record and sign again.
Joining a ceremony with the same CeremonyID and an equal digest is what shows two signers signed the same
content.
The other refusals:
| Status | Code | When |
|---|---|---|
| 401 | none | No signed-in identity. Checked before the body is read, so a caller learns nothing about whether it was well formed |
| 403 | JOB_SIGNATURE_REFUSED | An automated job cannot sign. A signature is a person's act |
| 400 | none | Pointer without Target and RecordID, no DisplayedDigest, no SignatureMeaning, or no scope |
| 400 | SIGNATURE_COMMENT_INVALID | Comment is not text of at most 1000 characters |
| 400 | PROOF_MALFORMED | Proof is not IdToken with either Salt or ChallengeID, or the salt is under 16 bytes |
| 400 | SIGNATURE_MEANING_NOT_CONFIGURED | The meaning is not one of this workspace's. Carries submitted and allowed |
| 404 | none | The record to sign is not in the target container |
| 409 | SIGNATURE_DIGEST_MISMATCH | The record changed after it was shown (above) |
| 403 | TWO_PERSON_SAME_SIGNER | With two people required, this person already signed the ceremony or the record |
| 409 | TWO_PERSON_DIGEST_MISMATCH | The ceremony being joined was opened on another record |
| 403 | PROOF_NOT_FROM_LOGIN_SYSTEM | The ID token is not from the login system this workspace trusts for signing, or does not verify. TokenCode says why |
| 403 | LOGIN_NOT_FOR_THIS_RECORD | The login was made for another record, meaning, list or challenge |
| 401 | LOGIN_TOO_OLD | The login is older than the freshness window |
| 403 | LOGIN_NOT_THE_SIGNER | The login is another person's |
| 403 | PROOF_HAS_NO_NAME | The ID token carries no name. Claim names the claim to turn on |
| 409 | LOGIN_ALREADY_USED | This login already signed |
| 401 | CHALLENGE_EXPIRED | The signing challenge ran out, or is not known |
| 409 | CHALLENGE_SPENT | The signing challenge already signed, or a signature using it is being written now |
| 503 | SIGNATURE_SEAL_UNAVAILABLE | The workspace's Key Vault could not seal the signature. Try again |
From wave 3 the sign route also refuses, as the check does: 403 SIGNER_NOT_A_PERSON with its Reason, 403
SIGNER_LOGIN_NOT_TRUSTED for a login that is not from the workspace's signing App Identity, and 403
SIGNING_APP_IDENTITY_NOT_SET while the workspace has not picked one in Cloud -> Provenance -> Signing.
A first signature in a scope builds the scope's signature storage, so it is slower than the ones after it.
Sign a list. POST /ox-api/provenance/signatures/batch signs several records the person was shown as
one list, under one login. It needs Workspace.Provenance.Sign.
{
"Items": [
{
"Pointer": { "ScopeKey": "study-7", "Target": "DomainEvents", "RecordID": "000000000042" },
"DisplayedDigest": "<the digest you showed>",
"Meaning": "Approval"
}
],
"Proof": { "IdToken": "<the ID token>", "Salt": "<the salt the batch nonce was made with>" }
}
Items holds 1 to 256 records, all in one scope, with no record and meaning listed twice. One Proof covers the
list: in the Nonce form its nonce is computeSigningBatchNonce over the workspace and every item (target type, record
id, the record's digest, the meaning), in any order; in the Challenge form it is a signing challenge asked for with
exactly this list (below).
The answer is 201 { "BatchID", "BatchManifestDigest", "Records" }, the signatures in the order you sent them. A 202
{ "Code": "PROVENANCE_BATCH_FINISHING", "BatchID", "Landed", "Pending" } means every signature is sealed and
accepted and OpenX is finishing the chain exactly as sealed: do not send the list again. A 503
PROVENANCE_BATCH_PENDING (an earlier batch in the scope is still landing) or PROVENANCE_BATCH_JOURNAL_UNAVAILABLE
wrote nothing and spent no login: send the list again shortly.
It is all or nothing. A refusal about one item names it by its Index in Items: a meaning the workspace does not
list (400 SIGNATURE_MEANING_NOT_CONFIGURED, with submitted and allowed), a record that is not there (404), a
record that changed after it was shown (409 SIGNATURE_DIGEST_MISMATCH, with Expected and Displayed), and the
two-person refusals when the item's meaning asks for two people. Nothing is written. A proof made for another list
answers 403 LOGIN_NOT_FOR_THIS_RECORD, so a proof for records A and B cannot sign A, B and C; the same login again
answers 409 LOGIN_ALREADY_USED. The login must be inside the shortest freshness window of the meanings in the list,
or the answer is 401 LOGIN_TOO_OLD. The caller is checked as for one signature (a job is refused, the right to
sign), and a vault that cannot seal is 503 SIGNATURE_SEAL_UNAVAILABLE with the login still unused. One login is
spent. Each signature opens its own ceremony (to join a ceremony that exists, sign that record on its own) and
carries ProofForm Batch, the BatchID and the BatchManifestDigest: the lowercase hex SHA-256 of the canonical
JSON of the workspace, the scope and the sorted items with their digests, with no salt.
Read signatures. GET /ox-api/provenance/signatures needs a scopeKey and one of three ways in, each on its
own: targetType with targetRecordId (the record attested), entityType with entityId (the entity signed
about), or ceremonyId (every signature joined to one ceremony). Each pair travels whole, so half of one is a
400, and a request that names none of the three is a 400. targetRecordId must be the 12-digit zero-padded
sequence, because a malformed id would match nothing and an empty answer reads as "nobody has signed this". A
targetType that is not a known container is a 400. Filters that are present all apply, and limit,
offset, fromSequence and toSequence behave as they do on the activity log. The answer is a JSON array of the
whole stored records, newest first, with the same three headers as the activity log: x-provenance-scanned,
x-provenance-has-more (if it is true, you are holding a prefix, and must not present it as complete) and
x-provenance-target, which is always DomainSignatures: a target query parameter cannot point this read at
another chain. A record with no signatures is 200 with an empty array. There is no
route that verifies a signature's chain.
Meanings. GET /ox-api/provenance/signature-meanings answers { "meanings": [...], "configured": true|false }.
Read it rather than hard-coding the list: it is the same source the sign route validates against.
configured is false while the workspace still has the platform's default list, which is Review,
Verification, Approval, Authorization, Responsibility and Authorship. A workspace that has not set up
Provenance answers 409 PROVENANCE_NOT_PROVISIONED.
A certificate. GET /ox-api/provenance/signatures/certificate reads the signatures exactly as
GET /ox-api/provenance/signatures does: the same scopeKey, the same three ways in (ceremonyId, targetType
with targetRecordId, or entityType with entityId), the same 400s and paging. It answers a printable page
(text/html) with one section per signer: the printed name, title, account, meaning, time in UTC, the record type
and id, BindingDigest, the link status (Intact, Changed, RecordMissing or NotChecked, checked again on
this read), the seal key and its verdict (Valid, Invalid, Unsealed or NotChecked), the proof form, the login
time and methods, the login system, the calling app, the comment, and the list for a signature made in a batch. A
field the signature does not carry prints as "not recorded", never filled in. Everything is text: no image of a
signature, and the page loads nothing else and runs no script, so your app may embed or print it. Add
format=json for the same certificate as JSON, with a field the signature does not carry left out. It needs
Workspace.Provenance.Read.
Seal keys. GET /ox-api/provenance/signatures/seal-keys answers { "Keys": [{ "KeyID", "Algorithm", "PublicKey" }] }: every version of the key in the workspace's own Key Vault that seals signatures, newest first,
each PublicKey a JWK. A signature's LinkSealKeyID names the version that sealed it. With the public key anyone can
check a seal without OpenX: ES256 over the canonical JSON of the signature's BindingDigest, CeremonyID,
Meaning, SignedAt, SignedBy, TargetRecordID and TargetType. Keys is empty before the first sealed
signature, and a vault that cannot be read is 503 SIGNATURE_SEAL_UNAVAILABLE. It needs Workspace.Provenance.Read.
The offline command that checks a whole export is in
Verify Without Us.
Signature event deliveries. GET /ox-api/provenance/signature-events answers
{ "Deliveries": [{ "EventID", "Type", "Hook", "State", "Attempts", "LastStatus"?, "LastError"?, "OccurredAt", "UpdatedAt" }] }, newest first: one entry per event sent to one subscription. Type is Signed, Refused or
LinkChanged. State is Retrying between attempts, Delivered on a 2xx answer, and DeadLetter once every
attempt has failed; a dead letter is not sent again. LastStatus is your receiver's last HTTP status, and
LastError says in OpenX's words why the last attempt failed. Hook is the subscription's name, never its address,
a header or the secret. It needs Workspace.Provenance.Read. What a delivery carries, and how to check its
signature, is in Sign Records from Your App.
A signing challenge. For the Challenge form, your app asks before the login, with
POST /ox-api/provenance/signatures/step-up and the body
{ "Signing": { "Meaning": "Approval", "TargetType": "DomainEvents", "TargetRecordID"?: "000000000042" } }. Name
the record when you know it. The answer is 200:
{
"ChallengeID": "<64 lowercase hex characters>",
"ExpiresAt": "<when it runs out>",
"Binding": {
"Meaning": "Approval",
"TargetType": "DomainEvents",
"TargetRecordID": "000000000042"
},
"Login": {
"Authority": "...",
"ClientID": "...",
"Scopes": ["..."],
"Prompt": "login",
"MaxAgeSeconds": 900
}
}
The challenge is bound to the signer, the meaning, the target type and the record when named. Run Login with the
ChallengeID as the nonce, do your write, then sign with "Proof": { "IdToken": "...", "ChallengeID": "..." }. A
challenge signs once and is spent with that signature; used for another meaning, target type or record it is
refused LOGIN_NOT_FOR_THIS_RECORD, and a second time CHALLENGE_SPENT. It is never a grant to sign again.
For a list, ask with { "Signing": { "Items": [{ "TargetType", "TargetRecordID", "Meaning" }] } }, the same items
you will post to batch; the challenge then signs exactly that list, once.
OpenX's own windows also use step-up, with a Purpose, to ask for a fresh sign-in before an act such as turning
off a data store's delete protection. That fresh sign-in covers one use of that act and never signs a record.
Data stores
Endpoints for the CosmosDB accounts your workspace provisions and owns (see
CosmosDB Setup). The account's credentials are resolved on the
server; no key for the account is supplied on any call. Each route needs the data-store access right it names in
GET /ox-api/openapi, and a caller without it is 403 DATA_STORE_RIGHT_MISSING.
List what is in an account - GET /ox-api/data-stores/{lookup}/containers
{lookup} is the data store's lookup, not a database's. The list is read from Azure, so it is what is
provisioned, not what the workspace has declared: a container made outside the workspace still appears, with
Declared: false. A container the workspace declared but Azure does not hold does not appear.
{
"Listed": true,
"Containers": [
{
"DatabaseLookup": "ops",
"DatabaseName": "ops",
"ContainerName": "readings",
"PartitionKeyPath": "/deviceId",
"DataClass": "operational",
"Declared": true
}
]
}
Listed is the point of the shape. Listed: true with an empty Containers means the account really is empty.
Listed: false means OpenX could not look, and carries a Code and a Reason in place of Containers: it is
never an empty list. The codes are STORE_NOT_FOUND (404), and, with status 200, CREDENTIAL_UNAVAILABLE,
RESOURCE_GROUP_MISSING, TOKEN_UNAVAILABLE and UNREACHABLE. This is a read of the account's control plane:
a green answer does not mean the document routes below will work, which also needs the data-plane grant (see
Data stores troubleshooting).
Documents - the table path is the document collection, with no /documents segment:
GET /ox-api/data-stores/{store}/databases/{database}/tables/{table}
POST /ox-api/data-stores/{store}/databases/{database}/tables/{table}
GET /ox-api/data-stores/{store}/databases/{database}/tables/{table}/{documentId}
PUT /ox-api/data-stores/{store}/databases/{database}/tables/{table}/{documentId}
DELETE /ox-api/data-stores/{store}/databases/{database}/tables/{table}/{documentId}
The path names a store and a database that have to agree, a single-document call takes the partitionKey query
key unless the table is partitioned on /id, and the refusals come in a fixed order. The whole of it, with every
code, is Database Table Endpoints. Containers are made and removed
in the window and by proposal, not by this API: there is no route that creates or deletes one.
API Sources: Pull Now
POST /api/workspaces/api-sources/{lookup}/pull - runs one poll of an API Source
now, as the Pull Now button does: it calls the source's endpoint, applies its Response Mapping and forwards
the result to the data connection that points at the source.
Not an
/ox-apiroute. It sits under/api/workspaces/on your workspace host, so it is not inGET /ox-api/openapiand not in the API Manager's route list. It is an action on a source you already configured, not a platform route. The API Manager's API Sources tab shows each source's route with a cURL and a TypeScript snippet, once the workspace has an API source.
{lookup} is the source's lookup. Send the same header as the snippets do, and no body:
curl -X POST 'https://openx.fathym.com/api/workspaces/api-sources/<lookup>/pull' \
-H 'Authorization: Bearer <YOUR_JWT_TOKEN>' \
-H 'Accept: application/json'
The answer is { success, data, rawResponse, latencyMs, error, forwarded }:
| Field | Holds |
|---|---|
success | true when the source answered with JSON and, if a connection points at the source, the data reached it |
data | The result after the Response Mapping |
rawResponse | The source's own JSON, before the mapping |
latencyMs | How long the pull took |
error | The reason, when success is false |
forwarded | true when the data reached the data connection that points at the source |
A pull that reached the source but failed (an error status from it, a reply that is not JSON, an address OpenX will
not fetch, or data that did not reach the connection) answers 200 with success: false and the reason in
error, so check success, not the status. A failed pull is also a red entry in the Live Stream. A successful one
adds none of its own: the forwarded data shows as the connection's entry.
| Status | When |
|---|---|
200 | The pull ran. Read success |
400 | The source has no endpoint, or its settings are not valid |
404 | No API source with that lookup |
503 | The source's credentials could not be read from the workspace's vault for this pull |
The endpoint must be one OpenX can treat as public: https, no user name or password in the address, a public
host, no redirect, and a JSON answer, and the pull gives up after 15 seconds. A refused address answers 200
with success: false and an error that starts with an OUTBOUND_ code, for example OUTBOUND_HOST_NOT_PUBLIC.
A source that runs on a schedule is polled by its Azure Function, not by this route; the route is for pulling by hand, from your own code or a test.
Reading the workspace
GET /ox-api/workspace reads this workspace's configuration as stored, with every secret left out. Over MCP it is
the read behind get_workspace, and
call_api can call it as GET /workspace. It reports what is stored, not
what is deployed. It answers 200:
| Field | What it holds |
|---|---|
EaC | The workspace as stored. A stored credential reads back as its $secret: reference, or as a redaction marker if it was saved in the clear. A cloud's subscription, tenant and billing ids read as a stable code for this workspace, never as stored |
ClearFields | The paths, as Collection.field, of credentials that were stored in the clear. Paths only, never a value |
Withheld | The parts of the workspace left out for the rights the caller holds. Only a key, a job or a connected AI gets it; a signed-in person reads the whole workspace, below |
NotSetUp | What is on but waits on a set-up step, below. Always present, an empty list when nothing waits |
HiddenRoutes | The routes the caller could call but that wait on a set-up step, below. Always present, an empty list when nothing waits |
CloudStatus | The state of each connected cloud's key, as it was last checked (at most five minutes ago). See get_workspace |
Who may read it
A connected AI reads with its card in the workspace. Any other caller through the /ox-api door, a key or a job,
needs the Workspace.Access.Manage right, and is refused with OXAPI_SCOPE_REFUSED without it.
Rights narrow what you read
A key, a job or a connected AI reads the basics, every part no read rule covers, and the parts its rights cover.
Each part it is not covered for is left out of EaC and named in Withheld:
| Field | Meaning |
|---|---|
Kind | The part left out, such as DataConnections |
Needs | The rights that cover it |
Mode | all when the key needs every one of Needs, any when one is enough |
Reason | In plain words: the connection does not carry those rights, and the part is not empty |
A part left out is not an empty part: read Withheld before you conclude the workspace holds none. This route names a
part only when the workspace holds records of it. If the caller's rights could not be read, every part with a read
rule is left out. get_workspace limits the same way, by the same code, and also names a part you ask for in
kinds.
What is not set up yet
Some capabilities are on but hide their routes until a set-up step is done. The workspace read lists them in two places. Both are present and empty when nothing is waiting:
| List | What it holds |
|---|---|
NotSetUp | Each active kind that hides routes, once per kind and Code: Kind, Code, Reason, Remedy and, where there is one, Requires. The same for every caller, not narrowed by rights |
HiddenRoutes | The hidden routes whose required rights the caller holds: Method, PathTemplate, Category, Owner, and the same Code, Reason, Remedy, Requires. A route needing a right the caller does not hold is not listed |
A hidden route is left out of the OpenAPI spec. Called anyway, it answers 409 in its owner's
words, the same Code, Reason, Remedy and Requires as its HiddenRoutes entry, in a body that also holds
them as one error sentence: see A route that is not set up yet. Do the set-up
step the Remedy names and read again: the entry is gone once the step is done.
Authentication
Every /ox-api endpoint takes a Bearer JWT; which one is on Auth & Tokens.
The API Keys window makes its key with a route of the workspace window's own, which needs your signed-in
session rather than a key.
Internal route. This is the route the workspace window uses. It is not part of
/ox-api, not a public API, and may change.
GET /workspace/api/keys/jwt?minutes=60&scopes=...
| Query key | Meaning |
|---|---|
minutes | Lifetime in minutes (expMinutes also works). Default 60, at most 90 days (129,600). Not a number, or above the maximum, is 400 MINUTES_INVALID; a value of zero or less makes a one-minute key |
scopes | A comma-separated list of the rights the key carries. Left out, it carries every right you hold. Present but empty is 400 SCOPES_EMPTY |
A key never carries more than your own rights, and never the platform-administrator right, which stays with a
signed-in session. It answers { Token, jti, ExpiresAt }
only once its record is written, so a key can always be listed and revoked. No session is 401 SESSION_REQUIRED.
GET /workspace/api/keys/api lists your keys, and DELETE /workspace/api/keys/jwt/{jti} revokes one.
The OpenAPI spec
GET /ox-api/openapi - the full OpenAPI 3.1 spec for your workspace, filtered to your access rights
(you see only the endpoints you can call). The in-product API Manager is this spec made browsable,
with a Try-Me and ready-to-copy snippets.
Responses and errors
A successful query returns its outputs, as set out under Warm queries. Errors come back as an envelope:
{ "HasError": true, "Messages": { "Error": "Warm query \"x\" was not found..." } }
Status codes are set where applicable, and a route's own pages name its own codes:
| Status | Means | What to do |
|---|---|---|
400 | Invalid input, for example no saved query text | Read the message: it names the field or key, and a named Code where there is one |
401 | Missing or invalid token | Check the token and its expiry, and make a new one if it expired |
403 | Outside your access rights | See which right is missing (MissingRights) and ask someone who can grant it |
404 | Not found | Check the lookup or path |
409 | The state does not allow it, such as approving a record that is not pending, or a capability is not set up | Read the message and the Remedy: they name the state, or the step to set up first, for example Provenance, or IoT for a telemetry query |
500 | Server error | Try again; if it keeps happening, tell Fathym what you called and when |
503 | The api could not read or reach something it needs, such as your workspace | Try again shortly |
Changed 2026-10-22: a refusal that means "a capability is not set up" (TELEMETRY_REQUIRES_PRIVATE_IOT,
PROVENANCE_NOT_PROVISIONED, CALZ_NOT_PROVISIONED, CLOUD_NOT_CONNECTED, a kind that is not active such as
PRIVATE_LANDING_ZONE_REQUIRED, COLD_CAPTURE_INCOMPLETE, COLD_CLOUD_UNUSABLE,
ARCHIVE_DESTINATION_MISSING) now answers 409, not 503, with the same body and a Remedy. The status
moved; the Code did not. If your app branched on 503 for one of these, branch on the Code instead.
503 stays for "could not read or reach" (WORKSPACE_EAC_UNAVAILABLE, COLD_CAPTURE_READ_FAILED).
A route that is not set up yet
A route your workspace has not set up yet is left out of the OpenAPI spec. If a caller finds the
address elsewhere and calls it anyway, the answer is 409, in the words of the part of OpenX that owns the route:
{
"error": "Telemetry is read only from the workspace's own analytics database, and this workspace does not have one yet. Deploy IoT in the Data Fabric window. The new database starts empty, and every device gets a new key when its data connection moves: re-flash each device with its new Device ConnStr (primary) from Inspector → Connection Info.",
"Code": "TELEMETRY_REQUIRES_PRIVATE_IOT",
"Reason": "Telemetry is read only from the workspace's own analytics database, and this workspace does not have one yet.",
"Remedy": "Deploy IoT in the Data Fabric window. The new database starts empty, and every device gets a new key when its data connection moves: re-flash each device with its new Device ConnStr (primary) from Inspector → Connection Info.",
"Requires": ["IoT"]
}
| Field | Meaning |
|---|---|
Code | The stable name of what is missing. Branch on this, not on the sentences |
Reason | Why the route cannot answer yet |
Remedy | What to do next, naming the window |
Requires | The record kinds still missing, in the order they are set up. Absent when the owner names none |
error | The Reason and the Remedy as one sentence pair |
Rights are checked first. A caller who lacks a right the route needs is refused 403, and so learns nothing about
whether the route is set up. The same answer comes from every way in: the /ox-api door, an AI calling through
MCP, and OpenX's own pages. Do the step, call again: there is nothing to clear on the caller's side. The API Manager
lists what is waiting under Not set up yet.
The route that lists what is waiting, and the routes you could call but it hides, is Reading the workspace.
A refusal at the door comes back differently. A 401 is always the same plain
{ "Message": "This request could not be authorized." }, whatever the reason, and a 403 for a missing right
carries Code: OXAPI_REQUIRED_RIGHTS_MISSING and the MissingRights. Every door refusal is on
API refusals.
Limits
A draft run is bounded (10,000 rows a step, 30 seconds, a 100-row preview). A saved query's run keeps the engine's limits: 250,000 rows a step and about 200 seconds. Only a cold-data export has no cap. There is no per-request rate limiting today.
On fathym.com: OpenX →