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

# Read edge analytics from the CLI

> Read the traffic, errors, request logs and latency of a Square Cloud website at the edge with squarecloud app network, and purge its edge cache.

These commands report what Square Cloud's edge sees for a website: its `squareweb.app` domain and its custom domain. `[appID]` is optional: see [how the CLI finds your app](/en/cli-reference/quickstart#how-the-cli-finds-your-app).

## Time window

`analytics`, `errors`, `logs` and `performance` cover the last 24 hours by default. Change the window with these flags, which take [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) times such as `2026-07-01T00:00:00Z`:

| Flag | Description |
| - | - |
| `--start <time>` | Start of the window. Default: 24 hours ago. |
| `--end <time>` | End of the window. Default: now. |

The data goes back at most 7 days, and never before the application was created.

## `squarecloud app network analytics`

```bash Usage theme={"system"}
squarecloud app network analytics [appID] [--start <time>] [--end <time>] [filters] [--json]
```

Prints the visits, requests and traffic of the window, followed by the top 10 countries.

| Filter flag | Narrows the data to |
| - | - |
| `--country`, `--ip`, `--path`, `--status` | A country, client IP, path or HTTP status |
| `--os`, `--browser`, `--protocol`, `--referer` | An operating system, browser, protocol or referer |
| `--provider`, `--content-type`, `--bot` | A network provider, content type or bot |

Each filter takes a value exactly as its breakdown in the `--json` output shows it, such as a two-letter country code (`BR`) or a three-digit status (`200`). Filters combine: the data must match all of them.

```bash theme={"system"}
squarecloud app network analytics --start 2026-07-01T00:00:00Z --end 2026-07-02T00:00:00Z --country BR --status 200
# One day of Brazilian traffic answered with 200.
```

```bash Output theme={"system"}
Visits: <visits> | Requests: <requests> | Traffic: <size>
```

## `squarecloud app network errors`

```bash Usage theme={"system"}
squarecloud app network errors [appID] [--start <time>] [--end <time>] [--include-4xx] [--json]
```

| Flag | Description |
| - | - |
| `--include-4xx` | Counts 4xx responses too. By default, only 5xx errors are counted. |

Prints the total number of errors, split into 4xx and 5xx, and the 10 paths with the most errors.

```bash Output theme={"system"}
Errors: <total> total (<4xx> 4xx / <5xx> 5xx)
```

## `squarecloud app network logs`

```bash Usage theme={"system"}
squarecloud app network logs [appID] [--start <time>] [--end <time>] [--json]
```

Shows the edge request logs of the window: time, status, method, path, client IP and country. Available on the Pro and Enterprise plans. For your application's own output, see [`squarecloud app logs`](/en/cli-reference/logs#squarecloud-app-logs).

## `squarecloud app network performance`

```bash Usage theme={"system"}
squarecloud app network performance [appID] [--start <time>] [--end <time>] [--json]
```

Shows the edge and origin latency percentiles (p50 and p95) and the 10 slowest paths with their p95 and p99. Available on the Pro and Enterprise plans.

```bash Output theme={"system"}
Requests: <requests> | Edge p50/p95: <ms>/<ms> ms | Origin p50/p95: <ms>/<ms> ms
```

## `squarecloud app network purge-cache`

```bash Usage theme={"system"}
squarecloud app network purge-cache [appID] [-y]
```

| Flag | Description |
| - | - |
| `-y`, `--yes` | Skips the confirmation prompt. |

Purges the **entire** edge cache of the application, after a `y/N` confirmation.

## Related

| Command | API | JavaScript SDK | VS Code |
| - | - | - | - |
| `analytics` | [`GET .../network/analytics`](/en/api-reference/endpoint/apps/network/analytics) | [`api.apps.network.analytics()`](/en/sdks/js/network) | |
| `errors` | [`GET .../network/errors`](/en/api-reference/endpoint/apps/network/errors) | [`api.apps.network.errors()`](/en/sdks/js/network) | [Edge errors](/en/vscode-extension/features#applications) |
| `logs` | [`GET .../network/logs`](/en/api-reference/endpoint/apps/network/logs) | [`api.apps.network.logs()`](/en/sdks/js/network) | [Edge logs](/en/vscode-extension/features#applications) |
| `performance` | [`GET .../network/performance`](/en/api-reference/endpoint/apps/network/performance) | [`api.apps.network.performance()`](/en/sdks/js/network) | [Edge performance](/en/vscode-extension/features#applications) |
| `purge-cache` | [`POST .../network/purge_cache`](/en/api-reference/endpoint/apps/network/purge_cache) | [`api.apps.network.purgeCache()`](/en/sdks/js/network) | [Purge edge cache](/en/vscode-extension/features#applications) |

Custom domains and DNS records are on [Domains](/en/cli-reference/domains).
