Skip to content

Magic Query ​

Magic Query is a URI-style façade over the GraphQL schema for non-technical integrators and LLM agents. Pass a short string to magicQuery and it parses, routes to a vetted predefined query, executes it as the calling identity, and returns flat JSON.

Syntax ​

<noun>[#<id>][?<key>=<value>[,<key>=<value>...]]
  • noun — the entity, e.g. jobs (collection) or job (single).
  • #id — required for single nouns, e.g. job#job_01H... — the full TypeID, prefix included; job#01H... is rejected with "Expected type JobID".
  • ?filters — comma- (or &-) separated key=value pairs, e.g. ?limit=10,status=COMPLETED.

Examples: jobs?limit=10,status=COMPLETED · job#job_01H2XYZ... · customers?active=true

Endpoints ​

  • magicQuery(query): JSON — execute; returns the predefined query's data.
  • listMagicQueries: [MagicQueryInfo!]! — every noun + description + options (start here).
  • getMagicQuerySchema(query): MagicQuerySchema — { inputSchema (JSON Schema), outputSchema (introspection) } for a noun.
  • getMagicQueryGraphQL(query): MagicQueryOperation — the { query, variables } a Magic Query resolves to, for graduating to raw GraphQL.

Discovery loop ​

listMagicQueries → getMagicQuerySchema("<noun>") to learn the input options and output fields → magicQuery("<noun>?..."). On a bad noun or filter, the error's extensions carry code, actionable_message, and suggestions ("did you mean") so you can correct the string and retry.

Available nouns ​

NounKindDescriptionOptions
jobsCOLLECTIONPrint/production jobs. Filter by status, name, or tag.limit, after, name, status, tag
jobSINGLEA single print/production job by id.#<id>
customersCOLLECTIONCustomer accounts. Filter by name, email, or active state.limit, after, name, email, active
customerSINGLEA single customer account by id.#<id>
invoicesCOLLECTIONCustomer invoices. Filter by status, kind, customer, or invoice number.limit, after, status, kind, customerId, invoiceNumber
invoiceSINGLEA single invoice by id.#<id>
estimatesCOLLECTIONCustomer estimates/quotes. Filter by status, customer, or estimate number.limit, after, status, customerId, estimateNumber
estimateSINGLEA single estimate/quote by id.#<id>
paymentsCOLLECTIONPayments received. Filter by invoice, method, or currency.limit, after, invoiceId, method, currency
paymentSINGLEA single payment by id.#<id>
contactsCOLLECTIONPeople at customer accounts. Filter by customer, email, or last name.limit, after, customerId, email, lastName, primary
addressesCOLLECTIONPostal addresses. Filter by customer, city, country, or address type.limit, after, customerId, city, country, addressType
addressSINGLEA single address by id.#<id>
businessUnitsCOLLECTIONOrganisational business units. Filter by name, code, or active state.limit, after, name, code, active
businessUnitSINGLEA single business unit by id.#<id>
costCentersCOLLECTIONCost centres within business units. Filter by name, code, unit, or active state.limit, after, name, code, businessUnitId, active
costCenterSINGLEA single cost centre by id.#<id>
usersCOLLECTIONPlatform users. Filter by email, name, or kind (HUMAN/BOT/KIOSK).limit, after, email, name, kind
userSINGLEA single user by id.#<id>
policiesCOLLECTIONIAM permission policies. Filter by name.limit, after, name
policySINGLEA single IAM policy, including its permission statements, by id.#<id>
devicesCOLLECTIONIoT/production devices. Filter by type, manufacturer, network, or active state.limit, after, deviceType, manufacturer, networkId, active
deviceSINGLEA single device by id.#<id>
componentsCOLLECTIONJob components (parts of a job). Filter by job, name, kind, or external id.limit, after, jobId, name, kind, externalId
componentSINGLEA single job component by id.#<id>
operationsCOLLECTIONProduction operations/steps. Filter by job, component, status, kind, or name.limit, after, jobId, componentId, status, kind, name
operationSINGLEA single production operation by id.#<id>
teamsCOLLECTIONTeams of users. Filter by name.limit, after, name
teamSINGLEA single team by id.#<id>
tasksCOLLECTIONWork tasks. Filter by status, type, assignee, assigned team, or priority.limit, after, status, type, assignedUserId, assignedTeamId, priority
taskSINGLEA single task by id.#<id>

Pagination options limit (→ page size) and after (→ cursor) are available on every collection noun in addition to those listed.

Connect machines, automate workflows, and build custom apps for print production.