Analytics Dashboard Recipes

Select date ranges, combine analytics queries, and handle high-volume recent-login views.

AuthOS release 0.8.2 API v1 Latest-only documentation
Updated Jul 15, 2026
On this page

Best Practices

Date Range Selection

# Last 7 days
curl "https://sso.example.com/api/organizations/acme-corp/analytics/login-trends?start_date=$(date -u -d '7 days ago' +%Y-%m-%d)&end_date=$(date -u +%Y-%m-%d)" \
  -H "Authorization: Bearer eyJhbGc..."

# Current month
START_DATE=$(date -u +%Y-%m-01)
END_DATE=$(date -u +%Y-%m-%d)
curl "https://sso.example.com/api/organizations/acme-corp/analytics/login-trends?start_date=$START_DATE&end_date=$END_DATE" \
  -H "Authorization: Bearer eyJhbGc..."

Combining Multiple Analytics

# Fetch all analytics data in parallel for a dashboard
ORG="acme-corp"
TOKEN="eyJhbGc..."
BASE_URL="https://sso.example.com"

curl "$BASE_URL/api/organizations/$ORG/analytics/login-trends" \
  -H "Authorization: Bearer $TOKEN" &

curl "$BASE_URL/api/organizations/$ORG/analytics/logins-by-service" \
  -H "Authorization: Bearer $TOKEN" &

curl "$BASE_URL/api/organizations/$ORG/analytics/logins-by-provider" \
  -H "Authorization: Bearer $TOKEN" &

curl "$BASE_URL/api/organizations/$ORG/analytics/recent-logins?limit=20" \
  -H "Authorization: Bearer $TOKEN" &

wait

Pagination for Large Result Sets

For recent logins with high volume:

# First 100 results
curl "https://sso.example.com/api/organizations/acme-corp/analytics/recent-logins?limit=100" \
  -H "Authorization: Bearer eyJhbGc..."

# Note: The API does not support offset-based pagination
# To get older records, use date-filtered queries on login-trends