API Interface V4
OpenAPI 3.0 Specification
OpenAPI Viewer
API Endpoints
api.flowcoffee.co.nz/api/v4/organisations
api.flowcoffee.co.nz/api/v4/sites
api.flowcoffee.co.nz/api/v4/espresso_machines
api.flowcoffee.co.nz/api/v4/groupheads
api.flowcoffee.co.nz/api/v4/recipes
api.flowcoffee.co.nz/api/v4/recipe_groupheads
api.flowcoffee.co.nz/api/v4/extractions
Authentication
Obtaining an Authentication Token
Each Flow Dashboard user is automatically generated an API authentication token which can be found on the User Settings page under API Token
Data Definition
Calculating Aggregate Metrics
Extractions that Met Recipe
SELECT COUNT(id) FROM extractions WHERE extractions.recipeMatch NOT NULL AND extractions.recipeMatch.recipeId = recipes.id AND extraction.groupheadId = groupheads-recipes.groupheadId AND recipe.id = grouphead-recipes.recipeId AND extractions.duration BETWEEN recipes.durationMin AND recipes.durationMax AND extractions.brewWaterVolume.value BETWEEN recipe-groupheads.brewWaterVolumeMin.value AND recipe-groupheads.brewWaterVolumeMax.value
Extractions that Missed on Time
SELECT COUNT(id) FROM extractions WHERE extractions.recipeMatch NOT NULL AND extractions.recipeMatch.recipeId = recipes.id AND extractions.duration NOT BETWEEN recipes.durationMin AND recipes.durationMax
Extractions that were Too Fast
SELECT COUNT(id) FROM extractions WHERE extractions.recipeMatch NOT NULL AND extractions.recipeMatch.recipeId = recipes.id AND extractions.duration < recipes.durationMin
Extractions that were Too Slow
SELECT COUNT(id) FROM extractions WHERE extractions.recipeMatch NOT NULL AND extractions.recipeMatch.recipeId = recipes.id AND extractions.duration > recipes.durationMax
Extractions that Missed on Volume
SELECT COUNT(id) FROM extractions WHERE extractions.recipeMatch NOT NULL AND extractions.recipeMatch.recipeId = recipes.id AND extraction.groupheadId = groupheads-recipes.groupheadId AND recipe.id = grouphead-recipes.recipeId AND extractions.brewWaterVolume.value NOT BETWEEN recipe-groupheads.brewWaterVolumeMin.value AND recipe-groupheads.brewWaterVolumeMax.value
Extractions that Missed on Both Time and Volume
SELECT COUNT(id) FROM extractions WHERE extractions.recipeMatch IS NULL