---
title: "Get template settings by ID"
method: GET
path: "/api/v2/templates/{template}"
tags: ["Templates"]
---

# Get template settings by ID

`GET /api/v2/templates/{template}`

## Path parameters

- `template` string, uuid, required

## Response `200`

OK

- CodersdkTemplate
  - `active_user_count` integer — ActiveUserCount is set to -1 when loading.
  - `active_version_id` string, uuid
  - `activity_bump_ms` integer
  - `agents_allowed` boolean
  - `allow_user_autostart` boolean — AllowUserAutostart and AllowUserAutostop are enterprise-only. Their values are only used if your license is entitled to use the advanced template scheduling feature.
  - `allow_user_autostop` boolean
  - `allow_user_cancel_workspace_jobs` boolean
  - `autostart_requirement` CodersdkTemplateAutostartRequirement
    - `days_of_week` string[] — DaysOfWeek is a list of days of the week in which autostart is allowed to happen. If no days are specified, autostart is not allowed.
  - `autostop_requirement` CodersdkTemplateAutostopRequirement
    - `days_of_week` string[] — DaysOfWeek is a list of days of the week on which restarts are required. Restarts happen within the user's quiet hours (in their configured timezone). If no days are specified, restarts are not required. Weekdays cannot be specified twice. Restarts will only happen on weekdays in this list on weeks which line up with Weeks.
    - `weeks` integer — Weeks is the number of weeks between required restarts. Weeks are synced across all workspaces (and Coder deployments) using modulo math on a hardcoded epoch week of January 2nd, 2023 (the first Monday of 2023). Values of 0 or 1 indicate weekly restarts. Values of 2 indicate fortnightly restarts, etc.
  - `build_time_stats` CodersdkTemplateBuildTimeStats
  - `cors_behavior` 'simple' | 'passthru'
  - `created_at` string, date-time
  - `created_by_id` string, uuid
  - `created_by_name` string
  - `default_ttl_ms` integer
  - `deleted` boolean
  - `deprecated` boolean
  - `deprecation_message` string
  - `description` string
  - `disable_module_cache` boolean — DisableModuleCache disables the use of cached Terraform modules during provisioning.
  - `display_name` string
  - `failure_ttl_ms` integer — FailureTTLMillis, TimeTilDormantMillis, and TimeTilDormantAutoDeleteMillis are enterprise-only. Their values are used if your license is entitled to use the advanced template scheduling feature.
  - `icon` string
  - `id` string, uuid
  - `max_port_share_level` 'owner' | 'authenticated' | 'organization' | 'public'
  - `name` string
  - `organization_display_name` string
  - `organization_icon` string
  - `organization_id` string, uuid
  - `organization_name` string, url
  - `provisioner` 'terraform'
  - `require_active_version` boolean — RequireActiveVersion mandates that workspaces are built with the active template version.
  - `time_til_autostop_notify_ms` integer — TimeTilAutostopNotifyMillis is the duration before the workspace's autostop deadline at which a reminder notification is sent. 0 disables the notification.
  - `time_til_dormant_autodelete_ms` integer
  - `time_til_dormant_ms` integer
  - `updated_at` string, date-time
  - `use_classic_parameter_flow` boolean

---

[API](https://skmtc.net/coder/apis/coder-api.md) · [All operations](https://skmtc.net/coder/apis/coder-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/coder/coder-api/versions/56b6e9f08540/schema)
