Querying
Common query parameters for list/detail on registered objects.
Pagination
| Parameter | Default | Note |
|---|---|---|
limit | 20 | Max: mxheadless_max_limit (100) |
offset | 0 | Max: mxheadless_max_offset |
page | - | Alternative to offset. Do not combine with offset (422) |
In meta: total, count, limit, offset, has_more. In links: self, next, prev when applicable.
Fields
fields=id,pagetitle,uriMax fields: mxheadless_max_fields (50). Unknown or forbidden field → 422.
Filter
Simple forms:
filter[published]=1
filter[parent]=5
filter[pagetitle][like]=newsOperators depend on the definition (eq, like, gt, …). Only registered filterable fields.
Sort
sort=menuindex
sort=-createdon
sort=parent,-idA leading - sorts DESC.
Search
?q=installationQueryParser builds LIKE %term% over fields from searchable in the definition. For core resources: pagetitle, longtitle, description, introtext, alias, uri. Fields are ORed.
A short term may return many rows. Narrow with filter. Empty searchable list → 422 Search not supported. Field list: Schema.
Includes
include=template,tvsLimits: mxheadless_max_include_relations (10), mxheadless_max_include_depth (2). Relation names come from schema.
Context
?context=web
X-Context: webThe header works better with caches. When omitted, the bootstrap context applies (mxheadless_context, default web).
The mxheadless_allowed_contexts whitelist (default web,mgr) limits allowed values. Catalog and settings: Elements and Contexts.
Preview / deleted
?preview=true
?include_deleted=1Requires matching permissions. Details: Preview, Authorization.
