Delivery Mechanisms
The reporting service supports two delivery paths. Streaming delivery (streamResult=true on GET /rest/v1/reports/{reportId}) generates a password-protected ZIP file, uploads it to S3, and notifies the recipient with a download link. State report delivery (via the state-report queue) sends result sets or individual rows directly to the configured channel.
Streaming Delivery (S3-backed)
When a caller sets streamResult=true, the service executes the report in the background, packages the output as a password-protected ZIP, uploads it to S3, and delivers a notification containing the download URL and password.
S3 configuration
| Property | Default | Description |
|---|---|---|
reportstreamer.s3bucket.name | reporting-svc-public | S3 bucket name. Overridden at runtime by the UK_ENVIRONMENT or JG_ENVIRONMENT system variable when set (formatted as <env>-reporting-svc-public). |
reportstreamer.s3bucket.expiry.days | 1 | Number of days before the S3 object expires and the download link becomes invalid. |
reportstreamer.s3bucketsuffix.tenantdate.allowed | false | When true, the bucket name is derived per-tenant and per-date (reporting-svc-<tenantId>-<yyyyMMdd>) instead of the shared bucket. |
aws.s3.url.bucket.suffix | s3-eu-west-1.amazonaws.com | Domain suffix used when constructing the public download URL. |
Email notification templates
The streaming delivery path sends two email templates via the SMTP config — one for success and one for failure.
| Property | Description |
|---|---|
mustache.email.s3bucket.details | Mustache template property name for the success notification email. The template receives reportUrl, password, reportId, tenantName, to, and linkExpiryDays. |
mustache.email.s3bucket.notification.failure | Mustache template property name for the failure notification email. The template receives errorMsg. |
Streaming delivery mechanism types
The deliveryMechanismType query parameter on GET /rest/v1/reports/{reportId} controls how the S3 link is sent.
| Type | deliveryMechanismValue | Behaviour |
|---|---|---|
email | Recipient email address | Sends the Mustache success/failure template via SMTP. Requires SMTP config (see below). |
http | Callback URL | POSTs a JSON body to the URL containing reportUrl, password, reportId, and linkExpiryDays. On error, posts errorMsg instead. |
jira | Jira config JSON (optional) | Creates a Jira ticket. If deliveryMechanismValue is a JSON object, it takes precedence over the global reporting.service.jira.config property. |
State Report Delivery
State reports are delivered via the state-report distributed queue or local-state-report local queue. Each message carries a Config field containing a JSON object that specifies the delivery mechanism and its parameters.
Result-set delivery (ResultSet)
ResultSet)Applies when the message contains a full result set. Supported mechanism types:
| Type | Description |
|---|---|
email | Sends the result set as an email attachment (XLSX or PDF). |
sftp | Uploads the result set as a CSV to an SFTP server. |
http | POSTs the result set rows as a JSON array to a URL. |
jira | Creates a Jira ticket with the result set attached as XLSX. |
sftp-to-email | Downloads a file from SFTP and emails it as an attachment. |
split-data-and-email | Splits the result set by a key column and sends a separate email per group. |
Per-row delivery (ResultRow)
ResultRow)Applies when the message contains a single row. Supported mechanism types:
| Type | Description |
|---|---|
email | Sends a Mustache-templated email, optionally with a PDF attachment. |
http | POSTs the row as JSON to a URL. |
jira | Creates a Jira ticket with the row data. |
sms | Sends a Mustache-templated SMS using the smsTemplate field from the row data. |
audit | Raises a domain event using the eventType from the config. |
SMTP Configuration
Required for all email delivery across both paths.
The SMTP config is stored as a JSON sub-property under the key reporting.service.smtp.config.
| Sub-key | Description |
|---|---|
smtphost | SMTP server hostname |
smtpport | SMTP server port |
smtpuser | SMTP authentication username |
smtppass | SMTP authentication password |
from | Sender address used on all outbound emails |
Example property value:
{
"smtphost": "smtp.example.com",
"smtpport": 587,
"smtpuser": "[email protected]",
"smtppass": "s3cr3t",
"from": "[email protected]"
}Jira Configuration
Required for jira delivery. Stored as a JSON sub-property under reporting.service.jira.config. Per-report overrides can be passed inline as the deliveryMechanismValue JSON object.
| Sub-key | Default | Description |
|---|---|---|
baseUrl | — | Jira instance base URL |
username | — | Jira account username |
token | — | Jira API token |
projectKey | REPO | Jira project key for new tickets |
issueType | REG-32 | Jira issue type ID |
assignToJiraId | — | Jira account ID to assign new tickets to |
parentId | — | Parent issue or epic ID to attach new tickets under |
The Jira issue description is rendered from the template named by property handlebar.template.report.jira.issue.creation.notification.
SFTP Configuration
SFTP delivery does not use a global config property. Each state report config JSON references a named SFTP service by its sftpServiceIdentifier.
State report config fields for SFTP upload
| Field | Description |
|---|---|
sftpServiceIdentifier | Name of the SFTP service connection to use |
fileName | Output filename. Supports {date} and {time} tokens. |
uploadDir | Remote directory path to upload the file to |
dateFormat | Date format pattern for {date} token (default: yyyy-MM-dd) |
timeFormat | Time format pattern for {time} token (default: HH-mm-ss) |
skipHeader | true to omit the CSV column header row |
State report config fields for SFTP-to-email
| Field | Description |
|---|---|
sftpServiceIdentifier | Name of the SFTP service connection to use |
sourceFileName | Remote filename to download. Supports {date} and {time} tokens. |
sourceDir | Remote directory containing the file |
destination | Local path to write the downloaded file (default: /tmp/<sourceFileName>) |
intervalInSec | Optional offset in seconds applied to the current time when resolving date/time tokens |
Email Attachment Configuration (State Reports)
The following fields in the state report config JSON control attachment behaviour when using email delivery for result sets.
| Field | Default | Description |
|---|---|---|
attachmentType | xlsx | Attachment format: xlsx or pdf |
attachmentName | — | Filename for the attachment. Supports {date} and {time} tokens. |
dateFormat | yyyy-MM-dd | Date format for {date} token in attachmentName |
timeFormat | HH-mm-ss | Time format for {time} token in attachmentName |
sheetName | — | Excel sheet name (xlsx only) |
skipHeader | false | true to omit column headers from the attachment |
passwordProtectAttachment | false | true to ZIP-encrypt the attachment with a generated password |
passwordLength | 10 | Character length of the generated password when passwordProtectAttachment is true |
passwordFileName | — | Filename for the password file included as a second attachment |
zipAttachment | false | true to ZIP the attachment without password protection |
includeAttachmentHash | false | true to include a hash.txt attachment containing the SHA256 of the attachment |
to | — | Comma-delimited recipient addresses |
cc | — | Comma-delimited CC addresses |
bcc | — | Comma-delimited BCC addresses |
subject | — | Email subject line |
body | — | Email body text |
Split-data-and-email
| Field | Description |
|---|---|
tenantWiseSeparationKey | Column name in the result set used to group rows into separate emails |
emailAddressHeaderKey | Column name containing comma-delimited recipient addresses for each group |
HTTP Delivery Configuration (State Reports)
| Field | Description |
|---|---|
url | Target endpoint URL |
authorizationHeader | Static value for the Authorization request header |
callAsSystem | true to authenticate the request using the platform system user JWT instead of a static header |
decryptPanField | Name of a field in the row data containing an encrypted PAN that should be decrypted before sending |
Audit Delivery Configuration (State Reports)
| Field | Description |
|---|---|
eventType | Required. The domain event type string raised for each row. |
Updated 3 days ago
