Running Reports / Report Groups
This API is designed to run reports/report groups by applying the required filters. It returns a unique Reference Number that can be used to check the status of the report and download the reports/report groups.
Resource URL
POST Method Resource URL: http://localhost:9081/sigma/rest/reports/generate
Query Parameters are as follows:
Name | Description | Sample Values |
action |
| RUN_REPORT,
EXEC_REPORT_GROUP |
reportId |
While generating the (RUN_REPORT) reports, the Report ID is mandatory, while the Group Report ID is optional. In order to obtain the Report ID log-on to eMACH-Sigma application and right click the report on the left-hand side of the page and click Copy Report ID.
While generating the (EXEC_REPORT_GROUP) report groups, a Group Report ID is mandatory. |
|
accessToken | Indicates the access token. | sample61d74837-2e77-4ede-a967-2c84b30-dws-b3b4f 7 |
reportFilter | If filterId is Number or String datatype:
If filterId is Date datatype:
If filterId is Long datatype:
| "reportFilter" : {
"preHookParams":{"NAME":["SIGMA"]},"procedureParams":{"NAME":["SIGMA"]},"additionalParams":{"ADD_INP":["DEMO1"]}, "bindParams":{"NAME":["DEMO1"]}, "filterDef": [{"columnId": "ACCOUNT_TYPE", "filterId": "STR_CONTAINS","filterDataType": "string" ,"filterValues": "savings","filterDescriptions":"savings"}]
}
|
Response Parameters are as follows:
Parameter | Type | Description |
replyType | string | For reply type, the report status will be returned as 'SUCCESS' if the running individual report is successful or 'FAILURE' if the report is a failure. |
reportId | string | Generated reports IDs. |
referenceNumber | sting | A unique reference number provided for downloading reports. |
statusCode | int | Code for report status. The response error details for each HTTP code are as follows: |
Sample Response for EXEC_REPORT_GROUP
{
"headerMap": {
"replyType": "SUCCESS",
"success": "true",
"reportGroupStatus": {
"referenceNumber": " sample2djj-6c394d0e-9802-49ae-bdd3-9ccaed431ecd ",
"reportGroupId": " AccountTransaction ",
"statusCode": 200,
"status": "SUCCESS"
}
}
}
Sample Response for RUN_REPORT
{
"headerMap": {
"replyType": "SUCCESS",
"reportId": " samplejk34-0925bccf-29f0-42f2-8896-77c57aea2198",
"referenceNumber": " sample2djj-6c394d0e-9802-49ae-bdd3-9ccaed431ecd ",
"success": "true",
"statusCode": 200,
"status": "SUCCESS"
}
} |
For Linux-based environments, you can execute the runreport.sh shell script, by using an appropriate payload structure with the relevant response parameters, so as to call the report API with a unique access token to run or generate the report. A sample runreport.sh shell script file with a relevant payload structure and appropriate response parameters is provided as follows:
You can also add filters while generating the report by passing "reportFilter" parameter as shown in the following sample code snippet: