Skip to main content

Analytics

The analytics endpoint provides aggregate metrics about your licenses, machines, and validations. Use it to power custom dashboards or monitoring integrations.

Get Analytics

GET/analytics

Retrieve dashboard analytics for your account. Requires API Key auth with analytics:read scope.

Request
curl https://your-instance.licentric.com/api/v1/analytics \
  -H "Authorization: Bearer lk_live_your_api_key"
200Analytics data
json
{
  "data": {
    "licenses": {
      "total": 1250,
      "active": 980,
      "expired": 142,
      "suspended": 18,
      "revoked": 110
    },
    "machines": {
      "total": 2340,
      "active": 2100,
      "dead": 240
    },
    "activations": {
      "trend": [
        { "date": "2026-02-24", "count": 45 },
        { "date": "2026-02-25", "count": 52 },
        { "date": "2026-02-26", "count": 38 },
        { "date": "2026-02-27", "count": 61 },
        { "date": "2026-02-28", "count": 47 },
        { "date": "2026-03-01", "count": 55 },
        { "date": "2026-03-02", "count": 29 }
      ]
    },
    "validations": {
      "total": 158420,
      "successful": 152300,
      "failed": 6120
    }
  }
}

Response Fields

licenses

Aggregate license counts by status. Includes total, active, expired, suspended, and revoked.

machines

Machine counts including total activated machines, active (alive), and dead (missed heartbeat).

activations.trend

Daily machine activation counts for the last 7 days. Each entry contains a date (YYYY-MM-DD) and count.

validations

Lifetime validation counts: total, successful, and failed.

Caching
Analytics data is computed on each request. For high-traffic accounts, consider caching the response on your side with a TTL of 30-60 seconds to reduce API calls.