mirror of
https://github.com/coder/coder.git
synced 2025-07-12 00:14:10 +00:00
fix(coderd): list templates returns non-deprecated templates by default (#17747)
## Description Modifies the behaviour of the "list templates" API endpoints to return non-deprecated templates by default. Users can still query for deprecated templates by specifying the `deprecated=true` query parameter. **Note:** The deprecation feature is an enterprise-level feature ## Affected Endpoints * /api/v2/organizations/{organization}/templates * /api/v2/templates Fixes #17565
This commit is contained in:
8
docs/reference/api/templates.md
generated
8
docs/reference/api/templates.md
generated
@ -13,6 +13,10 @@ curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/templat
|
||||
|
||||
`GET /organizations/{organization}/templates`
|
||||
|
||||
Returns a list of templates for the specified organization.
|
||||
By default, only non-deprecated templates are returned.
|
||||
To include deprecated templates, specify `deprecated:true` in the search query.
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | In | Type | Required | Description |
|
||||
@ -739,6 +743,10 @@ curl -X GET http://coder-server:8080/api/v2/templates \
|
||||
|
||||
`GET /templates`
|
||||
|
||||
Returns a list of templates.
|
||||
By default, only non-deprecated templates are returned.
|
||||
To include deprecated templates, specify `deprecated:true` in the search query.
|
||||
|
||||
### Example responses
|
||||
|
||||
> 200 Response
|
||||
|
Reference in New Issue
Block a user