Skip to content

Add GET templates under v3#2878

Open
jzbahrai wants to merge 5 commits into
mainfrom
task/template-get-api
Open

Add GET templates under v3#2878
jzbahrai wants to merge 5 commits into
mainfrom
task/template-get-api

Conversation

@jzbahrai
Copy link
Copy Markdown
Collaborator

@jzbahrai jzbahrai commented May 27, 2026

Summary | Résumé

Added a GET template method. This method currently exists, but we want to gate it behind APIKEYs with manage_template permissions.

Test instructions | Instructions pour tester la modification

  1. Test getting a template locally
  2. If you aren't use a the new API key with a manage template permission, you should get a forbidden error
  3. Otherwise the template should return
  4. Test both scenarios

@jzbahrai jzbahrai marked this pull request as ready for review May 28, 2026 20:31
@jzbahrai jzbahrai requested a review from jimleroyer as a code owner May 28, 2026 20:31
Copilot AI review requested due to automatic review settings May 28, 2026 20:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new authenticated /v3/template/<template_id> GET endpoint intended to expose template details only to API keys with manage_templates permission.

Changes:

  • Registers a new v3 template blueprint and GET template route.
  • Adds serialization for template metadata including category, folder, process type, and archived state.
  • Adds v3 endpoint tests and API-key fixtures for permission-gated access.

Reviewed changes

Copilot reviewed 5 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
app/__init__.py Registers the v3 template blueprint.
app/v3/__init__.py Adds v3 package marker.
app/v3/template/__init__.py Defines the v3 template blueprint and error handlers.
app/v3/template/get_template.py Implements the v3 GET template endpoint and response serialization.
tests/app/conftest.py Adds API-key fixtures with and without template management permission.
tests/app/v3/__init__.py Adds v3 test package marker.
tests/app/v3/template/__init__.py Adds v3 template test package marker.
tests/app/v3/template/test_get_template.py Adds endpoint behavior and permission tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/app/v3/template/test_get_template.py Outdated
Comment thread app/v3/template/get_template.py Outdated
Comment thread app/v3/template/get_template.py Outdated
Comment thread app/__init__.py
from app.v3.template import ( # noqa
get_template as v3_get_template,
)
from app.v3.template import (
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the formatter make format is forcing this :/

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.

2 participants