Production · Roast
6 operations in the production.roast namespace.
production.roast.completeRoastBatch
Section titled “production.roast.completeRoastBatch”Finish a roast and persist its curve
POST /rpc/v1/production.roast.completeRoastBatchReads 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.
Request
Section titled “Request”| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes | |
dropWeightKg |
string | no | |
notes |
string | no |
Example
Section titled “Example”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 '{}'production.roast.getRoastBatch
Section titled “production.roast.getRoastBatch”Get a roast batch
POST /rpc/v1/production.roast.getRoastBatchAlso 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.
Request
Section titled “Request”| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes |
Example
Section titled “Example”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 '{}'production.roast.getRoastCurve
Section titled “production.roast.getRoastCurve”A batch’s curve and events
POST /rpc/v1/production.roast.getRoastCurveAlso 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.
Request
Section titled “Request”| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes |
Example
Section titled “Example”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 '{}'production.roast.importArtisanRoast
Section titled “production.roast.importArtisanRoast”Import a roast from an Artisan export
POST /rpc/v1/production.roast.importArtisanRoastAccepts 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.
Request
Section titled “Request”| Field | Type | Required | Description |
|---|---|---|---|
content |
string | yes | |
batchNumber |
string | yes | |
machineId |
string | no |
Example
Section titled “Example”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 '{}'production.roast.listRoastBatches
Section titled “production.roast.listRoastBatches”List roast batches
POST /rpc/v1/production.roast.listRoastBatchesAlso 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.
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/production.roast.listRoastBatches \ -H "Authorization: Bearer $ROASTERY_API_KEY" \ -H "X-Roastery-Org: $ORG_ID" \ -H "Content-Type: application/json" \ -d '{}'production.roast.startRoastBatch
Section titled “production.roast.startRoastBatch”Open a roast batch for streaming
POST /rpc/v1/production.roast.startRoastBatchCreates 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.
Request
Section titled “Request”| Field | Type | Required | Description |
|---|---|---|---|
batchNumber |
string | yes | |
machineId |
string | yes | |
profileId |
string | no | |
greenLotId |
string | no | |
chargeWeightKg |
string | yes | |
locationId |
string | no |
Example
Section titled “Example”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 '{}'