Reporting
4 operations in the reporting namespace.
reporting.generateReport
Section titled “reporting.generateReport”Generate a report
POST /rpc/v1/reporting.generateReportReturns as soon as the report row exists. Rendering happens in the background; poll getReport until the status is ready, then ask for a download link.
Requires permission reporting.read and the core module on the organization’s plan.
Request
Section titled “Request”| Field | Type | Required | Description |
|---|---|---|---|
kind |
traceability_certificate | inventory_valuation | production_summary | quality_summary | cafe_performance |
yes | |
title |
string | no | |
parameters |
object | no |
Example
Section titled “Example”curl -X POST https://api.roastery.run/rpc/v1/reporting.generateReport \ -H "Authorization: Bearer $ROASTERY_API_KEY" \ -H "X-Roastery-Org: $ORG_ID" \ -H "Content-Type: application/json" \ -d '{}'reporting.getDownloadUrl
Section titled “reporting.getDownloadUrl”A time-limited download link
POST /rpc/v1/reporting.getDownloadUrlThe link stops working when it expires. That is the difference between sharing a document and publishing one: reports get forwarded, and a public bucket URL is permanent and cannot be revoked.
Requires permission reporting.read and the core module on the organization’s plan.
Request
Section titled “Request”| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes | |
expiresInSeconds |
integer | no |
Example
Section titled “Example”curl -X POST https://api.roastery.run/rpc/v1/reporting.getDownloadUrl \ -H "Authorization: Bearer $ROASTERY_API_KEY" \ -H "X-Roastery-Org: $ORG_ID" \ -H "Content-Type: application/json" \ -d '{}'reporting.getReport
Section titled “reporting.getReport”A report and its status
POST /rpc/v1/reporting.getReportRequires permission reporting.read and the core module on the organization’s plan.
Request
Section titled “Request”| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes |
Example
Section titled “Example”curl -X POST https://api.roastery.run/rpc/v1/reporting.getReport \ -H "Authorization: Bearer $ROASTERY_API_KEY" \ -H "X-Roastery-Org: $ORG_ID" \ -H "Content-Type: application/json" \ -d '{}'reporting.listReports
Section titled “reporting.listReports”List reports
POST /rpc/v1/reporting.listReportsAlso available as GET with a URL-encoded input query parameter, so the response can be HTTP-cached.
Requires permission reporting.read and the core module on the organization’s plan.
Request
Section titled “Request”| Field | Type | Required | Description |
|---|---|---|---|
filter |
object | no | |
page |
object | no |
Example
Section titled “Example”curl -X POST https://api.roastery.run/rpc/v1/reporting.listReports \ -H "Authorization: Bearer $ROASTERY_API_KEY" \ -H "X-Roastery-Org: $ORG_ID" \ -H "Content-Type: application/json" \ -d '{}'