...
Child pages (Children Display) |
---|
|
API Interface V4
...
OpenAPI 3.0
...
Specification
View file |
---|
name | FlowCoffee-FlowDataExchangeFlow Coffee Data Exchange API specification - 1.1.0.yaml |
---|
|
OpenAPI Viewer
Swc macro |
---|
defaultModelRendering | Model |
---|
attachment | Flow Coffee Data Exchange API specification - 1. |
---|
|
...
...
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
api.flowcoffee.co.nz/api/v4/denormalized-flow-events
Authentication
Bearer Authentication
...
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
View file |
---|
name | Flow Coffee Data Exchange ERD.pdf |
---|
|
Calculating Aggregate Metrics
Code Block |
---|
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 |
Code Block |
---|
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 |
Code Block |
---|
SELECT COUNT(id) FROM extractions
WHERE extractions.recipeMatch NOT NULL
AND extractions.recipeMatch.recipeId = recipes.id
AND extractions.duration < recipes.durationMin |
Code Block |
---|
SELECT COUNT(id) FROM extractions
WHERE extractions.recipeMatch NOT NULL
AND extractions.recipeMatch.recipeId = recipes.id
AND extractions.duration > recipes.durationMax |
Code Block |
---|
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
Code Block |
---|
SELECT COUNT(id) FROM extractions
WHERE extractions.recipeMatch IS NULL |