Unavailable. Nobody can download this version any more, with elm or with the Lamdera compiler: github.com/vanhecke/celmex is gone (deleted or private); Software Heritage not asked yet (this run's --swh-calls were used up); no fork with the same repo name found; no cached copy. Use another version.
XQL: saved queries, available datasets, tenant quota counters, query execution (async start/poll), and lookup-dataset row management.
Epoch-millisecond from/to range inside Dataset.
Saved-query library returned by getLibrary.
A single saved XQL query inside the Library. The live wire
format uses xql_query_name, xql_query, and xql_query_tags for the
query name, body, and tags; OpenAPI-schema field names like name,
query_text, and labels are accepted as fallbacks.
The Cortex tenant returns quota counters as JSON numbers that may carry a
decimal component (e.g. 4015.0), even though the OpenAPI schema documents
them as integers. We decode every quota field as Float so the values survive
roundtripping through the typed decoder without integer coercion dropping the
fractional part.
dailyUsedQuota is not listed in the OpenAPI schema but is returned by the
API in practice — per CLAUDE.md we capture every field the response contains.
POST /public_api/v1/xql/get_datasets
POST /public_api/xql_library/get
Status of an async XQL query. OtherStatus is a forward-compatibility
escape hatch — the documented values are PENDING / SUCCESS / FAIL.
Time window for a query. Relative is a duration in epoch-milliseconds
(e.g. Relative 86400000 = last 24 hours); Range is an absolute
from/to epoch-millisecond window.
Arguments to startQuery. tenants is only meaningful in
MSSP multi-tenant deployments — leave it [] for a single-tenant query.
Arguments to getQueryResults. pendingFlag = Just
False makes the server block until the query completes (subject to the
per-request HTTP timeout); the default Nothing / Just True returns
whatever status the server has right now.
Typed decoding of a get_query_results response. data and streamId
are flattened up out of the nested results sub-object for ergonomic access.
The wire format exposes the per-tenant cost map under query_cost_charged
(not query_cost as the current OpenAPI revision documents) and includes a
remaining_yearly_quota counter alongside the daily remaining_quota — both
are captured here so the typed decoder doesn't silently drop real response
fields.
Arguments to getQueryResultsStream. The
stream_id comes from a prior QueryResults whose result
set exceeded the single-response limit.
POST /public_api/v1/xql/start_xql_query — kicks off an XQL query and
returns the query_id string to poll with getQueryResults.
POST /public_api/v1/xql/get_query_results — fetches the status and (when
ready) results for a previously-started query. If status = Pending, call
again after a short delay; if results exceeded the single-response limit,
continue fetching via getQueryResultsStream
with the returned streamId.
POST /public_api/v1/xql/get_query_results_stream — pulls the tail of a large result set. The response shape is not in the OpenAPI schema (the Cortex API sends it chunked, optionally gzipped) so we pass it through as raw JSON.
Arguments to lookupsAddData. Each row in data
should be an object mapping field names to string values (the lookup dataset
schema enforces per-field types server-side). With keyFields = [] the
server inserts only; with non-empty keyFields the server upserts using
those fields as the identity.
data is Encode.Value because the lookup-dataset schema is user-defined
per dataset; the SDK cannot constrain the shape ahead of time.
Counts returned by lookupsAddData.
Arguments to lookupsGetData. Each entry in filters
is a full object of AND-ed (field, value) pairs; multiple entries OR
together.
Payload returned by lookupsGetData.
Arguments to lookupsRemoveData. filters is a
single AND-ed filter object (not the list-of-objects shape that
lookupsGetData uses).
Row-count returned by lookupsRemoveData.
POST /public_api/v1/xql/lookups/add_data — insert or upsert rows into a lookup dataset.
POST /public_api/v1/xql/lookups/get_data — query rows in a lookup dataset with optional AND/OR-ed filter objects.
POST /public_api/v1/xql/lookups/remove_data — delete rows in a lookup dataset matching the given filter object.
Arguments to libraryInsert. xqlQueries is the
batch to insert or upsert. With override = False the server rejects any
entry whose name already exists; with override = True it upserts. tags
is an optional list of labels applied to every query in the batch.
One row in LibraryInsertArgs.xqlQueries. The
SDK serialises name to xql_query_name and query to xql_query on
the wire.
Outcome of a libraryInsert call. added and
updated are the names of queries the server created or upserted; errors
is the list of per-item rejections ({name, message} pairs the API
returns as [name, message] two-element arrays).
One row in the LibraryInsertResult errors
array — the offending query name and the server's human-readable
rejection reason.
POST /public_api/xql_library/insert — insert or upsert a batch of saved XQL queries.
Selector for libraryDelete. The API rejects any
request that combines names and tags, so the SDK forces callers to pick
one at compile time.
Arguments to libraryDelete.
Outcome of a libraryDelete call. queriesCount is
the number of saved queries the server removed; xqlQueryNames is the
list of names it removed; errors is the list of free-form per-item
failure objects the server flagged without aborting the batch.
POST /public_api/xql_library/delete — remove saved XQL queries by name or by tag.
A dataset available to XQL queries, with its retention ranges and size stats. The wire format uses Title Case Spaced keys ("Dataset Name", "Last Updated", "Total Events", etc.) — not snake_case.
defaultQueryTargetis emitted as a string ("TRUE" / "FALSE"), not a boolean.