Skip to content

Catalog · Machine

5 operations in the catalog.machine namespace.

Get one machine

POST /rpc/v1/catalog.machine.getMachine

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

Requires permission catalog.machine.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/catalog.machine.getMachine \
-H "Authorization: Bearer $ROASTERY_API_KEY" \
-H "X-Roastery-Org: $ORG_ID" \
-H "Content-Type: application/json" \
-d '{}'

Issue a streaming credential for a machine

POST /rpc/v1/catalog.machine.issueMachineBridgeToken

Scoped to one machine and able to do nothing but stream telemetry. A shop-floor PC is physically accessible and rarely patched, so it must never hold a credential that could act on the rest of the organization.

Requires permission catalog.machine.write and the core module on the organization’s plan.

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

List roasting machines

POST /rpc/v1/catalog.machine.listMachines

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

Requires permission catalog.machine.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/catalog.machine.listMachines \
-H "Authorization: Bearer $ROASTERY_API_KEY" \
-H "X-Roastery-Org: $ORG_ID" \
-H "Content-Type: application/json" \
-d '{}'

Register a roasting machine

POST /rpc/v1/catalog.machine.registerMachine

Machines are a metered resource: plans cap how many an organization may register, so this can fail with 402 when the limit is reached.

Requires permission catalog.machine.write and the core module on the organization’s plan.

Field Type Required Description
name string yes
code string yes
locationId string no
brand string no
model string no
machineType drum | fluid_bed | recirculating | sample | tangential | centrifugal no
capacityKg number no
minBatchKg number no
maxBatchKg number no
connectivity none | artisan | bridge | modbus | serial | cloud_api no
installedAt string no
Terminal window
curl -X POST https://api.roastery.run/rpc/v1/catalog.machine.registerMachine \
-H "Authorization: Bearer $ROASTERY_API_KEY" \
-H "X-Roastery-Org: $ORG_ID" \
-H "Content-Type: application/json" \
-d '{}'

Update a machine

POST /rpc/v1/catalog.machine.updateMachine

Requires permission catalog.machine.write and the core module on the organization’s plan.

Field Type Required Description
name string no
locationId string no
brand string no
model string no
machineType drum | fluid_bed | recirculating | sample | tangential | centrifugal no
capacityKg number no
minBatchKg number no
maxBatchKg number no
connectivity none | artisan | bridge | modbus | serial | cloud_api no
installedAt string no
id string yes
isActive boolean no
Terminal window
curl -X POST https://api.roastery.run/rpc/v1/catalog.machine.updateMachine \
-H "Authorization: Bearer $ROASTERY_API_KEY" \
-H "X-Roastery-Org: $ORG_ID" \
-H "Content-Type: application/json" \
-d '{}'