API to setup and download scheduled report
1. Authentication
Obtain 'x-access-token'
x-access-token'Authenticate with the system to obtain an x-access-token. This token must be included in all client requests for server validation.
It can be obtained from this end-point.
Request URL
POST
auth/realms/master/protocol/openid-connect/token
Headers
Content-Type
application/x-www-form-urlencoded
Body (each key value in 'x-www-form-urlencoded' form)
x-www-form-urlencoded' form)grant_type
password
client_id
admin-cli
username
<username>
password
<password>
2. Setup Scheduled Reports(One Time)
Request URL
POST
/api/schedule-report
Headers
x-access-token
string
Request
configuration
{
"EMAIL_LIST":[<list of Emails report Needs to be Sent>]
}
reportType
enum [TABLE_LIST, DATASOURCE_SUMMARY_PDF_REPORT, DELTA_SUMMARY_PDF_REPORT]
TABLE_LIST -> For Global structured DS Report .
DATASOURCE_SUMMARY_PDF_REPORT -> For Datasource Summary Report.
DELTA_SUMMARY_PDF_REPORT -> For DELTA Report.
cron
0 14 * * 4
Cron Expression for the schedule of the Report
notificationType
email
emailBody(Optional)
email Body of scheduled report
reportFormat(Optional)
enum [CSV, PDF, JSON]
Format of the report to generate.
Sample Request Body
Sample Response Body
Response will be scheduled Report Id
3. Download Scheduled Report
Request URL
GET
api/reports/delta-report
Headers
x-access-token
string
Params
report_type
enum [TABLE_LIST, DATASOURCE_SUMMARY_PDF_REPORT, DELTA_SUMMARY_PDF_REPORT]
TABLE_LIST -> For Global structured DS Report .
DATASOURCE_SUMMARY_PDF_REPORT -> For Datasource Summary Report.
DELTA_SUMMARY_PDF_REPORT -> For DELTA Report.
Sample Response Body
Response Codes
200
File will be downloaded.
Indicates a successful operation.
404
{"error":"report not available yet."}
The scheduled report is not setup or not completed yet.
500
{"error":"Something went wrong. Please try again later."}
A server-side error occurred.
Last updated