DI Insights Report API

DI Insights Report API

Machine-oriented API for authenticated report retrieval from DI Insights.
Use the endpoints on this page to discover accessible accounts and reports, resolve report parameters, and download report data from CORE or FLOW.

Base URL

https://insights-api.di.no

The base URL is environment-specific.

Authentication

Authorization: Bearer <jwt-token>

All endpoints require an authenticated user.

API overview

Method

Endpoint

Purpose

Method

Endpoint

Purpose

GET

/report/api/accounts

List accounts accessible to the authenticated user.

GET

/report/api/reports/{language}

List available reports and their source.

GET

/report/api/parameters/{reportId}/{language}

Get the parameter contract for a report.

GET

/report/api/parametervalues/{reportId}/{paramNr}/{language}

Resolve allowed values for a report parameter.

POST

/report/api/reportdata/{accountId}/{reportId}/{language}

Execute and download a report.

GET

/report/api/adaptations

List accessible report adaptations.

Authentication and conventions

  • Generate a JWT access token through DI SSO Authentication API

  • Send the JWT access token as Authorization: Bearer <token>.

  • The download endpoint requires explicit access to the supplied accountId.

  • Path and query enum values are case-sensitive.

  • A report is uniquely identified by reportSource and reportId. IDs may overlap between sources, so clients must retain and send both values in subsequent calls.

  • Report parameters are validated before report execution.

User and access details

  • Use your normal DI Insight application user OR a web service user (order in DI Support)

  • The user have access to relevant account(s) (assign in DI Insight → Admin → Account)

  • The user is limited to its specific geography and product access

 

Report sources

Value

Description

Value

Description

CORE

Report provided by DI Core.

FLOW

Report provided by DI Flow.

Recommended client flow

  1. Fetch accessible accounts and select a valid accountId.

  2. Fetch reports for the required language.

  3. Retain both id and reportSource for the chosen report.

  4. Fetch the report parameters.

  5. Resolve dependent parameter values using the selected parent value.

  6. Build the request body as ApiParam[].

  7. Download the report using the same reportSource.

 

Clients using this API should not fail if new optional fields are added to the API. If a new field is added to the request or response on a later stage, existing clients should handle this in a way such as they just ignore the field.

Endpoints

