Skip to content

Add server API for UI templates#3570

Open
peterschmidt85 wants to merge 2 commits intomasterfrom
templates-api
Open

Add server API for UI templates#3570
peterschmidt85 wants to merge 2 commits intomasterfrom
templates-api

Conversation

@peterschmidt85
Copy link
Contributor

Relates to #3569

Add POST /api/project/{project_name}/templates/list endpoint that serves UI templates from an external git repo configured via DSTACK_SERVER_TEMPLATES_REPO.

Currently returns only server-wide templates; project-specific templates will be added in a future iteration.

peterschmidt85 and others added 2 commits February 12, 2026 10:47
Add POST /api/project/{project_name}/templates/list endpoint that serves
UI templates from an external git repo configured via DSTACK_SERVER_TEMPLATES_REPO.

Templates are YAML files under .dstack/templates/ in the repo, parsed into
typed pydantic models with a discriminated union for parameter types.
Results are cached with a 3-minute TTL using cachetools.TTLCache.

Currently returns only server-wide templates; project-specific templates
will be added in a future iteration.

Co-authored-by: Cursor <cursoragent@cursor.com>
Match codebase pattern for version-dependent HTTPBearer status codes.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant