feat: add GET /api/v2/templatebuilder/bases endpoint (#26116)

Implement `GET /api/v2/templatebuilder/bases`, which returns the list of
base templates available in the template builder. Reads from the bundled
catalog by cross-referencing `templatebuilder.BaseTemplateIDs()` with
`examples.List()`, enriching each entry with the OS from the `exampleID
-> OS` map.

The endpoint is gated behind the template builder feature flag (returns
404 when disabled) and requires `policy.ActionRead` on
`rbac.ResourceTemplate`.

Depends on #26115

> [!NOTE]
> This PR was authored by Coder Agents on behalf of @jeremyruppel.
This commit is contained in:
Jeremy Ruppel
2026-06-12 17:40:02 -04:00
committed by GitHub
parent 1215210321
commit 776fbfa748
10 changed files with 405 additions and 3 deletions
+4
View File
@@ -1611,6 +1611,10 @@
"title": "Tasks",
"path": "./reference/api/tasks.md"
},
{
"title": "TemplateBuilder",
"path": "./reference/api/templatebuilder.md"
},
{
"title": "Templates",
"path": "./reference/api/templates.md"