---
title: Site Access Logs
description: "Reads the live access log from the site's web server and returns parsed entries. The path is stack-aware — for nginx stacks it reads the nginx access log, for OpenLiteSpeed…"
url: "https://betterdocs.shahrear.msf.bd/index.php/docs/hell0-boys-docs/hell0-boys/sites/site-access-logs/"
updated: "2026-08-20"
category: hell0 boys / Sites
---

# Site Access Logs

GET`/sites/{uuid}/access-logs`

## Code Samples

```curl

                curl --request GET \
  --url 'https://app.xcloud.host/api/v1/sites/{uuid}/access-logs' \
  --header 'Authorization: Bearer YOUR_TOKEN'

                const response = await fetch('https://app.xcloud.host/api/v1/sites/{uuid}/access-logs', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN'
  }
});

const data = await response.json();
console.log(data);

                import requests

headers = {
    "Authorization": "Bearer YOUR_TOKEN"
}

response = requests.get("https://app.xcloud.host/api/v1/sites/{uuid}/access-logs", headers=headers)

print(response.json())

                <?php
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://app.xcloud.host/api/v1/sites/{uuid}/access-logs',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => [
  'Authorization: Bearer YOUR_TOKEN'
  ],
]);

$response = curl_exec($curl);
curl_close($curl);

echo $response;

                using System.Net.Http;

var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://app.xcloud.host/api/v1/sites/{uuid}/access-logs");
request.Headers.Add("Authorization", "Bearer YOUR_TOKEN");
var response = await client.SendAsync(request);
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);

                import java.net.URI;
import java.net.http.*;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://app.xcloud.host/api/v1/sites/{uuid}/access-logs"))
    .header("Authorization", "Bearer YOUR_TOKEN")
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();

HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

## Response

```json

                {
    "success": true,
    "message": "Operation completed successfully.",
    "data": {
        "site": {
            "uuid": "123e4567-e89b-12d3-a456-426614174000",
            "name": "string"
        },
        "type": "access",
        "limit": 1,
        "entry_count": 1,
        "entries": [
            {
                "log_type": "access",
                "ip": "192.168.1.1",
                "user": "string",
                "datetime": "13/May/2026:09:00:00 +0000",
                "method": "GET",
                "path": "/index.php",
                "protocol": "HTTP/1.1",
                "status_code": 200,
                "status_class": "2xx",
                "bytes": 1024,
                "referer": "string",
                "user_agent": "string",
                "is_bot": false,
                "bot_name": "string",
                "error_level": "string",
                "message": "string",
                "raw": "string"
            }
        ]
    }
}

                {
    "success": false,
    "message": "Unauthenticated.",
    "data": null
}

                {
    "success": false,
    "message": "This action is unauthorized. Your token is missing the required scope.",
    "data": null
}

                {
    "success": false,
    "message": "Not found.",
    "data": null
}

                {
    "success": false,
    "message": "The given data was invalid.",
    "data": null,
    "errors": {
        "domain": [
            "The domain field is required when mode is live."
        ]
    }
}
```

Reads the live access log from the site's web [Server](https://betterdocs.shahrear.msf.bd/encyclopedia/server/) and returns parsed entries. The path is stack-aware — for nginx stacks it reads the nginx access log, for OpenLiteSpeed stacks it reads the LiteSpeed access log. The optional `type` parameter forces a specific source (`nginx`, `lsws`, or `access` which is stack-aware default). Note: this endpoint reads the log file over SSH on each call and can be slow on very large logs. Use `limit` to bound entry count. Requires the `read:sites` scope and the `site:manage-logs` [Team](https://betterdocs.shahrear.msf.bd/encyclopedia/team/) permission.

## Path Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `uuid` | string (uuid) | **Required** | UUID of the site |

## [Query](https://betterdocs.shahrear.msf.bd/encyclopedia/query/) Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `type` | string | Optional |  |
| `limit` | integer | Optional |  |

## Responses

### 200 — Parsed access log entries

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `success` | boolean | Optional |  |
| `message` | string | Optional |  |
| `data` | object | Optional |  |
| `data` | object | Optional |  |
| `data.site` | object | Optional |  |
| `data.site.uuid` | string (uuid) | Optional |  |
| `data.site.name` | string | Optional |  |
| `data.type` | string | Optional | Allowed: access, nginx, lsws |
| `data.limit` | integer | Optional |  |
| `data.entry_count` | integer | Optional |  |
| `data.entries` | array of object | Optional |  |

```json

                {
    "success": true,
    "message": "Operation completed successfully.",
    "data": {
        "site": {
            "uuid": "123e4567-e89b-12d3-a456-426614174000",
            "name": "string"
        },
        "type": "access",
        "limit": 1,
        "entry_count": 1,
        "entries": [
            {
                "log_type": "access",
                "ip": "192.168.1.1",
                "user": "string",
                "datetime": "13/May/2026:09:00:00 +0000",
                "method": "GET",
                "path": "/index.php",
                "protocol": "HTTP/1.1",
                "status_code": 200,
                "status_class": "2xx",
                "bytes": 1024,
                "referer": "string",
                "user_agent": "string",
                "is_bot": false,
                "bot_name": "string",
                "error_level": "string",
                "message": "string",
                "raw": "string"
            }
        ]
    }
}
```

### 401 — Missing or invalid authentication token

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `success` | boolean | Optional |  |
| `message` | string | Optional |  |
| `data` | object | Optional |  |

```json

                {
    "success": false,
    "message": "Unauthenticated.",
    "data": null
}
```

### 403 — Token lacks the required scope

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `success` | boolean | Optional |  |
| `message` | string | Optional |  |
| `data` | object | Optional |  |

```json

                {
    "success": false,
    "message": "This action is unauthorized. Your token is missing the required scope.",
    "data": null
}
```

### 404 — Resource not found or not accessible to your [Team](https://betterdocs.shahrear.msf.bd/encyclopedia/team/)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `success` | boolean | Optional |  |
| `message` | string | Optional |  |
| `data` | object | Optional |  |

```json

                {
    "success": false,
    "message": "Not found.",
    "data": null
}
```

### 422 — Request validation failed

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `success` | boolean | Optional |  |
| `message` | string | Optional |  |
| `data` | object | Optional |  |
| `errors` | object | Optional |  |

```json

                {
    "success": false,
    "message": "The given data was invalid.",
    "data": null,
    "errors": {
        "domain": [
            "The domain field is required when mode is live."
        ]
    }
}
```
