# List web hosting packages

> The web hosting packages of the account, a page at a time, optionally filtered by text.

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

## MCP tool

`manitu_webhosting_list`

### Description for the model

Lists the web hosting packages of the manitu customer account this connection works in: for each its site_id (the key for every other webhosting tool), package name (a domain name - name a package by it; all domains of a package work alike), the customer's description of it if any, status of the contract and plan. total_count says how many there are in all; page with page_token = next_page_token while it is not null. For paths, PHP, disk space and limits of one package use manitu_webhosting_get with its site_id. Packages this access may not see are not listed. The server host names are technical: the web server only matters for SSH/FTP, mail.mx_server is the MX target, not the server for mail programs (IMAP/POP3/SMTP) - do not mention them unless asked.

### 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 packages whose description, package name or site name (site<site_id>) contains this, ignoring case. (minLength `1`; maxLength `255`)

### Example

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

## REST

`POST https://api.manitu.de/v1/webhosting/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 packages whose description, package name or site name (site<site_id>) contains this, ignoring case. (minLength `1`; maxLength `255`)

### Response

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

- `webhosting_list` (array of object, required)
  - `webhosting_list[].site_id` (integer, required) - The web hosting package - what its routes take. Globally unique; on the servers its home is /home/sites/site<site_id>.
  - `webhosting_list[].service_type` (string, required) - The kind of service - its own data is under the key of that name. (one of `"webhosting"`)
  - `webhosting_list[].description` (string | null, required) - What the customer wrote about it (his description), null if nothing - not its name or user name.
  - `webhosting_list[].status` (string | null, required) - The state of the contract, e.g. active, expiring (cancelled, runs out at paid_until).
  - `webhosting_list[].is_configurable` (boolean, required) - It can be changed right now - false e.g. while suspended or being moved.
  - `webhosting_list[].plan` (string | null, required) - The plan, e.g. "Webhosting M".
  - `webhosting_list[].webhosting` (object, required)
    - `webhosting_list[].webhosting.package_name` (string | null, required) - The name of the package on contract and invoice - a domain name, but not a special one: all domains of a web hosting package work alike.
    - `webhosting_list[].webhosting.site_name` (string | null, required) - site<site_id> - how the package is named on the servers (paths, SFTP).
    - `webhosting_list[].webhosting.web` (object | null, required) - The web part - null if the package has none.
      - `webhosting_list[].webhosting.web.server` (string | null, required) - The web server the package runs on (host name) - what SSH and SFTP/FTP connect to. Technical: mention it only for SSH/FTP or when asked.
    - `webhosting_list[].webhosting.mail` (object | null, required) - The mail part - null if the package has none.
      - `webhosting_list[].webhosting.mail.mx_server` (string | null, required) - The server that receives the package's e-mail - the MX target in DNS. NOT the server for mail programs (IMAP, POP3, SMTP): never give it to the customer as his mail server; mention it only when asked about MX.
- `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/webhosting/list' \
  -H 'X-API-Key: $API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{}'
```

## Example result

```json
{
  "webhosting_list": [
    {
      "site_id": 12345,
      "service_type": "webhosting",
      "description": "Example",
      "status": "string",
      "is_configurable": true,
      "plan": "string",
      "webhosting": {
        "package_name": "string",
        "site_name": "string",
        "web": {
          "server": "string"
        },
        "mail": {
          "mx_server": "string"
        }
      }
    }
  ],
  "total_count": 1,
  "next_page_token": "eyJwYWdlIjoyfQ"
}
```