Returns all accounts available to the authenticated principal. No path, query, or body parameters are required. Response 200 OK application/json The body is an array of ApiAccountSummary. An empty array means the user has no accessible accounts. Access to account(s) is managed in DI Insight application by company admin Field Type Description accountId number Account identifier. name string Account name. description string | null Account description. Example request curl -sS \ -H "Authorization: Bearer ${TOKEN}" \ "${BASE_URL}/report/api/accounts" Example response [ { "accountId": 101, "name": "Acme Logistics", "description": "Main account" } ]
Returns the reports available to the authenticated user for the selected language. Path parameters Name Type Required Description language string Yes Report language, typically NO, EN, SV, or FI. Response 200 OK application/json Each item is an ApiReportSummary. Field Type Description id number Report identifier. reportSource CORE | FLOW Report provider. Must accompany id in subsequent calls. title string | null Report title. description string | null Report description. Example request curl -sS \ -H "Authorization: Bearer ${TOKEN}" \ "${BASE_URL}/report/api/reports/NO" Example response [ { "id": 3001, "reportSource": "CORE", "title": "Orders by Period", "description": "Order summary by selected period" } ]
Returns the report adaptations available to the authenticated user across accessible accounts. Response 200 OK application/json Each item is an ApiReportAdaptationSummary. Field Type Description adaptationId number Report adaptation identifier. name string Report adaptation name. description string | null Report adaptation description. reportId number Source report identifier. accountId number Account identifier. reportSource CORE | FLOW Source report provider. language NO | EN | SV | FI Report adaptation language. Example request curl -sS \ -H "Authorization: Bearer ${TOKEN}" \ "${BASE_URL}/report/api/adaptations" Example response [ { "adaptationId": 17, "name": "Orders by Period - Customer format", "description": "Customer-specific column selection", "reportId": 3001, "accountId": 42, "reportSource": "CORE", "language": "NO" } ]
Returns the parameter contract for the selected report. Path parameters Name Type Required Description reportId integer Yes Report identifier. language string Yes Language code. Query parameters Name Type Required Description reportSource CORE | FLOW Yes Source returned with the selected report. Response 200 OK application/json Each item is an ApiReportParameterSummary. Field Type Description name string Parameter name. paramNumber integer Parameter number. dependsOnParamNumber integer | null Parent parameter number, if any. dependentParamNumber integer | null Alternate dependency field. required boolean Whether the parameter is required. multiple boolean Whether multiple values are allowed. dataType string Expected Java datatype. implementation string | null Optional implementation hint. paramValues ApiParameterValueSummary[] Static values when no dynamic parent dependency is needed. ApiParameterValueSummary Field Type Description label string Display label. value string Value to submit. Example request curl -sS \ -H "Authorization: Bearer ${TOKEN}" \ "${BASE_URL}/report/api/parameters/3001/NO?reportSource=CORE" Example response [ { "name": "From date", "paramNumber": 1, "dependsOnParamNumber": null, "dependentParamNumber": null, "required": true, "multiple": false, "dataType": "java.util.Date", "implementation": null, "paramValues": [] }, { "name": "Department", "paramNumber": 2, "dependsOnParamNumber": 1, "dependentParamNumber": null, "required": true, "multiple": false, "dataType": "java.lang.String", "implementation": null, "paramValues": [] } ]
Returns allowed values for an independent or dependent report parameter. Path parameters Name Type Required Description reportId integer Yes Report identifier. paramNr integer Yes Parameter number. language string Yes Language code. Query parameters Name Type Required Description reportSource CORE | FLOW Yes Source returned with the selected report. parentValue string Conditional Optional for independent parameters; required for dependent parameters. Behavior If the parameter depends on a parent, parentValue is required. Dynamic values are fetched from the selected report source using the parent selection. If there is no parent dependency, static values from paramValues are returned. Response 200 OK application/json The body is an array of ApiParameterValueSummary. No available values are represented by an empty array. Field Type Description label string | null Display label. value string | null Value to submit in value or multiValue. Example requests Independent parameter curl -sS \ -H "Authorization: Bearer ${TOKEN}" \ "${BASE_URL}/report/api/parametervalues/3001/1/NO?reportSource=CORE" Dependent parameter curl -sS \ -H "Authorization: Bearer ${TOKEN}" \ "${BASE_URL}/report/api/parametervalues/3001/2/NO?reportSource=CORE&parentValue=2026-08-01" Example response [ { "label": "Oslo", "value": "OSL" }, { "label": "Bergen", "value": "BGO" } ]
Executes the selected report and returns its data as a byte payload in the requested file format. Rate limit: 3 request pr minute Path parameters Name Type Required Description accountId integer Yes Validated against the authenticated user. reportId integer Yes Report identifier. language string Yes Language code. Query parameters Name Type Required Description reportSource CORE | FLOW Yes Source returned with the selected report. encoding EncodingType Yes Output character encoding. fileFormat FileFormat Yes Output file format. adaptationId integer No Adaptation identifier returned by GET /report/api/adaptations. EncodingType Value Java charset UTF8 UTF-8 ISO8859 ISO-8859-1 UTF16 UTF-16 FileFormat Value Suffix Content type CSV .csv text/csv EXCEL .xlsx application/vnd.openxmlformats-officedocument.spreadsheetml.sheet JSON .json application/json PARQUET .parquet application/parquet Important: The controller declares text/plain, while the returned bytes use the selected fileFormat. Save or process the response according to fileFormat; do not assume the payload is UTF-8 text. Request body — ApiParam[] Field Type Required Description paramNumber integer Yes Parameter number returned by the parameters endpoint. dataType string Yes Datatype returned by the parameters endpoint. value string | null Conditional Single value. Use when multiple is false. multiValue string[] | null Conditional Multiple values. Use when multiple is true. Submit one object per selected parameter. Required parameters must be present. Do not submit both value and multiValue for the same parameter. Example request body [ { "paramNumber": 1, "dataType": "java.util.Date", "value": "2026-08-01" }, { "paramNumber": 2, "dataType": "java.lang.String", "multiValue": ["OSL", "BGO"] } ] Validation The service validates required parameters, datatype matches, allowed values, and parent/child dependency constraints before executing the report. When adaptationId is supplied, the adaptation must belong to accountId and match reportId, reportSource, and language. Response 200 OK byte payload CSV returns CSV bytes. EXCEL returns XLSX bytes. JSON returns JSON bytes. PARQUET returns Parquet bytes. Example — CSV curl -sS \ -X POST \ -H "Authorization: Bearer ${TOKEN}" \ -H "Content-Type: application/json" \ "${BASE_URL}/report/api/reportdata/101/3001/NO?reportSource=CORE&encoding=UTF8&fileFormat=CSV&adaptationId=17" \ --data '[{"paramNumber":1,"dataType":"java.util.Date","value":"2026-08-01"},{"paramNumber":2,"dataType":"java.lang.String","multiValue":["OSL","BGO"]}]' \ --output adapted-report.csv Example — Excel curl -sS \ -X POST \ -H "Authorization: Bearer ${TOKEN}" \ -H "Content-Type: application/json" \ "${BASE_URL}/report/api/reportdata/101/3001/NO?reportSource=CORE&encoding=UTF8&fileFormat=EXCEL" \ --data '[{"paramNumber":1,"dataType":"java.util.Date","value":"2026-08-01"}]' \ --output report.xlsx Example — JSON curl -sS \ -X POST \ -H "Authorization: Bearer ${TOKEN}" \ -H "Content-Type: application/json" \ "${BASE_URL}/report/api/reportdata/101/3001/NO?reportSource=CORE&encoding=UTF8&fileFormat=JSON" \ --data '[{"paramNumber":1,"dataType":"java.util.Date","value":"2026-08-01"}]' \ --output report.json

Error responses

Error key

HTTP status

Meaning

Error key

HTTP status

Meaning

unauthorized.access

401

User is not authenticated.

unauthorized.access.to.account

400 / 401

Account is invalid or inaccessible.

report.parameter.invalid

400

Invalid report or parameter input.

report.parameter.parent.required

400

A dependent parameter is missing parentValue.

report.parameter.invalid.value

400

The submitted value is not allowed in the selected context.

Common scenarios

Scenario

Outcome

Scenario

Outcome

Call a dependent parameter-values endpoint without parentValue.

400 report.parameter.parent.required

Download using an account the user cannot access.

401 unauthorized.access.to.account

Submit a parameter value not permitted by the selected parent context.

400 report.parameter.invalid.value


September 2026.