---
title: "Get comprehensive dashboard statistics."
method: GET
path: "/api/v1/stats/dashboard"
---

# Get comprehensive dashboard statistics.

`GET /api/v1/stats/dashboard`

Only SUPERADMIN users can access dashboard statistics.

Query Parameters:
- period: Time period filter (last_day, last_week, last_month, last_year, all)
- include: Comma-separated list of sections (summary, trends, geographic, tasks)

Example Response for include=summary (period=all):
{
    "data": {
        "summary": {
            "total_executions": 1500,
            "total_jobs": 1500,
            "total_users": 250,
            "total_scripts": 150,
            "total_executions_finished": 1200,
            "total_executions_failed": 200,
            "total_executions_cancelled": 100
        }
    }
}

Example Response for include=summary (period=last_month):
{
    "data": {
        "summary": {
            "total_executions": 450,
            "total_jobs": 450,
            "total_users": 80,
            "total_scripts": 150,
            "total_executions_finished": 360,
            "total_executions_failed": 60,
            "total_executions_cancelled": 30
        }
    }
}

Example Response for include=trends:
{
    "data": {
        "trends": {
            "hourly_jobs": [
                {"hour": "2025-08-08T10:00:00Z", "count": 5},
                {"hour": "2025-08-08T11:00:00Z", "count": 8}
            ],
            "daily_jobs": [
                {"date": "2025-08-07", "count": 45},
                {"date": "2025-08-08", "count": 52}
            ],
            "monthly_jobs": [
                {"month": "2025-07", "count": 1200},
                {"month": "2025-08", "count": 300}
            ]
        }
    }
}

Example Response for include=geographic:
{
    "data": {
        "geographic": {
            "countries": {
                "USA": 100,
                "Brazil": 75,
                "Germany": 50
            },
            "total_users": 225
        }
    }
}

Example Response for include=tasks:
{
    "data": {
        "tasks": {
            "by_type": [
                {"task": "productivity", "count": 500, "success_rate": 95.0},
                {"task": "land-cover", "count": 300, "success_rate": 92.0},
                {"task": "carbon", "count": 200, "success_rate": 89.0}
            ],
            "by_version": [
                {"version": "2", "count": 600, "percentage": 60.0},
                {"version": "1", "count": 400, "percentage": 40.0}
            ]
        }
    }
}

Example Response for include=summary,trends,geographic,tasks (all sections):
{
    "data": {
        "summary": { ... },
        "trends": { ... },
        "geographic": { ... },
        "tasks": { ... }
    }
}

Returns:
    JSON response with dashboard statistics containing requested sections

## Response `200`

Success

- object

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `500` — Internal Server Error

---

[API](https://skmtc.dev/trends/apis/trends-earth-api.md) · [All operations](https://skmtc.dev/trends/apis/trends-earth-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/trends/trends-earth-api/revisions/6bdbc0b84666/schema)
