Run reports
Any report configuration that has been created, whether scheduled or not, can be run at any time as an "adhoc" report run. This is especially useful when you would like to:
- Run a newly created report multiple times to shake out issues and refactor.
- Run a daily scheduled report for a specific day in the past where perhaps something went wrong on the ingestion side.
- Run a daily scheduled report for a whole month to reconcile the data.
- Run a report on a non-regular interval. For example, run a report for the last 10 days.
Before you begin
Before running an adhoc report, you’ll need the following:
- You must have created at least one report configuration.
- You need to know the reportConfigurationId of the report configuration you wish to run.
- You can get a list of available configurations using GET /report-configs.
- You’ll need to know the period of data you wish to report on.
Run adhoc reports
The following is an example request to run an adhoc report:
HTTP method: POST
Endpoint: /reports
{
"reportConfigurationId": "58bc2d32-28db-43b1-9bc6-1072a72f4589",
"frequencyConfig": {
"scheduleFrequency": "adhoc",
"reportingPeriodStartTimestamp": "2021-01-14 00:00:00",
"reportingPeriodEndTimestamp": "2020-01-14 23:00:00"
}
}
Response:
{
"reportIdentifier": "11b410c6-e226-4230-ac65-6b944c6a0f10",
"reportConfigurationId": "58bc2d32-28db-43b1-9bc6-1072a72f4589",
"reportTypeNames": [
"Transaction Details"
],
"createTimestamp": "2020-11-20T19:26:13.926Z"
}
Check the status of report runs
There are two ways to see the status of report runs.
- Get a list of reports runs
- Get details on a specific report run
To see a full list of all reports run recently, which includes scheduled, adhoc, and in-flight reports – you can use the following request:
HTTP method: GET
Endpoint: /reports
{
"next": null,
"summarizedReports": [
{
"reportIdentifier": "6ee97665-8d2c-424c-859a-dd98a9e4e0ca",
"reportConfigurationId": "193544e3-0fdf-472e-8cae-798ff88da609",
"reportTypeNames": [
"Settlement Summary",
"Settlement Details"
],
"reportStatus": "requested",
"updateTimestamp": "2021-08-23T00:23:05.353Z",
"createTimestamp": "2021-08-23T00:19:05.353Z",
"intervalParam": {
"reportingPeriodStartTimestamp": "2021-08-23 00:18:18",
"reportingPeriodEndTimestamp": "2021-08-23 00:19:18",
"scheduleFrequency": "adhoc"
}
},
{
"reportIdentifier": "c6a6f075-64d5-476f-b463-bc1c5de1abd7",
"reportConfigurationId": "ca788ad9-521c-45ec-b36d-0fdd38701e4d",
"reportTypeNames": [
"Transaction Details"
],
"reportStatus": "completed",
"updateTimestamp": "2021-08-20T00:23:05.353Z",
"createTimestamp": "2021-08-20T00:19:05.353Z",
"intervalParam": {
"reportingPeriodStartTimestamp": "2021-08-20 00:18:18",
"reportingPeriodEndTimestamp": "2021-08-20 00:19:18",
"scheduleFrequency": "adhoc"
},
"reportDetails": {
"reportFileName": "992994469896.Multiple.adhoc.2021-08-20.2021-08-20",
"url": "https://helix-data-reporting-files-int.uat.aws.jpmchase.net/api/v1/report-files/c6a6f075-64d5-476f-b463-bc1c5de1abd7"
}
}
],
"lastPage": true
}
Data provided in this request includes:
- Unique report identifier
- Created timestamp for report
- Report period start timestamp and end timestamp (appear for adhoc, daily, weekly, monthly or adhoc)
- Schedule frequency (daily, weekly, monthly or adhoc)
- Report period start time (appear for daily, weekly, monthly)
- Report type name
- Report file name (appear when report status is completed)
- URL (appear when report status is completed)
- Report status
- Update timestamp
- Report configuration id
- Error message in case of failure
Alternatively, you can get the details of a specific report run by adding the reportIdentifier of the report you wish to retrieve to the request.
HTTP method: POST
Endpoint: /reports/{report-id}
{
"reportIdentifier": "c6a6f075-64d5-476f-b463-bc1c5de1abd7",
"reportConfigurationId": "ca788ad9-521c-45ec-b36d-0fdd38701e4d",
"reportTypeNames": [
"Settlement Summary",
"Settlement Details"
],
"reportStatus": "completed",
"updateTimestamp": "2021-08-20T00:23:05.353Z",
"createTimestamp": "2021-08-20T00:19:05.353Z",
"intervalParam": {
"reportingPeriodStartTimestamp": "2021-08-20 00:18:18",
"reportingPeriodEndTimestamp": "2021-08-20 00:19:18",
"scheduleFrequency": "adhoc"
},
"reportDetails": {
"reportFileName": "992994469896.Multiple.adhoc.2021-08-20.2021-08-20",
"url": "https://helix-data-reporting-files-int.uat.aws.jpmchase.net/api/v1/report-files/c6a6f075-64d5-476f-b463-bc1c5de1abd7"
}
}