Ir al contenido

A site's visitors, pageviews and breakdowns for a range

GET/api/v1/analytics/stats

Needs deploy.manage. Ranges over 31 days come from the daily totals: source is daily and the breakdowns they do not keep are listed in unavailable.

Necesita una clave de API en la cabecera Authorization.

En esta página

Parámetros

CampoEnTipoDescripción
scopeTypeobligatorioconsultastring
  • uno de: application, polaris, external
scopeIdconsultastring
  • long. máx.: 64
rangeobligatorioconsultastring
  • uno de: 24h, 7d, 30d, 90d, 12m
filtersconsultastring
JSON list of filters, as the Analytics address carries them
  • long. máx.: 4000
compareconsultastring
  • uno de: previous, year
breakdownconsultastring
Comma list of breakdowns; all when omitted
  • long. máx.: 400

Petición de ejemplo

curl -X GET "https://polaris.example.com/api/v1/analytics/stats" \
  -H "Authorization: Bearer $POLARIS_API_KEY"

Respuestas

EstadoQué es
200OK

También puede dar los errores comunes 400, 401, 403, 404, 429. Ver errores comunes