Skip to main content
Version: Next

Report Configuration Schema

A Report Builder report is a JSON document. The builder writes it, Statistics Explorer validates, previews and runs it, and agents or scripts can create it directly. This page describes version 1.

The JSON Schema of the format is part of the bundle: src/Resources/schema/report-builder/report-config-v1.schema.json. A report is checked in two passes. The schema validates the structure. A semantic pass then checks every field path against the field catalog of the dataset and checks that operators, functions, groupings and click actions fit the field types.

Where a Configuration Lives​

A Report Builder report is a custom report whose data source configuration holds one entry of type reportBuilder:

{
"dataSourceConfig": [
{
"type": "reportBuilder",
"report": {
"version": 1,
"dataset": { "type": "class", "name": "Car" },
"mode": "list",
"fields": ["name"]
}
}
]
}

Save and read it through the custom report API of Pimcore Studio like any other custom report. The columnConfigurations of the custom report must hold the columns of the result, because the CSV export reads its columns there. The builder maintains them.

Top-Level Properties​

PropertyTypeDescription
versionintegerRequired. Always 1.
datasetobjectRequired. The data the report reads, see Dataset.
modestringRequired. list or summary.
fieldsarrayList mode, required: up to 50 unique field paths.
measuresarraySummary mode, required: 1 to 10 measures.
groupByarraySummary mode: up to 3 group fields.
filtersobjectConditions that all must match.
publishedStatestringData objects and documents: published, unpublished or both (default when left out), see Published State.
showEmptyGroupsbooleanSummary mode: true keeps groups of elements without a value. Default false.
pqlstringAn advanced filter, up to 2000 characters, not blank.
parametersarrayUp to 20 parameters that viewers can change.
sortarrayList mode: up to 5 sort fields.
limitintegerList mode: rows per page, 1 to 1000.
drillarrayUp to 10 click actions.
visualizationstringauto (default), bar, line, pivot or table.
languagestringLanguage of localized fields and labels, for example en or de_AT. Left out: the language of the viewer, who can switch in the view.

A configuration is at most 256 KB (262144 bytes) as JSON. Unknown properties are rejected. Properties of the wrong mode are rejected: fields, sort and limit belong to list mode, measures and groupBy to summary mode.

Dataset​

{ "type": "class", "name": "Car" }
  • type: class, asset, document or events.
  • name: the class name for class, the registered dataset name for events. Omit it for asset and document.

Field Paths​

Fields are addressed by path. The field picker of the builder lists the paths of a dataset, see Fields and Lookups.

PatternExample
Own or system fieldname, fullPath, fileSize
Object brick fieldattributes.Engine.power
Lookup through a relationmanufacturer.country.name
Parent objectparent.orderDate
Classification store keycs:technicalAttributes.3.12
Workflow placeworkflow:product_workflow.place
Asset metadatametadata.copyright
Asset metadata of a relationmainImage.metadata.copyright
Preview of assetspreview, mainImage.preview

preview is a column of list reports that shows the thumbnail of an asset, see Preview.

A path starts with a letter or _ and contains letters, digits, _, - and ., plus one : after the first segment (cs:, workflow:). A path is at most 255 characters.

Names of asset metadata, workflows and event fields with other characters (spaces, :, umlauts) are written with _- and the two hex digits of each UTF-8 byte: the metadata Copyright Notice is metadata.Copyright_-20Notice (the field list shows the label and the path). Fields like these are not available in the advanced filter (PQL).

Preview​

A list column that shows the thumbnail of an asset, as the asset grid of Pimcore Studio does. It is offered, labelled Preview, as:

  • preview in the asset dataset: the thumbnail of each row's asset.
  • <field>.preview for the data's own image, hotspot image, image gallery and asset relation fields, for example mainImage.preview: the first asset of the field in stored order. Relations that allow several element types show the preview only when the related element is an asset. Fields reached through a relation have no preview (manufacturer.logo.preview does not exist).

A preview column is hidden wherever the field it shows is hidden (block list, no permission for assets). It is for list reports only: the save check refuses it in filters, groups, sort and summary mode. The cell is empty for an empty field, for a deleted asset and for an asset the viewer may not view, and no thumbnail URL is sent for those. The CSV export and the MCP tool preview_report give the full path of the asset (empty where the cell is empty), not the thumbnail.

