Report Specification Contract
1. Overview
report.json defines one or more reports to be generated from the data included in an AIVA package. Each report selects an available AIVA report template and identifies the directory containing the data required by that template.
For PackageType: "Report", report.json is required at the archive root.
For archive structure and manifest.json rules, see the AIVAPKG packaging guide.
2. Root Object
The root object describes the report specification and contains the reports to generate.
{
"Name": "Test Report",
"Description": "A sample MFC report",
"Version": "1",
"Reports": []
}
| Property | Type | Required | Default | Constraints / Description |
|---|---|---|---|---|
Name | string | Yes | - | Name of the report specification. |
Description | string | No | - | Optional description of the report specification. |
Version | string | Yes | "1" | Report specification version. |
Reports | array | Yes | - | Report definitions to generate from this package. |
3. Reports
Each item in Reports identifies the template to use and the packaged source data for that generated report.
{
"TemplateId": 1,
"Name": "Report Name",
"SourceDataDirectory": "/data/report-data"
}
| Property | Type | Required | Default | Constraints / Description |
|---|---|---|---|---|
TemplateId | integer | Yes | - | Identifier of the AIVA report template to use. |
Name | string | No | - | If specified, overrides any user-entered report name during upload. Maximum 60 characters. |
SourceDataDirectory | string | No | /data | Directory containing all source data required by the selected template. Must be unique across all reports in the same report.json. |
3.1 TemplateId
TemplateId is mandatory and identifies which published report template the report uses. Template identifiers and their required data bundles are listed under Available Templates.
3.2 Name
Name is optional. When supplied, it overrides any report name entered by the user during upload. The maximum length is 60 characters.
3.3 SourceDataDirectory
SourceDataDirectory identifies the directory inside the package containing the source data for the report. If omitted, it defaults to /data.
The directory must contain all data required by the selected template's documented data bundle. When more than one report is defined, each SourceDataDirectory must be unique.
4. Package Layout
A Report package contains manifest.json and report.json at the archive root, with the report source data under data/.
For the example above, the corresponding SourceDataDirectory is /data/report-data.
5. Available Templates
Each published template defines the exact data bundle that must be provided in the package under the report's SourceDataDirectory.
| Template Identifier | Description | Required Data |
|---|---|---|
| No report templates are currently published. | ||
6. Example
{
"Name": "Test Report",
"Description": "A sample MFC report",
"Version": "1",
"Reports": [
{
"TemplateId": 1,
"Name": "Report Name",
"SourceDataDirectory": "/data/report-data"
}
]
}
7. Empty Template JSON
The following can be used as a starting point when creating a report.json file.
{
"Name": "<NAME>",
"Description": "<DESCRIPTION>",
"Version": "1",
"Reports": [
{
"TemplateId": 0,
"SourceDataDirectory": "/data"
}
]
}