Once ReportFactory Lite is deployed and configured, you can test the reporting functionality using Postman or any REST client.
ReportFactory Lite is a technology-agnostic reporting solution. While we market it primarily for Oracle APEX environments due to the strong demand in that ecosystem, ReportFactory Lite operates as a completely independent web service with no dependencies on Oracle Database, Oracle APEX, or any specific technology stack.
Any application that can consume REST APIs can leverage ReportFactory Lite for enterprise-grade report generation. Whether you're building applications in Java, .NET, Python, Node.js, PHP, or any other technology, ReportFactory Lite seamlessly integrates through standard HTTP requests and JSON data exchange.
API Endpoint
Make a POST request to the following URL: http://:/report-factory-lite/export
Request Headers
Configure the following headers in your Postman request:
Header Name | Description | Example Value |
---|---|---|
X-API-KEY | The API key configured in application.properties | key |
reportFormat | Desired output format for the report. Supported formats: PDF, DOCX, XLSX | |
reportTemplateMain | The name of the .jasper file (without extension) inside the template folder | hello-world |
Content-Type | Content type for the request payload. Always set to application/json | application/json |
Request Body
The request body must be a JSON object with the actual report data wrapped inside a data
object.
Sample JSON Payload:
{
"data": [
{
"EMPLOYEE_ID": 100,
"EMPLOYEE_NAME": "Steven King",
"PHONE_NUMBER": "515.123.4567",
"BARCODE_DATA": "Employee ID: 100\nHire Date: 17-JUN-2003\nE-mail: SKING",
"JOB_TITLE": "President",
"DEPARTMENT_NAME": "Executive",
"COMPANY_LOGO": "report-logo.png",
"EMPLOYEE_IMAGE": "employee-image.png"
},
{
"EMPLOYEE_ID": 101,
"EMPLOYEE_NAME": "Lex De Haan",
"PHONE_NUMBER": "515.123.4569",
"BARCODE_DATA": "Employee ID: 102\nHire Date: 13-JAN-2001\nE-mail: LDEHAAN",
"JOB_TITLE": "Administration Vice President",
"DEPARTMENT_NAME": "Executive",
"COMPANY_LOGO": "report-logo.png",
"EMPLOYEE_IMAGE": "employee-image.png"
},
{
"EMPLOYEE_ID": 102,
"EMPLOYEE_NAME": "Neena Kochhar",
"PHONE_NUMBER": "515.123.4568",
"BARCODE_DATA": "Employee ID: 101\nHire Date: 21-SEP-2005\nE-mail: NKOCHHAR",
"JOB_TITLE": "Administration Vice President",
"DEPARTMENT_NAME": "Executive",
"COMPANY_LOGO": "report-logo.png",
"EMPLOYEE_IMAGE": "employee-image.png"
}
]
}
nnn
Testing Steps
-
Open Postman and create a new POST request
-
Set the URL to your ReportFactory Lite endpoint
-
Configure Headers as specified in the table above
-
Set Request Body to raw JSON and paste the sample payload
-
Send the Request and verify the response
Important Notes
Template Location
The reportTemplateMain
header refers to the .jasper
file, which must be placed inside the folder defined by app.report.template-location
in application.properties.
AES Encryption (if enabled)
If app.aes.enabled=1
, the JSON payload must be encrypted with AES using the configured app.aes.encryption-key
and app.aes.encryption-iv
.
Viewing the Report Output
After sending the API request from Postman, you have two options to view the generated report:
-
Save Response: Save the response as a file and open it to view the generated report
-
Check Output Directory: Navigate to the directory specified in
app.report.output-location
in the application.properties file, and open the most recently created file to view the output
Sample Templates
The report-engine directory includes sample templates that you can test immediately.
These templates are designed to work with the sample JSON payload provided above, allowing you to verify your ReportFactory Lite installation quickly.
You can access sample templates, data from https://github.com/arun-maathra/maathra-report-factory-lite/tree/main/examples
Troubleshooting
-
401 Unauthorized: Check if the X-API-KEY header matches your configured API key
-
404 Not Found: Verify the endpoint URL and ensure ReportFactory Lite is properly deployed
-
Template Not Found: Ensure the .jasper file exists in the configured template directory
-
Permission Denied: Verify Tomcat user has write permissions on the output directory
-
Blank Report/Report Not Generating: Verify Tomcat logs. All errors are written to Tomcat logs.
Sample cURL(Plain Text)
Here is sample cURL code to get the employee certificate print for 3 employees.
curl --location --request POST 'http://localhost:8080/report-factory-lite/export' \
--header 'X-API-KEY: key' \
--header 'reportFormat: PDF' \
--header 'reportTemplateMain: arfl-demo-certificate' \
--header 'Content-Type: application/json' \
--data-raw '{
"data": [
{
"FULL_NAME": "Steven King",
"CURRENT_DATE": "06-AUG-2025",
"IMAGE_URL": "certificate-of-achievement.png"
},
{
"FULL_NAME": "Neena Kochhar",
"CURRENT_DATE": "06-AUG-2025",
"IMAGE_URL": "certificate-of-achievement.png"
},
{
"FULL_NAME": "Lex De Haan",
"CURRENT_DATE": "06-AUG-2025",
"IMAGE_URL": "certificate-of-achievement.png"
}
]
}'
Sample cURL(Encrypted)
Here is sample cURL code to get the employee certificate print for 3 employees using encrypted data:
curl --location --request POST 'http://localhost:8080/report-factory-lite/export' \
--header 'X-API-KEY: key' \
--header 'reportFormat: PDF' \
--header 'reportTemplateMain: arfl-demo-certificate' \
--header 'Content-Type: application/json' \
--data-raw '08FD4787CF5E60FF6FB15E177A67562B099973021C3216C329CFF425A8F8BB19DF75D0A7DCF51A4B12492BB4077F62FE51A7E6B13F966DFB8A45D2BA84AB99C760314D020074508EB63B032D9FF52BB86037702A4D44DC701FECE19BD2C1263E8ED0E6674B5DA344F9A74E4F4CEB4B1AE8EEDDF335967690C40044255E5156C78E15BDC5B7169B79FD6631C1B724A7CAB6D9A402E3B1990AFD80B38F42341E425EAFD9D39F40EBFAA9BA0907747A3F4ED6D12E22D6339A6D249E7CE4FA5DC88BF814DA1D5409491C426A047A11DD1A83A4150D8754C3C3986BF12770B0E932C52CEA68C7F3320D26F601DC7B73D563FB9FBABF3DC52227B978DB6A8F50C91B782C59A2D0C2FC47573FD1FB08DCE9779EAA4B07C143F2835EC999DD10069462D41BA226BC967653A113518942DA4979BEE10A2A60649A4A2E074FB46BA91CDF0C0DE80151F5F16AB4DF7E362B987598413680FF555446E8AC32306A0448EE8BEDFA8A0158BCDF12C1E0A86DD7DB09F1BEE1E8DE292C4B92B232607009EE59D7801634453BC152317B301386D98FDBC10EB0F025749227714A50F877D63FBF604609AF812204D4B6D0F8EFF4ACE44DBB4FEF67580CED8B70CEC757A420D82548BD412C35113BE8BC4E249E1E2462FF2DE9D9AD84B6E17419BA90AC098977B9B35413A2DA92A7E16C9D9BBEE3A4DCC0CCD89E8D8C981B2DC46AB47B1B500997DC1F6C19C639138E690B916A7822ED2DA5E9EE3CE4F85D0527048BD437C1D24CB8FEFD2F4420DC860A455E57FCF74F76AAF6A3AF3B015BCE4E29CC7FF13F5897362761B9F051F274DE8BFA6621E9C443534D298167B0695E2ECBACF2EA4D87823CE271FA5CFDC05A1BF7ABC66B3BDEC390B9B0AF63A88822E703F8B67848728AAC7A7109C68785900E60520548420F90004B4759C4E51C72504ABE03B88F0BE1FF21B0019E524896019D293ED4DDB9198FF9626CCE435DB09676ADD3DE7A984F04513DF28E18B17EF470B5603010A9E4D4117197B3B515B12A6D62B12152DD6843EE37DBED5264E331ED13D4300B406AA9825F16EFB0154A74EE92815F5867B72031B8480789113D37C60FB2EB5EFE80E6D870FB30CC47597015E347FC49EFE00D44003F44800BC28815469B96D36A5A55EB67A483013263957AE7D88084B8E8B17E365ACF03CB43C5AAF1D983A58BBEA967A85129B663C21B8ACEC4DA8256D989B87675CA98385B0F4F05A8D48D5FAAAB3CF2629EB5A2DA641D94BB7ABF6F72CF3CD3ECE7762E308ACDA71148BE00F6E50907D0B86FF6ACF402E07F693CB7552701864B4C5FCFFF926A2D1B547AA5032352E7309CC741DE793AEB34464FA71624A6C839D53D01FB667EC36F2DA8E41BF30E8F5ACF2434938346513EDD8CF11A9EAEA7D37B9C0FF861FB792272F79DF6AED27A39F7149DA8BE9BDCAB2952F34FECEAA2B5E9FD6A02BEC220AD3AFB8D41562D951A4755CA2B72E33EFB2FC3755F6A0A8ADE3EDB2526BC33F4793308E844B92D750D0569E74E840CF2401B912F6987041F3BA6148EF1DE921D58FB27B7443467358527D9D4E6E25D2DC0ADC0D07F109A51EE4C3DC8FD6A9D59DF7E645FB6E6DF0F5612B3D164920A747A34781EE78508'