Skip to content

Production · Roast

6 operations in the production.roast namespace.

Finish a roast and persist its curve

POST /rpc/v1/production.roast.completeRoastBatch

Reads the buffered curve out of the live session, writes the full-fidelity copy to object storage and a 1 Hz downsample to the database, derives the batch metrics, and deducts the green consumed. The session buffer is discarded only after those writes are CONFIRMED, so a failure leaves the curve recoverable.

Requires permission production.roast.write and the roasting module on the organization’s plan.

Field Type Required Description
id string yes
dropWeightKg string no
notes string no
Terminal window
curl -X POST https://api.roastery.run/rpc/v1/production.roast.completeRoastBatch \
-H "Authorization: Bearer $ROASTERY_API_KEY" \
-H "X-Roastery-Org: $ORG_ID" \
-H "Content-Type: application/json" \
-d '{}'

Get a roast batch

POST /rpc/v1/production.roast.getRoastBatch

Also available as GET with a URL-encoded input query parameter, so the response can be HTTP-cached.

Requires permission production.roast.read and the roasting module on the organization’s plan.

Field Type Required Description
id string yes
Terminal window
curl -X POST https://api.roastery.run/rpc/v1/production.roast.getRoastBatch \
-H "Authorization: Bearer $ROASTERY_API_KEY" \
-H "X-Roastery-Org: $ORG_ID" \
-H "Content-Type: application/json" \
-d '{}'

A batch’s curve and events

POST /rpc/v1/production.roast.getRoastCurve

Also available as GET with a URL-encoded input query parameter, so the response can be HTTP-cached.

Returns the 1 Hz downsample held in the database — enough resolution for every comparison and deviation question. The full-fidelity curve lives in object storage and is fetched separately.

Requires permission production.roast.read and the roasting module on the organization’s plan.

Field Type Required Description
id string yes
Terminal window
curl -X POST https://api.roastery.run/rpc/v1/production.roast.getRoastCurve \
-H "Authorization: Bearer $ROASTERY_API_KEY" \
-H "X-Roastery-Org: $ORG_ID" \
-H "Content-Type: application/json" \
-d '{}'

Import a roast from an Artisan export

POST /rpc/v1/production.roast.importArtisanRoast

Accepts Artisan JSON or CSV. Sample times are rebased against the charge index, so a recorder left running before charge does not offset the whole curve.

Requires permission production.roast.write and the roasting module on the organization’s plan.

Field Type Required Description
content string yes
batchNumber string yes
machineId string no
Terminal window
curl -X POST https://api.roastery.run/rpc/v1/production.roast.importArtisanRoast \
-H "Authorization: Bearer $ROASTERY_API_KEY" \
-H "X-Roastery-Org: $ORG_ID" \
-H "Content-Type: application/json" \
-d '{}'

List roast batches

POST /rpc/v1/production.roast.listRoastBatches

Also available as GET with a URL-encoded input query parameter, so the response can be HTTP-cached.

Requires permission production.roast.read and the roasting 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/production.roast.listRoastBatches \
-H "Authorization: Bearer $ROASTERY_API_KEY" \
-H "X-Roastery-Org: $ORG_ID" \
-H "Content-Type: application/json" \
-d '{}'

Open a roast batch for streaming

POST /rpc/v1/production.roast.startRoastBatch

Creates the batch and opens its live session. Telemetry is then posted to /ingest/v1/roast/\{batchId\}/samples by the machine bridge, and watched over /stream/v1/roast/\{batchId\}.

Requires permission production.roast.write and the roasting module on the organization’s plan.

Field Type Required Description
batchNumber string yes
machineId string yes
profileId string no
greenLotId string no
chargeWeightKg string yes
locationId string no
Terminal window
curl -X POST https://api.roastery.run/rpc/v1/production.roast.startRoastBatch \
-H "Authorization: Bearer $ROASTERY_API_KEY" \
-H "X-Roastery-Org: $ORG_ID" \
-H "Content-Type: application/json" \
-d '{}'