REST

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

Raw 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 limit

Request

bash
curl -X GET \
  'https://letoseo.com/api/v1/sites/:siteId/metrics' \
  -H 'Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

Path parameters

NameTypeRequiredDescriptionDefault
siteIduuidrequiredThe site UUID.

Query parameters

NameTypeRequiredDescriptionDefault
source"gsc" | "ga4" | "psi_lab" | "psi_field"optionalFilter snapshots by data source.
metric_namestringoptionalFilter snapshots by metric name, e.g. "organic_sessions", "impressions".
cursorstringoptionalOpaque pagination cursor from the previous response.
limitintegeroptionalNumber 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"
}