# List marketplace apps

`GET https://console.advinservers.com/api/v1/client/servers/marketplace-apps`

### Overview

Lists the apps a new or reinstalled server can be built with. Each app is an operating system with software set up on it. Send its `uuid` as `marketplace_app` instead of `template_uuid` when ordering or reinstalling. A variable with an `input` is a setting you enter: send your value in `app_variables` under the variable's `name`. One that is not `required` can be left out. It then gets its `value`, or a generated username or password, which the app lists in the server's notes when it has installed. `uses_domain` is true for an app that is set up on the server's domain name.

### 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.
- `logo_url` (string | null, required): The app's logo, or null when it has none.
- `template_name` (string, required): The template the app is installed on, such as "Ubuntu 24.04".
- `description` (string | null, required): Markdown written by staff, or null for none.
- `version` (string | null, required): The version of the software that is installed, such as "1.0.20210914".
- `variables` (object[], required): The value of `variables`.
  - `name` (string, required): The name shown to customers.
  - `value` (string | null, required): The value staff set, or what the field starts with when the customer is asked for it.
  - `description` (string | null, required): An optional description shown to customers.
  - `input` (string | null, required): The kind of field the customer fills in, or null when staff set the value. One of: `text`, `username`, `email`, `password`, `null`.
  - `label` (string | null, required): The field's name on the order page. Null shows `name`.
  - `required` (boolean, required): Whether the customer must answer. Only read when `input` is set. A blank answer gets `value`, or a generated username or password, which the app then lists in the server's notes.
- `uses_domain` (boolean, required): Whether the app is reached by a name. The server then answers on its `vps-<id>` domain, and an order for one server may send `custom_domain`, a domain already pointed at that name with a CNAME record.

```json
[
  {
    "uuid": "b71cfb0d-abab-4721-9254-622be47149cb",
    "uuid_short": "Uuid short",
    "name": "lambda-core",
    "logo_url": "https://vps.advinservers.com",
    "template_name": "Template name",
    "description": "Description",
    "version": "Version",
    "variables": [
      {
        "name": "lambda-core",
        "value": "Value",
        "description": "Description",
        "input": "text",
        "label": "Label",
        "required": true
      }
    ],
    "uses_domain": true
  }
]
```

## 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/marketplace-apps' \
  --header 'Authorization: Bearer <token>' \
  --header 'Accept: application/json'
```
