v13

latestOpenAPI 3.0.0zlibraw.githubusercontent.com2026-08-01265409652.5 KB
templates

List available templates

List available templates. Access policy: authenticated

get/templates

Response

Success

versionstring

Example response

{
  "templates": [
    {
      "administrator_only": true,
      "categories": [
        "database"
      ],
      "command": "ls -lah",
      "description": "High performance web server",
      "env": [
        {
          "default": "default_value",
          "description": "MySQL root account password",
          "label": "Root password",
          "name": "MYSQL_ROOT_PASSWORD",
          "select": [
            {
              "text": "text value",
              "value": "value"
            }
          ]
        }
      ],
      "hostname": "mycontainer",
      "id": 1,
      "image": "nginx:latest",
      "interactive": true,
      "labels": [
        {
          "name": "name",
          "value": "value"
        }
      ],
      "logo": "https://portainer.io/img/logo.svg",
      "name": "mystackname",
      "network": "mynet",
      "note": "This is my <b>custom</b> template",
      "platform": "linux",
      "ports": [
        "8080:80/tcp"
      ],
      "privileged": true,
      "registry": "quay.io",
      "repository": {
        "stackfile": "./subfolder/docker-compose.yml",
        "url": "https://github.com/portainer/portainer-compose"
      },
      "restart_policy": "on-failure",
      "title": "Nginx",
      "volumes": [
        {
          "bind": "/tmp",
          "container": "/data",
          "readonly": true
        }
      ]
    }
  ]
}