Metrics
Raw metric snapshot rows for a site, ordered by period_start descending. Supports filtering by source and metric name. Results are cursor-paginated.
GET
/api/v1/sites/:siteId/metricsRaw metric snapshots
Returns raw metric snapshot rows for a site, ordered by period_start descending. Supports filtering by source and metric name. Results are cursor-paginated.
Paginated — supports
cursor and limitRequest
bash
curl -X GET \
'https://letoseo.com/api/v1/sites/:siteId/metrics' \
-H 'Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'Path parameters
| Name | Type | Required | Description | Default |
|---|---|---|---|---|
siteId | uuid | required | The site UUID. | — |
Query parameters
| Name | Type | Required | Description | Default |
|---|---|---|---|---|
source | "gsc" | "ga4" | "psi_lab" | "psi_field" | optional | Filter snapshots by data source. | — |
metric_name | string | optional | Filter snapshots by metric name, e.g. "organic_sessions", "impressions". | — |
cursor | string | optional | Opaque pagination cursor from the previous response. | — |
limit | integer | optional | Number of items per page. Min 1, max 100. | 25 |
Responses
200Paginated metric snapshot rows.
json
{
"data": {
"items": [
{
"id": "00000000-0000-0000-0000-000000000050",
"source": "ga4",
"metric_name": "organic_sessions",
"value": 137,
"dimensions": {},
"period_start": "2025-01-09",
"period_end": "2025-01-09",
"recorded_at": "2025-01-10T04:30:00.000Z"
}
],
"total_count": 1
},
"_meta": {
"generated_at": "2025-01-15T10:30:00.000Z",
"site_id": "00000000-0000-0000-0000-000000000001"
}
}404Site not found or not owned by the authenticated user.
json
{
"error": "Site not found"
}