← API reference
SCHEMA VIEW

Reporting

Ad-hoc MicroSQL reporting queries and their schema description.

Open workbench ↗Download SDL ↓AI context →

41 operations · complete schema 80 KB

Query

magicQuery

Executes a Magic Query string and returns the predefined query's JSON result. On a bad noun or parameter, returns a structured error whose 'extensions' carry 'code', 'actionable_message', and 'suggestions' for self-correction.

→
Query

getMagicQuerySchema

Returns the input JSON Schema and output introspection for a Magic Query noun, so consumers (especially LLMs) can learn its contract before calling magicQuery.

→
Query

listMagicQueries

Lists every available Magic Query noun with a short description and its options — the discovery entry point.

→
Query

getMagicQueryGraphQL

Resolves a Magic Query string to the real GraphQL operation and variables it runs, so consumers can graduate from the façade to raw GraphQL. Does not execute.

→
Query

listDataChangeEventTopics

List all valid data change event topics, grouped by resource. Requires authentication.

→
Query

generateDefaultDataQuery

Generate a default GraphQL data query for an event topic. Returns a query string with all scalar fields for the resource, or null if the topic has no matching query. The query uses $id as the variable for the resource ID.

→
Query

ping

Health check endpoint

→
Query

iacSchema

The infrastructure-only view of this schema, for declarative tooling. Contains only annotated resources and the types they reach.

→
Query

iacValidate

Validate an infrastructure artifact. Pure and side-effect free; safe to alias many times in one document.

→
Query

iacGuides

Every authoring guide, for a tool that syncs them to a folder. Intended for `schema pull` to call once and write to disk, not for an agent to call while authoring — a file can be grepped and re-read in part, where a response arrives whole.

→
Query

helpChapters

List human-facing manual chapters from the running deployment.

→
Query

helpChapter

Read a chapter of the current published manual edition.

→
Query

searchHelp

Search human-facing manuals using shared semantic and text retrieval.

→
Query

schemaAuthoringCatalog

Compiler-owned vocabulary for the standalone XML JSON Schema dialect, including native form annotations.

→
Query

compileSchemaXML

Compile standalone XML schema syntax into JSON Schema without persisting it; host restrictions apply when embedded.

→
Query

renderSchemaXML

Render JSON Schema as native XML without dropping unsupported keywords or changing a saved document.

→
Query

iacSchemaDocument

Fetch the JSON Schema document a SCHEMA-kind validator references, for declarative tooling.

→
Query

sqlAuthoringSchema

Permission-filtered MicroSQL authoring metadata and its content version. Contains logical schema only, never physical database mappings.

→
Query

reportQuery

Execute a MicroSQL reporting query against the analytics schema. Supports SELECT with WHERE, JOIN, ORDER BY, GROUP BY, LIMIT. Tenant isolation is enforced automatically. Covers production (jobs, components, operations, milestones), prepress, scheduling (work_centers, planned_operations, schedule_allocations), sales (estimates, orders, invoices), cost accounting, catalog/inventory (products, substrates, warehouse_stock), logistics (shipments), tasks, time-series (metric_points, progress_points), and people (users, teams). Per-table IAM authorization is enforced — requires :list on each table's resource.

→
Query

describeQuerySchema

Analyze a MicroSQL query and return the inferred result schema (column names, data types) without executing it. Returns validation errors with typo-correcting suggestions if the query is invalid. Validates only against tables the caller can list.

→
Query

reportSchedules

List schedules pinned to a report version.

→
Query

reportOccurrences

List recorded firings of a report schedule.

→
Query

getReport

Read a report and its draft metadata by ID.

→
Query

listReports

List reports in a cursor-paginated page.

→
Query

reportVersion

Read an immutable report version by ID.

→
Query

reportVersions

List published versions of a report.

→
Query

validateReport

Check a report definition without saving or executing it.

→
Query

reportRun

Read the progress and outcome of a report run.

→
Query

reportRuns

List report runs, optionally restricted to a published version.

→
Query

reportArtifacts

List retained output files for a report run.

→
Mutation

previewReport

Queue a preview execution of an inline report definition.

→
Mutation

runOneShotReport

Execute an inline report definition without publishing a reusable report.

→
Mutation

retryReportRun

Queue another attempt of a failed report run.

→
Mutation

archiveReport

Archive a report from active authoring.

→
Mutation

upsertReportSchedule

Create or update a report schedule.

→
Mutation

pauseReportSchedule

Pause future firings of a report schedule.

→
Mutation

upsertReportDraft

Create a report or replace its editable draft.

→
Mutation

publishReport

Validate and publish the current draft as an immutable version.

→
Mutation

runReport

Queue a run and return its durable ID immediately. Poll reportRun, then download reportArtifacts.

→
Mutation

cancelReportRun

Request cancellation of a report execution.

→
Subscription

dataChangeEvents

Subscribe to real-time data change events. Requires read permission on each requested resource.

→