Skip to main content

Reports and dashboards


Report configuration​

A report configuration says how a report is made: the script and expression that produce its data, the template that shows it, and when it runs. Service: Report Config (reportconfig/v1/{source}), versioned.

FieldTypeRequiredWhat it is
_idStringYesThe report id
_typeStringNoVarReportConfiguration
reportTypeStringNoDefault, Fixed (updated by hand or by a process, not calculated), Dynamic (run for the latest date when read), Insight, Widget, Composition or CompositionTemplate
nameStringNoThe name
descriptionStringNoA description
category, subCategoryStringNoUsed to organise reports
scriptStringNoThe script that runs the report
expressionStringNoThe expression to run, usually a function in the script, for example dailySummary()
templateStringNoThe mustache template that shows the report as HTML
defaultRangeStringNoThe date range used when the report runs without one, for example last(5)
cronStringNoThe schedule, see Cron. Saving a schedule records you as runAs
enabledBooleanNoTrue to run the report on its schedule
currency, units, timezoneStringNoPassed to the report
propertiesObjectNoValues passed to the report and its template
tagsString[]NoTags
hideExcelBooleanNoLeave the report out of the Excel add-in's lists
hideListBooleanNoLeave the report out of report lists
mergeUpdatesBooleanNoFor a fixed report: merge each update for a date into the stored report instead of making a new version
mergeKeysString[]NoWith mergeUpdates: the field names used to match list elements when merging; the first one present in an element is used
cacheOptionsObjectNoWhen a run is stored: type is OnDemand (the default), Never, OnSchedule or External; schedule and store (the source, defaults to private). Insight and Widget reports are never stored
_odgObjectNoAn ondate generator: how the report dates are worked out
{
"_id": "NGE_GAS_DAILY",
"_type": "VarReportConfiguration",
"reportType": "Default",
"name": "Gas daily summary",
"category": "Gas",
"script": "northgate\\reports\\gas-daily",
"expression": "dailySummary()",
"template": "northgate\\reports\\gas-daily-template",
"defaultRange": "last(5)",
"cron": "0 19 * * 1-5 * Europe/London",
"enabled": true,
"properties": {"region": "NW"},
"tags": ["gas", "daily"],
"hideExcel": false,
"hideList": false,
"cacheOptions": {"type": "OnDemand", "store": "private"}
}

Report​

A report is the result of running a report configuration for a date. It has every field of its configuration, with _type VarReport, and:

FieldTypeWhat it is
_idStringreportid:date, for example NGE_GAS_DAILY:2026-11-18
reportStringThe report configuration id
ondateDateThe report date
start, endDateThe date range the report ran for
dataAnyThe report data: whatever the expression returned
scriptVersionIntegerThe version of the script that ran
ErrorMessageStringWhy the report failed, if it did. Note the capital E

Service: Report (report/v1/{source}). To save a fixed report yourself, POST the report with its data to report/v1/private/NGE_GAS_DAILY:2026-11-18.

{
"_id": "NGE_GAS_DAILY:2026-11-18",
"_type": "VarReport",
"report": "NGE_GAS_DAILY",
"reportType": "Default",
"name": "Gas daily summary",
"ondate": "2026-11-18",
"start": "2026-11-12",
"end": "2026-11-18",
"scriptVersion": 7,
"data": {
"rows": [
{"product": "TTF", "settle": 42.15, "change": 0.35},
{"product": "NBP", "settle": 104.30, "change": 1.10}
]
}
}

Report creator​

A report creator is a report configuration with parameters that people fill in to make their own reports. Service: Report Creator (reportcreator/v1/{source}), versioned. It has the fields of a report, with _type VarReportCreator, and parameters: an object with an entry per parameter name.

FieldTypeWhat it is
typeStringThe type of value
descriptionStringWhat the parameter is for
exampleStringThe value used to build the example report
"parameters": {
"curve": {"type": "String", "description": "The curve to summarise", "example": "NGE.GAS.TTF:SETTLE"},
"days": {"type": "Number", "description": "How many days to compare", "example": "5"}
}

Dashboard​

A dashboard built in the portal. Service: Dashboard (dashboard/v1), versioned.

FieldTypeRequiredWhat it is
_idStringNoMade for you when you create a dashboard
nameStringYesThe name
sharedBooleanNoTrue to share it with everyone in your company, defaults to false
ownerStringNoThe owner's email, defaults to the person who creates it
(layout)AnyNoThe rest of the dashboard is its layout, as saved by the portal