Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.leaf7.fun/llms.txt

Use this file to discover all available pages before exploring further.

Analytics

The analytics endpoints provide real-time data about your script executions, security events, and system health. Use them to build custom dashboards or monitoring tools.

Dashboard overview

GET /api/vendor/metrics/overview Get top-line metrics for your vendor account.

Headers

NameTypeRequiredDescription
AuthorizationStringBearer YOUR_API_KEY
{
    "active_projects": 3,
    "total_executions": 12847,
    "active_keys": 156,
    "api_status": "Operational"
}
FieldDescription
active_projectsNumber of projects you own
total_executionsSum of all key + project executions
active_keysKeys that are not expired
api_statusAlways "Operational" when reachable

Security events

GET /api/vendor/metrics/events Fetch recent security events (key creations, HWID resets, blacklists, etc.).

Query Parameters

NameTypeRequiredDescription
limitIntegerNumber of events to return (default: 4)
[
    {
        "id": 42,
        "type": "Success",
        "activity": "New project vault initialized",
        "project": "Premium Hub",
        "time": "5 min ago"
    },
    {
        "id": 41,
        "type": "Warning",
        "activity": "HWID Reset for key XkJ9a2bR...",
        "project": "Premium Hub",
        "time": "2 hours ago"
    },
    {
        "id": 40,
        "type": "Critical",
        "activity": "Blacklisted IP: 192.168.1.100 - Attempted script dump",
        "project": "System",
        "time": "1 days ago"
    }
]
Event TypeMeaning
SuccessNormal operations (project created, key generated)
WarningSuspicious activity (HWID mismatch, reset)
CriticalSecurity threat (blacklist, blocked execution)

Analytics chart data

GET /api/vendor/metrics/chart Get detailed analytics data including execution stats, 12-hour event history, and system health.

Query Parameters

NameTypeRequiredDescription
project_idStringFilter data to a specific project
{
    "stats": [
        { "label": "Total Executions", "val": "12847" },
        { "label": "Active Script Keys", "val": "156" },
        { "label": "Unique Devices", "val": "89" },
        { "label": "Auth Failures", "val": "12" }
    ],
    "chartData": [0, 3, 5, 2, 8, 12, 7, 4, 6, 3, 1, 9],
    "timeLabels": [
        "03:00", "04:00", "05:00", "06:00",
        "07:00", "08:00", "09:00", "10:00",
        "11:00", "12:00", "13:00", "14:00"
    ],
    "geography": [],
    "systemHealth": [
        { "label": "Global DB", "val": "100.0%" },
        { "label": "API Gateway", "val": "100.0%" },
        { "label": "Auth Proxy", "val": "100.0%" }
    ]
}
FieldDescription
statsSummary metrics as label-value pairs
chartDataArray of 12 values — event count per hour bucket
timeLabelsCorresponding hour labels for the chart
systemHealthReal-time health check for all subsystems