Roasting

Roast profile routes

Create, import, analyze, and clear roast profiles through session-authenticated internal endpoints.

Roast routes cover CRUD for roast profiles, Artisan import, chart telemetry, chart display settings, data clearing, and AI-assisted classification.

All roast routes require an authenticated session. The AI classifier additionally requires the member role.

Endpoints

RouteMethodsAuthPurpose
/api/roast-profilesGET POST PUT DELETESessionList, create, update, or delete roast profiles
/api/artisan-importPOSTSessionImport an Artisan roast file into an existing roast profile
/api/roast-chart-dataGETSessionReturn sampled roast telemetry and metadata for a roast
/api/roast-chart-settingsGETSessionRead saved chart ranges for a roast
/api/clear-roastDELETESession + ownershipClear imported roast telemetry and reset Artisan fields
/api/ai/classify-roastPOSTSession + member roleClassify a roast against inventory candidates using the model backend

Key behaviors

  • POST /api/roast-profiles supports both single and batch creation and recalculates stocked status for each affected inventory record.
  • PUT /api/roast-profiles requires an id query parameter. DELETE accepts either id or batch name query parameters.
  • POST /api/artisan-import expects multipart form-data with file and roastId. Supported file extensions are .alog, .alog.json, and .json.
  • GET /api/roast-chart-data requires roastId and returns sampled telemetry tuned for charting, including performance metadata and derived ranges.
  • DELETE /api/clear-roast requires roast_id and verifies ownership before deleting imported telemetry, events, and log rows.
  • POST /api/ai/classify-roast expects alogMetadata plus an inventory array and returns { match } or { match: null }.

CLI access

The CLI is the cleanest supported interface for roast workflows outside the browser, especially for imports and automated watch-folder flows.

Import an Artisan file
purvey roast import roast.alog --coffee-id 42 --batch-name "Guji test batch" --pretty

Related links