On this page:
Report
This Web Services allows to get a PDF report using the Report Generator in an asynchronous way.
The REST API spawns the Report Generator processes, and the REST API is also called back by the Report Generator itself which runs as a REST API client.
See the server resource object and the reportEnabled attribute to check whether these web services are enabled
A report.properties file allows to configure the interaction between the REST API and the Report Generator:
Report Property | Description |
---|---|
report.directory | Set the directory to save PDF reports. This directory must be cleaned up periodically with a "cron" script, using files dates as a criterion. Example: report.directory=c:\\temp\\reports |
report.reportGenerator | The location of the Report Generator Command line. If this variable is not set then the Web Services are not enabled. Example: report.reportGenerator=C:\\Program Files (x86)\\CAST\\ReportGenerator 1.8.0\\CastReporting.Console.exe |
report.webServiceURL | The URL to call back the REST API. "localhost" can be used as a domain name, as the REST API server and the Report Generator must share the same host. Example: report.webServiceURL=http://localhost:8888/CAST-RESTAPI/rest |
report.maxConcurrentProcesses | Set the maximum number of concurrent Report Generator processes to limit the CPU and memory consumption Example: report.maxConcurrentProcesses=4 |
report.maxDelayInSeconds | Set a delay to determine never ending Report Generator processing. After this delay the Report Generator process will be killed. Example to set a delay of 10 minutes: report.maxDelayInSeconds=600 |
URI Templates
HTTP Action | Media Type | URI Templates | Description |
---|---|---|---|
GET | application/pdf | {Domain}/Reports?{parameters} | Get a PDF report Return HTTP Status
In case of an internal error, the administrator has to
|
Parameters
URI Parameter | Description | Values | Default value |
---|---|---|---|
template | A Report Generator template name | a string | N/A |
snapshot-id | A snapshot ID to identify an application snapshot. | an integer | N/A |
previous-snapshot-id | A previous snapshot ID if it is required by the template (Note: immediate previous snapshot ID is deduced by the report generator) | an integer | N/A |
inline | Set "inline" to the "content-disposition" response. The browser will open a popup window to display the PDF content. Otherwise, a file is saved in the "download" directory. | a boolean | false |