---
title: "Analytics"
icon : "api"
description: "Aggregated execution counters and chart data for a project."
---

# Analytics

<Endpoint
  method="GET"
  path  ="https://api.envyauth.my.id/api/v3/projects/:project_uuid/analytics"
/>

Returns the counters and chart series shown in the dashboard's Analytics tab. Results are cached server-side per period.

## Query parameters

| Name | Allowed values | Default |
|---|---|---|
| `period` | `24h`, `7d`, `30d` | `7d` |

## Request

```bash
curl "https://api.envyauth.my.id/api/v3/projects/<project_uuid>/analytics?period=7d" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
```

## Response

<CodeGroup tabs={[
  {
    title: '200 OK',
    lang : 'json',
    code : '{\n  "success": true,\n  "data": {\n    "period":     "7d",\n    "project_id": "uuid",\n    "summary": {\n      "total_exec":   12534,\n      "active_today": 287\n    },\n    "exec_chart":    [ /* points */ ],\n    "script_chart":  [ /* points */ ],\n    "daily_chart":   [ /* points */ ],\n    "top_games":     [ /* { place_id, name, exec_count } */ ],\n    "platform_pie":  [ /* { platform, count } */ ],\n    "executor_pie":  [ /* { executor, count } */ ],\n    "top_region":    [ /* { region, count } */ ]\n  },\n  "requestid": "uuid"\n}',
  },
  {
    title: '404 Not Found',
    lang : 'json',
    code : '{\n  "success": false,\n  "error": "Project not found",\n  "code":  "NOT_FOUND",\n  "requestid": "uuid"\n}',
  },
  {
    title: '422 Validation',
    lang : 'json',
    code : '{\n  "success": false,\n  "error": "period must be one of: 24h, 7d, 30d",\n  "code":  "VALIDATION",\n  "requestid": "uuid"\n}',
  },
  {
    title: '500 Internal',
    lang : 'json',
    code : '{\n  "success": false,\n  "error": "Failed to load analytics",\n  "code":  "INTERNAL",\n  "requestid": "uuid"\n}',
  },
]} />

## Fields

| Field | Meaning |
|---|---|
| `summary.total_exec` | Cumulative execution count for the account's projects. |
| `summary.active_today` | Distinct active users in the last 24 hours. |
| `exec_chart` | Execution time series. Hourly when `period=24h`, daily otherwise (last 7 or 30 points). |
| `script_chart` | Execution time series broken down by script. |
| `daily_chart` | Daily active users time series. |
| `top_games` | Top Roblox places by execution count. |
| `platform_pie` | Slices for `Desktop`, `Mobile`, and `Tablet`. |
| `executor_pie` | Slices per executor name. |
| `top_region` | Top countries by execution count. |
