/api/recipes
List every recipe as a directory tree
Returns the recipe tree rooted at the server's base path. Every node — root, directory, and file alike — carries the same four keys: children, name, path, recipe. recipe is null for a directory and non-null for a file; that is the discriminator, not the key's presence. Every path, and a recipe's source.path, is relative to the recipe directory, the root's being ""; it is what GET /api/recipes/{*path} takes. Where the directory is on the server is never sent. Menus (.menu) appear in the same tree as recipes. A recipe's metadata keeps the types its frontmatter used, except tags, which is always an array of strings: the comma-separated spelling tags: breakfast, quick is split into the same array the list spelling tags: [breakfast, quick] gives.
Response
{
"children": {
"Breakfast": {
"children": {
"Easy Pancakes": {
"children": {},
"name": "Easy Pancakes",
"path": "Breakfast/Easy Pancakes.cook",
"recipe": {
"metadata": {
"author": "CookCLI Team",
"servings": 2,
"tags": ["breakfast", "quick"],
"description": "Simple crepes that are perfect for a lazy weekend breakfast."
},
"source": {
"path": "Breakfast/Easy Pancakes.cook",
"source_type": "Path"
}
}
}
},
"name": "Breakfast",
"path": "Breakfast",
"recipe": null
}
},
"name": "seed",
"path": "",
"recipe": null
}