# Metrics

<a id="get-api-v1-accounts-username-metrics"></a>
#### `GET /api/v1/accounts/{username}/metrics`

*Get Account Metrics*

Get historical resource usage metrics for an account.

**Path parameters:**

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

**Query parameters:**

| Name | Type | Required | Notes |
|------|------|----------|-------|
| `period` | string | no | pattern=`^(24h\|7d\|30d)$` |

**Responses:**

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

**Response example (200):**

```json
{}
```

**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/accounts/{username}/metrics
```

---

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

*Get Server Metrics*

Get historical server-wide resource usage metrics.

**Query parameters:**

| Name | Type | Required | Notes |
|------|------|----------|-------|
| `period` | string | no | pattern=`^(24h\|7d\|30d)$` |

**Responses:**

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

**Response example (200):**

```json
{}
```

**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/metrics
```

---
