# List virtual servers

> The vServers of the account, a page at a time, optionally filtered by description or hostname.

- Effect: Read - Changes nothing.
- Idempotent: yes
- Stability: beta
- MCP tool: `manitu_vserver_list` on https://mcp.manitu.de/mcp
- REST: `POST https://api.manitu.de/v1/vserver/list`
- Needs: `service_vserver`
- Page: /reference/vserver/list/

## MCP tool

`manitu_vserver_list`

### Description for the model

Lists the virtual servers (vServers) of the manitu customer account this connection works in: for each its vserver_id, the customer's description of it, hostname, status, power state (running, stopped, suspended, installing - as manitu last saw it), plan and IP addresses. total_count says how many there are in all; page with page_token = next_page_token while it is not null. For hardware, network details, rescue system, VNC and workflows still running on one vServer use manitu_vserver_get with its vserver_id. vServers this access may not see are not listed.

### Arguments

- `page_size` (integer) - How many entries per page, default 100. (minimum `1`; maximum `500`)
- `page_token` (string) - next_page_token of the previous page - with the same filters.
- `text_contains` (string) - Only vServers whose description or hostname contains this, ignoring case. (minLength `1`; maxLength `255`)

### Example

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "manitu_vserver_list",
    "arguments": {}
  }
}
```

## REST

`POST https://api.manitu.de/v1/vserver/list`

### Authentication

One of `X-API-Key`, `Authorization: Bearer …` - never more than one in a request.

### Request body

JSON; unknown fields are refused.

- `page_size` (integer) - How many entries per page, default 100. (minimum `1`; maximum `500`)
- `page_token` (string) - next_page_token of the previous page - with the same filters.
- `text_contains` (string) - Only vServers whose description or hostname contains this, ignoring case. (minLength `1`; maxLength `255`)

### Response

In `data`; the rest of the body as on every call.

- `vserver_list` (array of object, required)
  - `vserver_list[].vserver_id` (integer, required) - The id of the vServer - what manitu_vserver_get and every route on it take (the same number as service_id).
  - `vserver_list[].service_id` (integer, required) - The id of the service instance - the same number as the id its own routes take (e.g. vserver_id).
  - `vserver_list[].service_type` (string, required) - The kind of service, e.g. vserver - its own data is under the key of that name. (one of `"vserver"`, `"other"`)
  - `vserver_list[].description` (string | null, required) - What the customer wrote about it (his description), null if nothing - not its name or user name.
  - `vserver_list[].status` (string, required) - Its state as a service, e.g. active. (one of `"active"`, `"provisioning"`, `"suspended"`, `"destroying"`, `"deleted"`)
  - `vserver_list[].is_configurable` (boolean, required) - It can be changed right now - false e.g. while suspended.
  - `vserver_list[].plan` (string | null, required) - The plan, e.g. "vServer M".
  - `vserver_list[].vserver` (object, required) - What is the vServer's own.
    - `vserver_list[].vserver.hostname` (string | null, required) - Its hostname as manitu keeps it, if set.
    - `vserver_list[].vserver.power_state` (string | null, required) - e.g. running or stopped - as manitu last saw it: updated with every workflow on the server and once a day, so a shutdown from inside the server may not show yet; null if unknown. (one of `"stopped"`, `"running"`, `"suspended"`, `"installing"`, `null`)
    - `vserver_list[].vserver.ipv4_address` (string | null, required) - Its IPv4 address.
    - `vserver_list[].vserver.ipv6_address` (string | null, required) - Its IPv6 address.
- `total_count` (integer, required) - How many entries match, on all pages together.
- `next_page_token` (string | null, required) - Pass as page_token for the next page; null on the last.

### Statuses

- `200` Success.
- `400` The request does not match the declared input schema.
- `401` No credential was presented, or it was not recognised.
- `403` The credential is not permitted to use this operation.
- `500` The server failed. Nothing about the request was wrong. Whether a change took effect is not known - check before trying it again.
- `503` The channel this operation forwards through is unavailable.

### Example

```sh
curl -X POST 'https://api.manitu.de/v1/vserver/list' \
  -H 'X-API-Key: $API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{}'
```

## Example result

```json
{
  "vserver_list": [
    {
      "vserver_id": 12345,
      "service_id": 12345,
      "service_type": "vserver",
      "description": "Example",
      "status": "active",
      "is_configurable": true,
      "plan": "string",
      "vserver": {
        "hostname": "server.example.com",
        "power_state": "stopped",
        "ipv4_address": "192.0.2.10",
        "ipv6_address": "2001:db8::10"
      }
    }
  ],
  "total_count": 1,
  "next_page_token": "eyJwYWdlIjoyfQ"
}
```
