---
title: "Get execution statistics and trends."
method: GET
path: "/api/v1/stats/executions"
---

# Get execution statistics and trends.

`GET /api/v1/stats/executions`

Only SUPERADMIN users can access execution statistics.

Query Parameters:
- period: Time period filter (last_day, last_week, last_month, last_year, all)
- group_by: Grouping interval (quarter_hour, hour, day, week, month)
- task_type: Filter by specific task type
- status: Filter by execution status (PENDING, RUNNING, FINISHED, FAILED, CANCELLED)

Example Response:
{
    "data": {
        "time_series": [
            {
                "timestamp": "2025-08-08T10:00:00Z",
                "total": 10,
                "by_status": {"FINISHED": 8, "FAILED": 2},
                "by_task": {"productivity": 6, "land-cover": 4}
            }
        ],
        "top_users": [
            {
                "user_id": "123",
                "email": "user1@example.com",
                "execution_count": 45,
                "success_rate": 94.4,
                "favorite_tasks": ["productivity", "land-cover"]
            }
        ],
        "task_performance": [
            {
                "task": "productivity",
                "total_executions": 500,
                "success_rate": 95.0,
                "avg_duration_minutes": 45.2,
                "failure_reasons": []
            }
        ]
    }
}

Returns:
    JSON response with execution statistics

## 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)
