Skip to main content

Overview

The Reports API provides endpoints to list, download, and manage execution reports. AutoMFlows supports multiple report formats including HTML, Allure, JSON, JUnit XML, CSV, and Markdown.

List Report Folders

Retrieve a list of all report folders with metadata including report types and files.

Endpoint

GET /api/reports/list

Example Request

curl http://localhost:3003/api/reports/list

Response

Returns an array of report folder objects, sorted by creation time (newest first).
folderName
string
required
Report folder name (format: workflowName-timestamp)
createdAt
string
required
ISO 8601 timestamp when report was created
reportTypes
array
required
Array of report types available in this folder: html, allure, json, junit, csv, markdown
files
array
required
Array of files in the report folder

Response Example

[
  {
    "folderName": "example-workflow-1709856234567",
    "createdAt": "2024-03-07T15:30:34.567Z",
    "reportTypes": ["html", "json"],
    "files": [
      {
        "name": "report.html",
        "path": "html/report.html",
        "type": "html"
      },
      {
        "name": "execution.json",
        "path": "json/execution.json",
        "type": "json"
      },
      {
        "name": "screenshot-1.png",
        "path": "screenshots/screenshot-1.png",
        "type": "screenshots"
      }
    ]
  },
  {
    "folderName": "sample-workflow-1709856123456",
    "createdAt": "2024-03-07T15:28:43.456Z",
    "reportTypes": ["html", "allure", "junit"],
    "files": [
      {
        "name": "index.html",
        "path": "html/index.html",
        "type": "html"
      },
      {
        "name": "allure-report.html",
        "path": "allure/allure-report.html",
        "type": "allure"
      },
      {
        "name": "junit.xml",
        "path": "junit/junit.xml",
        "type": "junit"
      }
    ]
  }
]

Get Report Folder Files

Retrieve a list of all files in a specific report folder.

Endpoint

GET /api/reports/{folderName}/files

Path Parameters

folderName
string
required
Report folder name

Example Request

cURL
curl http://localhost:3003/api/reports/example-workflow-1709856234567/files

Response

[
  {
    "name": "report.html",
    "path": "html/report.html",
    "type": "html",
    "fullPath": "/absolute/path/to/output/example-workflow-1709856234567/html/report.html"
  },
  {
    "name": "execution.json",
    "path": "json/execution.json",
    "type": "json",
    "fullPath": "/absolute/path/to/output/example-workflow-1709856234567/json/execution.json"
  },
  {
    "name": "screenshot-1.png",
    "path": "screenshots/screenshot-1.png",
    "type": "screenshots",
    "fullPath": "/absolute/path/to/output/example-workflow-1709856234567/screenshots/screenshot-1.png"
  }
]

Get Report File

Download or view a specific report file.

Endpoint

GET /api/reports/{folderName}/{reportType}/{filename}

Path Parameters

folderName
string
required
Report folder name
reportType
string
required
Report type directory: html, allure, json, junit, csv, markdown
filename
string
required
Report filename

Example Requests

# View HTML report in browser
curl http://localhost:3003/api/reports/example-workflow-1709856234567/html/report.html

# Or open in browser
open http://localhost:3003/api/reports/example-workflow-1709856234567/html/report.html

Response

The file content is returned with the appropriate Content-Type header:
File ExtensionContent-Type
.htmltext/html
.jsonapplication/json
.xmlapplication/xml
.csvtext/csv
.mdtext/markdown
.pngimage/png
.jpg, .jpegimage/jpeg

Get Screenshot

Retrieve a screenshot image from a report folder.

Endpoint

GET /api/reports/{folderName}/screenshots/{filename}

Path Parameters

folderName
string
required
Report folder name
filename
string
required
Screenshot filename (e.g., screenshot-1.png)

Example Request

cURL
# Download screenshot
curl http://localhost:3003/api/reports/example-workflow-1709856234567/screenshots/screenshot-1.png \
  -o screenshot.png

# View in browser
open http://localhost:3003/api/reports/example-workflow-1709856234567/screenshots/screenshot-1.png

Response

The screenshot image is returned with Content-Type: image/png.

Delete Report Folder

Delete a specific report folder and all its contents.
This action cannot be undone. The report folder and all files will be permanently deleted.

Endpoint

DELETE /api/reports/{folderName}

Path Parameters

folderName
string
required
Report folder name to delete

Example Request

curl -X DELETE http://localhost:3003/api/reports/example-workflow-1709856234567

Response

success
boolean
required
Whether the deletion succeeded
message
string
required
Success message
Response Example
{
  "success": true,
  "message": "Report folder example-workflow-1709856234567 deleted"
}

Error Response (404)

{
  "error": "Report folder not found"
}

Delete All Reports

Delete all report folders and their contents.
This action cannot be undone. All report folders and files will be permanently deleted.

Endpoint

DELETE /api/reports/

Example Request

cURL
curl -X DELETE http://localhost:3003/api/reports/

Response

success
boolean
required
Whether the deletion succeeded
message
string
required
Success message with count of deleted folders
Response Example
{
  "success": true,
  "message": "Deleted 15 report folder(s)"
}

Report Types

AutoMFlows supports multiple report formats:

HTML Report

Interactive HTML report with execution details, node logs, and screenshots.Features:
  • Execution timeline
  • Node-by-node breakdown
  • Embedded screenshots
  • Error highlighting
  • Responsive design
Location: {folderName}/html/report.html

Report Folder Structure

Report folders follow a consistent structure:
output/
└── example-workflow-1709856234567/
    ├── html/
    │   └── report.html
    ├── json/
    │   └── execution.json
    ├── junit/
    │   └── results.xml
    ├── csv/
    │   └── report.csv
    ├── markdown/
    │   └── report.md
    ├── allure/
    │   ├── index.html
    │   └── data/
    └── screenshots/
        ├── screenshot-1.png
        ├── screenshot-2.png
        └── screenshot-3.png

Static File Access

Reports can also be accessed via static file serving:
# Direct file access
http://localhost:3003/reports/{folderName}/html/report.html
http://localhost:3003/reports/{folderName}/screenshots/screenshot-1.png
This is useful for:
  • Opening reports directly in a browser
  • Embedding screenshots in other pages
  • Linking to reports from external tools

Report Retention

Configure automatic report cleanup using the reportRetention setting:
{
  "reportConfig": {
    "enabled": true,
    "reportTypes": ["html"],
    "reportRetention": 10
  }
}
When reportRetention is set, older reports are automatically deleted when the limit is exceeded, keeping only the most recent N reports.

Next Steps

Generate Reports

Learn how to generate reports during execution

CI/CD Integration

Integrate reports with CI/CD pipelines

Build docs developers (and LLMs) love