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
| Property | Type | Description |
|---|---|---|
version | integer | Required. Always 1. |
dataset | object | Required. The data the report reads, see Dataset. |
mode | string | Required. list or summary. |
fields | array | List mode, required: up to 50 unique field paths. |
measures | array | Summary mode, required: 1 to 10 measures. |
groupBy | array | Summary mode: up to 3 group fields. |
filters | object | Conditions that all must match. |
publishedState | string | Data objects and documents: published, unpublished or both (default when left out), see Published State. |
showEmptyGroups | boolean | Summary mode: true keeps groups of elements without a value. Default false. |
pql | string | An advanced filter, up to 2000 characters, not blank. |
parameters | array | Up to 20 parameters that viewers can change. |
sort | array | List mode: up to 5 sort fields. |
limit | integer | List mode: rows per page, 1 to 1000. |
drill | array | Up to 10 click actions. |
visualization | string | auto (default), bar, line, pivot or table. |
language | string | Language 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,documentorevents.name: the class name forclass, the registered dataset name forevents. Omit it forassetanddocument.
Field Paths
Fields are addressed by path. The field picker of the builder lists the paths of a dataset, see Fields and Lookups.
| Pattern | Example |
|---|---|
| Own or system field | name, fullPath, fileSize |
| Object brick field | attributes.Engine.power |
| Lookup through a relation | manufacturer.country.name |
| Parent object | parent.orderDate |
| Classification store key | cs:technicalAttributes.3.12 |
| Workflow place | workflow:product_workflow.place |
| Asset metadata | metadata.copyright |
| Asset metadata of a relation | mainImage.metadata.copyright |
| Preview of assets | preview, 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:
previewin the asset dataset: the thumbnail of each row's asset.<field>.previewfor the data's own image, hotspot image, image gallery and asset relation fields, for examplemainImage.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.previewdoes 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,minormax.field: required for every function butcount, which takes no field.sumandavgneed a number field,minandmaxa 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 fieldsday,week,month,quarteroryear(required). For number fields optional, see Number groups. Not allowed for other fields.showEmptyPeriods:truefor a date group also shows the periods without elements, so a timeline has no gaps (defaultfalse, see Periods without elements). Not the same as the report'sshowEmptyGroups, which keeps the group of elements that have no date at all.top: keeps this many groups, 1 to 10000. Withouttop, all groups are returned up to the group limit.order:keysorts by the value (dates chronologically),labelby the shown label,measureby the value at the indexmeasureofmeasures(default0). The default iskeyfor a field with abucketand for number fields, elsemeasure.dir:ascordesc.axis:rowsorcolumnsfor 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 configuredaxisandnullwhen 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
betweenover 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 anorderother thankey(dircan beascordesc) 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
daygroup over decades needs a largerbucket. - 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,$toand$rangelike 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 atoffset + n × interval(offsetdefaults to 0).ranges: 1 to 100 ranges in ascending order that do not overlap.fromis included,tois not. Only the first range may omitfromand only the last may omitto.labelreplaces the generated label.- A group's cell has its start as
value(nullfor a range withoutfrom), the labelfrom – to(< to,≥ fromfor open ends, numbers without thousands separators) and both ends asrange:[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
valueand nolabelbutother: true; the viewer shows "Other" and the CSV exportOther. An element with several values is in Other when one of them is outside all ranges. It does not count totopand 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 agteparameter),$to(for anltparameter) or$range(for abetweenparameter, as[from, to]). A group includes its start and excludes its end, asbetweenon numbers does, so the target lists exactly the clicked group. A range that is open at one end passes only the closed side:$rangegives[null, to]or[from, null]. A click on Other or on the group without a value is refused for$from,$toand$range; the viewer does not offer drill-downs from either. - Number groups are not possible for fields of related objects.
- Custom
rangesand intervals with anoffsetcannot be paged as full tables; only intervals withoutoffsetcan.
Filters
{ "and": [ { "field": "productionYear", "op": "gte", "value": 2020 } ] }
and holds up to 50 conditions. Other boolean combinations are not part of version 1.
| Operator | Value |
|---|---|
eq, ne | A string, number or boolean. |
lt, lte, gt, gte | A string, number or boolean. |
contains | A string, number or boolean. |
in, notIn | A 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, notEmpty | No 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:valuefor a click on a value offield,rowfor a click on a row. Defaultvalue.field: the column or group field of the click. The field must be a column of the report.target:elementopens 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:
| Reference | Value |
|---|---|
$value | The clicked value. Needs "on": "value". |
$label | The 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. |
$range | The 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, $to | One 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.