Catalog · Machine
5 operations in the catalog.machine namespace.
catalog.machine.getMachine
Section titled “catalog.machine.getMachine”Get one machine
POST /rpc/v1/catalog.machine.getMachineAlso 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.
Request
Section titled “Request”| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes |
Example
Section titled “Example”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 '{}'catalog.machine.issueMachineBridgeToken
Section titled “catalog.machine.issueMachineBridgeToken”Issue a streaming credential for a machine
POST /rpc/v1/catalog.machine.issueMachineBridgeTokenScoped 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.
Request
Section titled “Request”| Field | Type | Required | Description |
|---|---|---|---|
machineId |
string | yes | |
expiresInHours |
integer | no |
Example
Section titled “Example”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 '{}'catalog.machine.listMachines
Section titled “catalog.machine.listMachines”List roasting machines
POST /rpc/v1/catalog.machine.listMachinesAlso 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.
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/catalog.machine.listMachines \ -H "Authorization: Bearer $ROASTERY_API_KEY" \ -H "X-Roastery-Org: $ORG_ID" \ -H "Content-Type: application/json" \ -d '{}'catalog.machine.registerMachine
Section titled “catalog.machine.registerMachine”Register a roasting machine
POST /rpc/v1/catalog.machine.registerMachineMachines 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.
Request
Section titled “Request”| 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 |
Example
Section titled “Example”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 '{}'catalog.machine.updateMachine
Section titled “catalog.machine.updateMachine”Update a machine
POST /rpc/v1/catalog.machine.updateMachineRequires permission catalog.machine.write and the core module on the organization’s plan.
Request
Section titled “Request”| 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 |
Example
Section titled “Example”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 '{}'