# List templates

`GET https://console.advinservers.com/api/v1/client/servers/templates`

### Overview

Lists operating system families and their available versions. This list is not filtered by server location. Any listed image can be selected for a new server.

### Permissions

Requires the `server.read` (View servers) permission for the selected team. Resources outside that team return 404.

## Authorization

Send `Authorization: Bearer <token>` with the request. Your API key, sent as a bearer token. Create one in the control panel under API Keys, give it only the permissions the integration needs, and copy it when it is created. It cannot be shown again. Each key is restricted to one owned team. The key determines the team for every request.

## Response 200

The whole set, as a JSON array. There is no envelope and no paging.

- `uuid` (string, required): The uuid UUID.
- `uuid_short` (string, required): The value of `uuid_short`.
- `name` (string, required): The name shown to customers.
- `hidden` (integer, required): Whether the template group is hidden, represented as 0 or 1.
- `icon_url` (string | null, required): Artwork for the template group, or null when no icon is configured.
- `order_column` (integer, required): The value of `order_column`.
- `templates` (object[], required): The value of `templates`.
  - `uuid` (string, required): The uuid UUID.
  - `uuid_short` (string, required): The value of `uuid_short`.
  - `name` (string, required): The name shown to customers.
  - `hidden` (integer, required): Whether the template is hidden, represented as 0 or 1.
  - `order_column` (integer, required): The value of `order_column`.

```json
[
  {
    "uuid": "01165628-cb36-4ad1-9824-e8c2b1e74903",
    "uuid_short": "Uuid short",
    "name": "Ubuntu",
    "hidden": 0,
    "icon_url": "/assets/icons/ubuntu.png",
    "order_column": 2,
    "templates": [
      {
        "uuid": "e28b39a8-059e-4a75-8048-c9a6e7231b9f",
        "name": "Ubuntu 24.04",
        "hidden": 0,
        "order_column": 1
      },
      {
        "uuid": "241eddfc-1ca4-4073-85a4-2563f8548020",
        "name": "Ubuntu 22.04",
        "hidden": 0,
        "order_column": 2
      }
    ]
  }
]
```

## Errors

- `401`: The key was missing, malformed, revoked, or belongs to an account that no longer exists.
- `403`: Access denied. Check the key's team, permissions and allowed IP addresses. Some actions, such as managing API keys, require a browser session. The response message explains the reason.
- `429`: Too many requests. The `Retry-After` header says how many seconds to wait. Limits are per account, so several keys on one account share them.

## Example request

```bash
curl --request GET \
  --url 'https://console.advinservers.com/api/v1/client/servers/templates' \
  --header 'Authorization: Bearer <token>' \
  --header 'Accept: application/json'
```
