# List log files of a web hosting package

> The access, error, PHP error and cronjob logs of a package - current and rotated.

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

## MCP tool

`manitu_webhosting_web_log_list`

### Description for the model

Lists the log files of a web hosting package of the manitu customer account this connection works in, by its site_id from manitu_webhosting_list: per type (access, error, php.error, cron) the current file (rotation null) and the older ones kept (rotation), with their size. Reading one: manitu_webhosting_web_log_get.

### Arguments

- `site_id` (integer | string, required) - The site_id from manitu_webhosting_list - never guess one. (pattern `"^[1-9][0-9]*$"`; minimum `1`)

### Example

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

## REST

`POST https://api.manitu.de/v1/webhosting/web/log/list`

### Authentication

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

### Request body

JSON; unknown fields are refused.

- `site_id` (integer | string, required) - The site_id from manitu_webhosting_list - never guess one. (pattern `"^[1-9][0-9]*$"`; minimum `1`)

### Response

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

- `log_list` (array of object, required)
  - `log_list[].type` (string, required) - access: every request; error: the web server's errors; php.error: PHP's errors; cron: one line per cronjob run - time, exit code, duration; a cronjob's output and errors are with the cronjob (manitu_webhosting_web_cronjob_get). (one of `"access"`, `"error"`, `"php.error"`, `"cron"`)
  - `log_list[].rotation` (string | null, required) - Which older file - as log get takes it; null: the current one.
  - `log_list[].size_bytes` (integer | null, required)

### 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/web/log/list' \
  -H 'X-API-Key: $API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"site_id":12345}'
```

## Example result

```json
{
  "log_list": [
    {
      "type": "access",
      "rotation": "string",
      "size_bytes": 1
    }
  ]
}
```