Measures​

{ "fn": "sum", "field": "price", "label": "Revenue" }
  • fn: count, sum, avg, min or max.
  • field: required for every function but count, which takes no field. sum and avg need a number field, min and max a number or a date field. The field belongs to the dataset itself, not to a related object.
  • label: replaces the generated name of the value.

Group By​

{ "field": "creationDate", "bucket": "month", "order": "key", "dir": "asc", "axis": "columns" }
  • field: a groupable field. Long text fields are not groupable.
  • bucket: for date fields day, week, month, quarter or year (required). For number fields optional, see Number groups. Not allowed for other fields.
  • showEmptyPeriods: true for a date group also shows the periods without elements, so a timeline has no gaps (default false, see Periods without elements). Not the same as the report's showEmptyGroups, which keeps the group of elements that have no date at all.
  • top: keeps this many groups, 1 to 10000. Without top, all groups are returned up to the group limit.
  • order: key sorts by the value (dates chronologically), label by the shown label, measure by the value at the index measure of measures (default 0). The default is key for a field with a bucket and for number fields, else measure.
  • dir: asc or desc.
  • axis: rows or columns for the pivot table and the charts. Without it the first group field is a row and, with two group fields, the second is a column. Two columns are shown as one column and one row. The result reports the configured axis and null when none was set.
  • label: replaces the name of the group field.

The same field with the same bucket cannot appear twice in groupBy. A date field can be grouped again with another bucket.

Periods without elements​

With "showEmptyPeriods": true a date group shows every period from the first to the last period with data in the report, and the same periods under every parent group. An empty period has count 0 and sum 0; average, minimum and maximum are empty.

  • The range comes from the data the report reads (after its filters, parameters and PQL). A filter that reaches beyond the data, for example a between over a whole year, does not extend it.
  • The save check refuses the option for a group that is not a date group, for a date field of related elements, with top, with an order other than key (dir can be asc or desc) and for a group below a group on the same date field (year, then month): the periods of the lower group depend on the parent period.
  • The periods count toward the group limit before the search. Above it the viewer, the CSV export and previews refuse with the group limit message; a time level cannot be cut. A day group over decades needs a larger bucket.
  • A pivot table with the group in its columns keeps the first 20 periods in the group's order and sums the rest into Other. A line chart draws up to 100 periods and a dashboard tile shows the first 10 rows.
  • A click on an empty period passes its $from, $to and $range like any other; the target shows no elements.
  • Full-table paging (API only) returns only periods with data.

Number groups​

{ "field": "price", "bucket": { "interval": 10000, "offset": 5000 } }
{ "field": "price", "bucket": { "ranges": [
{ "to": 10000, "label": "cheap" },
{ "from": 10000, "to": 50000 },
{ "from": 50000 }
] } }
  • interval: the width of each group, above 0. The groups start at offset + n × interval (offset defaults to 0).
  • ranges: 1 to 100 ranges in ascending order that do not overlap. from is included, to is not. Only the first range may omit from and only the last may omit to. label replaces the generated label.
  • A group's cell has its start as value (null for a range without from), the label from – to (< to, ≥ from for open ends, numbers without thousands separators) and both ends as range: [from, to].
  • Groups without elements are not shown. Values outside all ranges (gaps between ranges, or beyond the first and last range) form one group Other that follows the ranges (for single-valued fields the groups, Other and the group without a value add up to the total). Its cell has no value and no label but other: true; the viewer shows "Other" and the CSV export Other. An element with several values is in Other when one of them is outside all ranges. It does not count to top and comes before the group without a value, which stays a separate group. It is a group of its own next to the "Other" that tiles and pivot columns add for groups beyond their limit. Intervals have no Other.
  • An element with several values is counted once in each group one of its values falls into.
  • Quantity values are grouped in the report unit; the report is refused while it holds values in other units, as for sums and sorting.
  • order: "key" (the default) sorts the groups by their start. The search returns all groups of an interval between the smallest and the largest value; a small interval over a wide spread exceeds the group limit.

