7 Reporting API

Source: This article refers to 7 Reporting API
Note: Coresystems uses OAuth 2.0 for authorization. For more information on OAuth 2.0, including information, refer to the following topic.

7.1 Introduction

Starting from version 1.7.4, the cloud provides reporting capabilities exposed as a set of web services. The definition of a report is stored inside a Report Template object. An instance of a report is called a Report and can be built only out of an existing Report Template.

Reporting is implemented on top of Jasper Reports engine.

7.1.1 Report Template

Report Templates objects can be created, read, updated and deleted using the ReportTemplate DTO and one of the client APIs (Data API Version 3, Data API Version 4, Sync API Version 2). Other client APIs might work, but are not supported.

Reports and sub-reports are defined in an XML format called JRXML. Translation files are defined using the resource bundles concept. Any kind of images should work just fine. The files are packaged in zip file and sent to the cloud in the Attachments referencing the Report Template object. The Attachment can be downloaded using the Attachment API, e.g.:


Report Template fields languages, paramatersSchema, types are generated based on the uploaded attachment. The main report definition file has to be named report.jrxml. There exist no naming restrictions for sub-reports, although report_(name).jrxml in encouraged. The optional translation files have to be named like translations[_language[_country]].properties.


7.2 Jaspersoft Studio

Report Template can be hand-coded, generated, or designed using a tool. Jaspersoft Studio is a preferred way to design and preview a report.

7.2.1 Embedded Reports

The Cloud provides a set of embedded report definitions which can’t be modified by the client. Such reports cover common user requirements, or cases which would be very hard or impossible to cover with standard templates. Embedded reports template can be modified by direct db access only.

7.3 Building Reports

Reports can be built using the report service.

Method URL Description
POST https://host[:port]/api/reporting/v1/build Builds the report.

7.3.1 HTTP Headers

  • Content-Type: application/json


  • Content-Type: multipart/form-data

7.3.2 Body

{ "reportTemplate": string, // optional, the cloud id or the name of the report (in case of embedded templates only) to use for building the report "reportLanguage": string, // optional, language of the report, e.g "en" "reportParameters": { // report parameters passed to reporting engine; can be used to specify the checklist instance or pass some values to queries inside the report definition; this object must comply with json schema stored in parameters schema field string: object, ... }, "reportTimeZone": string // optional, time zone of the report, e.g. "Europe/Berlin ( https://en.wikipedia.org/wiki/List_of_tz_database_time_zones ) "reportType": string // optional, type of the report, e.g. "PDF" }



7.3.3 Response

{ "reportTemplate": "sales", "reportLanguage": "en", "reportParameters": { "objectId": "01a143bc5d8a49de8e26cc8deec34ad8", "objectType": "SALESORDER", "showPrices": true }, "reportTimeZone": "Europe/Berlin", "reportType": "PDF" }

7.3.4 Additional Examples

 POST: https://et.dev.coresuite.com:9443/api/report/v1?account=scribe&company=Ambit%20AG&clientIdentifier=COR_CON_NONE 
{ "reportLanguage": "en", "reportParameters": { "checklistInstance": "97D78747727E43CBBE877AAABCB313B2" }, "reportTemplate": "checklist", "reportType": "PDF" }
POST: https://et.dev.coresuite.com:9443/api/report/v1/build?&account=scribe&company=Ambit%20AG&clientIdentifier=COR_CON_NONE
{ "reportLanguage": "en", "reportParameters": { "showUdfValues": true }, "reportTemplate": "239028ab3c7e3472239028ab3c7e3472", "reportType": "PDF" }

7.4 Downloading Reports

Report Templates files can be downloaded no matter if they are embedded ones or not.

HTTP Request

Method URL Description
POST https://host[:port]/api/reporting/v1/download Downloads the report template files.

7.4.1 HTTP Headers

  • Content-Type: application/json

  • Body

{ "reportTemplate": string // optional, the cloud id or the name of the report (in case of embedded templates only) to use for building the report }
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request



Article is closed for comments.