---
updatedAt: 2025-07-28T19:23:33.000Z
agentTools:
  projectIndex: https://rumbleup.readme.io/llms.txt
---

# Create and Download Reports

```node Node
import rumbleup from '@api/rumbleup';

let report = await rumbleup.report_create({
  title: "ProjectStats",   // Required: report type or name (e.g., "ProjectStats")
  interval: 0,             // Optional: 0 for one-time; pass minutes (e.g., 30) for a recurring scheduled report
  // ...additional filters or parameters for this report type
});
console.log("Report created:", report.data);
let reportId = report.data.rpid;

let reportStatus;
do {
  let result = await rumbleup.report_get({ rpid: reportId });
  reportStatus = result.data.status;
  console.log("Report status:", reportStatus);

  if (reportStatus !== "done") {
		await new Promise(res => setTimeout(res, 5 * 60 * 1000)); // Wait 5 minutes
  }
} while (reportStatus !== "done");


let finalReport = await rumbleup.report_get({ rpid: reportId });
let files = finalReport.data.files;

if (files.length === 0) {
  throw new Error("Report is complete but contains no files.");
}

let latestFileId = files[0].id;

let fileDownload = await rumbleup.report_download({
  rpid: reportId,
  fileid: latestFileId
});

console.log("Report file downloaded:", fileDownload.data);

```

```json Response Example
{"success":true}
```

# Create a new report

<!-- node@3-9 -->

Create a one-time or recurring report by specifying the report title (type) and optional interval in minutes.

# Poll report status

<!-- node@11-30 -->

The report may take a some time to generate. Poll `report_get` until the status is "done".

# Download report

<!-- node@30-37 -->

Once complete, download the most recent file from the report