Limits:

  • A click on a number group passes $from (for a gte parameter), $to (for an lt parameter) or $range (for a between parameter, as [from, to]). A group includes its start and excludes its end, as between on numbers does, so the target lists exactly the clicked group. A range that is open at one end passes only the closed side: $range gives [null, to] or [from, null]. A click on Other or on the group without a value is refused for $from, $to and $range; the viewer does not offer drill-downs from either.
  • Number groups are not possible for fields of related objects.
  • Custom ranges and intervals with an offset cannot be paged as full tables; only intervals without offset can.

Filters​

{ "and": [ { "field": "productionYear", "op": "gte", "value": 2020 } ] }

and holds up to 50 conditions. Other boolean combinations are not part of version 1.

OperatorValue
eq, neA string, number or boolean.
lt, lte, gt, gteA string, number or boolean.
containsA string, number or boolean.
in, notInA list of 1 to 1000 strings, numbers or booleans.
between[from, to]. Dates: both whole days are included. Numbers (quantity values too): from is included and to is excluded (from <= value < to); one side may be null for a parameter value (open end), not in a literal filter value.
inLast{"amount": 30, "unit": "day"}. Unit: day, week, month, quarter or year.
empty, notEmptyNo value.

A field with several values matches a condition when one of its values does. The negated operators ne, notIn, notContains and empty match when none of its values matches the positive operator, also when the field has no value. On text fields, contains also matches the search text as a sequence of whole words and ignores punctuation, so (s finds Monte Carlo S. Values of related elements the user may not view match no condition, see Permissions and Limits.

Dates are ISO 8601 strings such as 2026-10-10 or 2026-10-10T08:00:00+02:00. Instead of a value, a condition can take {"param": "<name>"} to read the value of a parameter. The operators that a field supports depend on its type, see the field list of the API.

Published State​

"publishedState": "unpublished"

For data object classes and documents: published reads only published elements, unpublished only unpublished ones, both all of them. Left out the property means both, so reports saved before it return the same rows (unpublished elements are included by default). Assets and event datasets have no published state and refuse the property with a validation error.

The state is fixed in the configuration and applies to every run of the report: every viewer, the dashboard and the MCP tools (preview_report, propose_report, save_report). Viewers cannot change it and it is no parameter. It applies together with the filters: all must match, also a condition or a parameter on the field published. unpublished with a condition published = true returns no rows, and a report whose viewers should choose between published and unpublished uses a parameter on published and leaves publishedState at both. A drill-down target report applies its own publishedState; the state of the report that was clicked is not passed on. The builder shows the state as a fixed row at the top of the filters section.

Advanced Filter (PQL)​

"pql": "(name LIKE \"*Alfa*\" OR name LIKE \"*Fiat*\") AND published = \"true\""

A query in the Pimcore Query Language (PQL) of the Generic Data Index, combined with filters by AND. The syntax is the one of the Generic Data Index; the differences (field list, languages, booleans as strings, no QUERY(...), fields of related elements with one relation step like manufacturer:Manufacturer.name = "Ford", at most 5 of them) are listed in Building Reports and the limits in Permissions and Limits. It is not available for event datasets.

Parameters​

{ "name": "country", "field": "manufacturer.country.name", "label": "Country", "default": "Germany" }
  • name: starts with a letter, contains letters, digits and _, at most 64 characters, unique in the report.
  • field: the field whose values the viewer picks from.
  • label: the name for viewers.
  • default: a value, a list of values or a period {"amount", "unit"}.
  • required: the viewer must set a value before the report runs.

A parameter works through the conditions that reference it with {"param": "<name>"}. A condition that references an undefined parameter is rejected, and so is a parameter that no condition references. The field of the parameter must have the same value type as the field of the condition. A drill-down of another report sets a parameter by its name.

Sort and Limit​

"sort": [ { "field": "price", "dir": "desc" } ],
"limit": 50

List mode only. Summary reports use groupBy[].order, groupBy[].dir and groupBy[].top.

Drill-Downs​

{
"on": "value",
"field": "manufacturer.name",
"target": "report:cars_of_manufacturer",
"params": { "manufacturer": "$label" }
}
  • on: value for a click on a value of field, row for a click on a row. Default value.
  • field: the column or group field of the click. The field must be a column of the report.
  • target: element opens the clicked element, report:<custom report name> opens another Report Builder report.
  • params: up to 20 parameters of the target report. A value can be fixed or one of the following references:
ReferenceValue
$valueThe clicked value. Needs "on": "value".
$labelThe clicked label, converted to a number for a number parameter. Needs "on": "value".
$row.<field path>A value of the clicked row; the path must be a column of the report.
$param.<name>The current value of the parameter <name> of this report (the value the viewer ran with, else its default). A cleared parameter passes nothing. Works for value and row clicks.
$rangeThe clicked date bucket as [from, to], the first and last day; the clicked number group as [from, to] (the start and the end, null for an open end). For between parameters.
$from, $toOne end of the clicked date bucket as a single date, for gte, lte and eq parameters. For a clicked number group, its start (for a gte parameter) and its end (for an lt parameter); an open end passes nothing.

$range, $from and $to need "on": "value" and a field that is a group field with a bucket. Number groups include their start and exclude their end, and so does between on a number field: $range passes the group as it is.

A resolved value is checked against the parameter of the target report when the click happens: a between parameter needs [from, to], an in parameter a list and an eq parameter a single value. Whole numbers are passed as integers. A mismatch, a parameter that the target report does not have and a required parameter that params leaves out are errors.

element needs a list report, or a click on a relation field that holds a single value.

Examples​

List with a Parameter​

{
"version": 1,
"dataset": {"type": "class", "name": "Car"},
"mode": "list",
"fields": ["name", "manufacturer.name", "manufacturer.country.name", "productionYear", "price"],
"filters": {
"and": [
{"field": "manufacturer.country.name", "op": "eq", "value": {"param": "country"}},
{"field": "productionYear", "op": "gte", "value": 2020}
]
},
"parameters": [
{"name": "country", "field": "manufacturer.country.name", "label": "Country", "default": "Germany"}
],
"sort": [{"field": "price", "dir": "desc"}],
"limit": 50,
"drill": [{"on": "row", "target": "element"}]
}

Summary by Month and Manufacturer​

{
"version": 1,
"dataset": {"type": "class", "name": "Car"},
"mode": "summary",
"measures": [
{"fn": "count", "label": "Cars"},
{"fn": "avg", "field": "price"}
],
"groupBy": [
{"field": "creationDate", "bucket": "month", "order": "key", "dir": "asc", "axis": "columns"},
{"field": "manufacturer.name", "top": 10, "order": "measure", "measure": 0, "dir": "desc"}
],
"filters": {
"and": [
{"field": "creationDate", "op": "inLast", "value": {"amount": 12, "unit": "month"}}
]
},
"visualization": "line",
"drill": [
{
"on": "value",
"field": "manufacturer.name",
"target": "report:cars_of_manufacturer",
"params": {"manufacturer": "$label"}
}
]
}

Assets by MIME Type​

{
"version": 1,
"dataset": {"type": "asset"},
"mode": "summary",
"measures": [
{"fn": "count"},
{"fn": "sum", "field": "fileSize", "label": "Storage in bytes"}
],
"groupBy": [{"field": "mimetype", "order": "measure", "dir": "desc", "top": 20}],
"filters": {"and": [{"field": "type", "op": "eq", "value": "image"}]},
"visualization": "bar"
}

Elements per Workflow Place​

{
"version": 1,
"dataset": {"type": "class", "name": "Car"},
"mode": "summary",
"measures": [{"fn": "count"}],
"groupBy": [{"field": "workflow:product_workflow.place"}],
"visualization": "pivot"
}

Validation Errors​

Validation answers with a list of errors. Every error has a JSON pointer to the invalid part and a message that names the fix, for example:

{
"valid": false,
"errors": [
{
"path": "/measures/1/fn",
"message": "sum is not possible on the string field \"name\"; only count works for it"
},
{
"path": "/groupBy/0/bucket",
"message": "is required for the date field \"creationDate\"; use day, week, month, quarter or year"
}
]
}

Versioning​

version is 1. Minor releases of the bundle can add optional properties and new values of the enumerations for operators, functions, visualizations and bucket units, so clients that read a configuration ignore values they do not know.