Skip to content

Reporting

4 operations in the reporting namespace.

Generate a report

POST /rpc/v1/reporting.generateReport

Returns 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.

Field Type Required Description
kind traceability_certificate | inventory_valuation | production_summary | quality_summary | cafe_performance yes
title string no
parameters object no
Terminal window
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 '{}'

A time-limited download link

POST /rpc/v1/reporting.getDownloadUrl

The 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.

Field Type Required Description
id string yes
expiresInSeconds integer no
Terminal window
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 '{}'

A report and its status

POST /rpc/v1/reporting.getReport

Requires permission reporting.read and the core module on the organization’s plan.

Field Type Required Description
id string yes
Terminal window
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 '{}'

List reports

POST /rpc/v1/reporting.listReports

Also 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.

Field Type Required Description
filter object no
page object no
Terminal window
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 '{}'