@@ -244,7 +244,7 @@ curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/templat
244244
245245To perform this operation, you must be authenticated by means of one of the following methods: ** CoderSessionToken** .
246246
247- ## Update template metadata by ID
247+ ## Get template metadata by ID
248248
249249### Code samples
250250
@@ -349,3 +349,65 @@ curl -X DELETE http://coder-server:8080/api/v2/templates/{id} \
349349| 200 | [ OK] ( https://tools.ietf.org/html/rfc7231#section-6.3.1 ) | OK | [ codersdk.Response] ( schemas.md#codersdkresponse ) |
350350
351351To perform this operation, you must be authenticated by means of one of the following methods: ** CoderSessionToken** .
352+
353+ ## Update template metadata by ID
354+
355+ ### Code samples
356+
357+ ``` shell
358+ # Example request using curl
359+ curl -X PATCH http://coder-server:8080/api/v2/templates/{id} \
360+ -H ' Accept: application/json' \
361+ -H ' Coder-Session-Token: API_KEY'
362+ ```
363+
364+ ` PATCH /templates/{id} `
365+
366+ ### Parameters
367+
368+ | Name | In | Type | Required | Description |
369+ | ---- | ---- | ------------ | -------- | ----------- |
370+ | ` id ` | path | string(uuid) | true | Template ID |
371+
372+ ### Example responses
373+
374+ > 200 Response
375+
376+ ``` json
377+ {
378+ "active_user_count" : 0 ,
379+ "active_version_id" : " string" ,
380+ "allow_user_cancel_workspace_jobs" : true ,
381+ "build_time_stats" : {
382+ "property1" : {
383+ "p50" : 123 ,
384+ "p95" : 146
385+ },
386+ "property2" : {
387+ "p50" : 123 ,
388+ "p95" : 146
389+ }
390+ },
391+ "created_at" : " 2019-08-24T14:15:22Z" ,
392+ "created_by_id" : " 9377d689-01fb-4abf-8450-3368d2c1924f" ,
393+ "created_by_name" : " string" ,
394+ "default_ttl_ms" : 0 ,
395+ "description" : " string" ,
396+ "display_name" : " string" ,
397+ "icon" : " string" ,
398+ "id" : " 497f6eca-6276-4993-bfeb-53cbbbba6f08" ,
399+ "name" : " string" ,
400+ "organization_id" : " 7c60d51f-b44e-4682-87d6-449835ea4de6" ,
401+ "provisioner" : " string" ,
402+ "updated_at" : " 2019-08-24T14:15:22Z" ,
403+ "workspace_owner_count" : 0
404+ }
405+ ```
406+
407+ ### Responses
408+
409+ | Status | Meaning | Description | Schema |
410+ | ------ | ------------------------------------------------------- | ----------- | ------------------------------------------------ |
411+ | 200 | [ OK] ( https://tools.ietf.org/html/rfc7231#section-6.3.1 ) | OK | [ codersdk.Template] ( schemas.md#codersdktemplate ) |
412+
413+ To perform this operation, you must be authenticated by means of one of the following methods: ** CoderSessionToken** .
0 commit comments