---
title: "Tail and filter live access, error, and PHP logs for a site"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.hostedez.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Hosted EZ REST API

`GET /v1/sites/{siteId}/logs`

## Authentication

- `sessionCookie`, apiKey, in cookie

## Path parameters

- `getSiteLogs.path.siteId` (string, required) — Site slug (sit_...) or UUID.

## Query parameters

- `getSiteLogs.query.source` (string, optional) — Log stream filter: all (default), access, error, or php.
  - one of `"all"`, `"access"`, `"error"`, `"php"`; default `"all"`
- `getSiteLogs.query.lines` (integer, optional) — Maximum log entries to return (1 to 500, default 200).
  - min 1; max 500; default `200`
- `getSiteLogs.query.cursor` (string, optional) — HMAC-signed opaque cursor from a previous logs response for incremental live tailing.
- `getSiteLogs.query.q` (string, optional) — Case-insensitive plain substring filter (max 128 characters).
  - maxLength 128
- `getSiteLogs.query.level` (string, optional) — Log severity filter: info, warn, or error.
  - one of `"info"`, `"warn"`, `"error"`
- `getSiteLogs.query.status` (string, optional) — HTTP status filter: 2xx, 3xx, 4xx, 5xx, or an exact HTTP status code (100-599).

## Code samples

### cURL

```curl
curl --request GET \
  --url https://api.hostedez.com/v1/sites/string/logs \
  --header '__Secure-better-auth.session_token: <value>'
```

### TypeScript

```typescript
const url = 'https://api.hostedez.com/v1/sites/string/logs';
const options = {method: 'GET', headers: {'__Secure-better-auth.session_token': '<value>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.hostedez.com/v1/sites/string/logs"

headers = {"__Secure-better-auth.session_token": "<value>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

Structured log entries and next tail cursor

#### Example

```json
{
  "entries": [
    {
      "http": {
        "bytesSent": 0,
        "cacheStatus": "string",
        "durationMs": 0,
        "host": "string",
        "method": "string",
        "remoteIp": "string",
        "status": 0,
        "uri": "string"
      },
      "id": "string",
      "level": "info",
      "message": "string",
      "raw": "string",
      "stream": "string",
      "timestamp": "string"
    }
  ],
  "hasMore": true,
  "nextCursor": "string",
  "rotated": true,
  "siteId": "string",
  "source": "all",
  "truncated": true
}
```

- `getSiteLogs.response.200.entries` (array<object>, required)
  - `getSiteLogs.response.200.entries.http` (one of, required)
    - one of: [SiteLogHttpInfo](/api/schemas/SiteLogHttpInfo/), `null`
  - `getSiteLogs.response.200.entries.id` (string, required)
  - `getSiteLogs.response.200.entries.level` (string, required)
    - one of `"info"`, `"warn"`, `"error"`
  - `getSiteLogs.response.200.entries.message` (string, required)
  - `getSiteLogs.response.200.entries.raw` (string, required)
  - `getSiteLogs.response.200.entries.stream` (string, required)
  - `getSiteLogs.response.200.entries.timestamp` (string, required)
- `getSiteLogs.response.200.hasMore` (boolean, required)
- `getSiteLogs.response.200.nextCursor` (string | null, required)
- `getSiteLogs.response.200.rotated` (boolean, required)
- `getSiteLogs.response.200.siteId` (string, required)
- `getSiteLogs.response.200.source` (string, required)
  - one of `"all"`, `"access"`, `"error"`, `"php"`
- `getSiteLogs.response.200.truncated` (boolean, required)

### 400

Invalid query parameter or cursor

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string"
  }
}
```

- `getSiteLogs.response.400.error` (object, required)
  - `getSiteLogs.response.400.error.code` (string, required)
  - `getSiteLogs.response.400.error.message` (string, required)
  - `getSiteLogs.response.400.error.issues` (array<object>, optional)
    - `getSiteLogs.response.400.error.issues.message` (string, required)
    - `getSiteLogs.response.400.error.issues.path` (string, required)

### 401

Unauthenticated

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string"
  }
}
```

- `getSiteLogs.response.401.error` (object, required)
  - `getSiteLogs.response.401.error.code` (string, required)
  - `getSiteLogs.response.401.error.message` (string, required)
  - `getSiteLogs.response.401.error.issues` (array<object>, optional)
    - `getSiteLogs.response.401.error.issues.message` (string, required)
    - `getSiteLogs.response.401.error.issues.path` (string, required)

### 404

Site not found

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string"
  }
}
```

- `getSiteLogs.response.404.error` (object, required)
  - `getSiteLogs.response.404.error.code` (string, required)
  - `getSiteLogs.response.404.error.message` (string, required)
  - `getSiteLogs.response.404.error.issues` (array<object>, optional)
    - `getSiteLogs.response.404.error.issues.message` (string, required)
    - `getSiteLogs.response.404.error.issues.path` (string, required)

### 429

Rate limited

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string"
  }
}
```

- `getSiteLogs.response.429.error` (object, required)
  - `getSiteLogs.response.429.error.code` (string, required)
  - `getSiteLogs.response.429.error.message` (string, required)
  - `getSiteLogs.response.429.error.issues` (array<object>, optional)
    - `getSiteLogs.response.429.error.issues.message` (string, required)
    - `getSiteLogs.response.429.error.issues.path` (string, required)

### 503

Hosting node offline

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string"
  }
}
```

- `getSiteLogs.response.503.error` (object, required)
  - `getSiteLogs.response.503.error.code` (string, required)
  - `getSiteLogs.response.503.error.message` (string, required)
  - `getSiteLogs.response.503.error.issues` (array<object>, optional)
    - `getSiteLogs.response.503.error.issues.message` (string, required)
    - `getSiteLogs.response.503.error.issues.path` (string, required)


Source: https://docs.hostedez.com/api/getSiteLogs/index.md
