# System Logs

<a id="get-api-v1-system-logs"></a>
#### `GET /api/v1/system/logs`

*List System Logs*

**Responses:**

| Status | Schema | Description |
|--------|--------|-------------|
| `200` | `SystemLogsListResponse` | Successful Response |

**Response example (200):**

```json
{
  "data": [
    {
      "exists": false,
      "id": "string",
      "name": "string",
      "path": "string",
      "size_bytes": 0
    }
  ],
  "status": "string"
}
```

**cURL example:**

```bash
curl -X GET \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/system/logs
```

---

<a id="get-api-v1-system-logs-log-id"></a>
#### `GET /api/v1/system/logs/{log_id}`

*Read System Log*

**Path parameters:**

| Name | Type | Required | Notes |
|------|------|----------|-------|
| `log_id` | string | yes | — |

**Query parameters:**

| Name | Type | Required | Notes |
|------|------|----------|-------|
| `lines` | integer | no | minimum=1; maximum=5000 |

**Responses:**

| Status | Schema | Description |
|--------|--------|-------------|
| `200` | `SystemLogContentResponse` | Successful Response |
| `422` | `HTTPValidationError` | Validation Error |

**Response example (200):**

```json
{
  "data": {
    "content": [
      "string"
    ],
    "id": "string",
    "lines": 0,
    "name": "string",
    "path": "string"
  },
  "status": "string"
}
```

**cURL example:**

```bash
curl -X GET \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/system/logs/{log_id}
```

---
