---
title: "List available templates"
method: GET
path: "/templates"
tags: ["templates"]
---

# List available templates

`GET /templates`

List available templates.
**Access policy**: authenticated

## Response `200`

Success

- TemplatesListResponse
  - `templates` PortainerTemplate[]
    - `administrator_only` boolean — Whether the template should be available to administrators only
    - `categories` string[] — A list of categories associated to the template
    - `command` string — The command that will be executed in a container template
    - `description` string — Description of the template
    - `env` PortainerTemplateEnv[] — A list of environment(endpoint) variables used during the template deployment
      - `default` string — Default value that will be set for the variable
      - `description` string — Content of the tooltip that will be generated in the UI
      - `label` string — Text for the label that will be generated in the UI
      - `name` string — name of the environment(endpoint) variable
      - `preset` boolean — If set to true, will not generate any input for this variable in the UI
      - `select` PortainerTemplateEnvSelect[] — A list of name/value that will be used to generate a dropdown in the UI
        - `default` boolean — Will set this choice as the default choice
        - `text` string — Some text that will displayed as a choice
        - `value` string — A value that will be associated to the choice
    - `hostname` string — Container hostname
    - `id` integer — Mandatory container/stack fields Template Identifier
    - `image` string — Mandatory container fields Image associated to a container template. Mandatory for a container template
    - `interactive` boolean — Whether the container should be started in interactive mode (-i -t equivalent on the CLI)
    - `labels` PortainerPair[] — Container labels
      - `name` string, required
      - `value` string, required
    - `logo` string — URL of the template's logo
    - `name` string — Optional stack/container fields Default name for the stack/container to be used on deployment
    - `network` string — Name of a network that will be used on container deployment if it exists inside the environment(endpoint)
    - `note` string — A note that will be displayed in the UI. Supports HTML content
    - `platform` string — Platform associated to the template. Valid values are: 'linux', 'windows' or leave empty for multi-platform
    - `ports` string[] — A list of ports exposed by the container
    - `privileged` boolean — Whether the container should be started in privileged mode
    - `registry` string — Optional container fields The URL of a registry associated to the image for a container template
    - `repository` PortainerTemplateRepository
      - `stackfile` string — Path to the stack file inside the git repository
      - `url` string — URL of a git repository used to deploy a stack template. Mandatory for a Swarm/Compose stack template
    - `restart_policy` string — Container restart policy
    - `stackFile` string — Mandatory Edge stack fields Stack file used for this template
    - `title` string — Title of the template
    - `type` 0 | 1 | 2 | 3
    - `volumes` PortainerTemplateVolume[] — A list of volumes used during the container template deployment
      - `bind` string — Path on the host
      - `container` string — Path inside the container
      - `readonly` boolean — Whether the volume used should be readonly
  - `version` string

## Other responses

- `500` — Server error

---

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