REST API
Read your plugin's data from your own scripts, Discord bots or dashboards. Read-only, with a token per plugin.
Tokens
In your plugin's Settings → REST API, create a token. It's shown once: store it like a password. A token reads that one plugin, with the same history and features as your plan, and you can revoke it any time. Only the plugin's owner can create and revoke tokens.
Send it in the Authorization header. Tokens never go in the URL.
curl -H "Authorization: Bearer pat_your_token" \
"https://pluginanalytics.dev/api/rest/v1/overview?from=2026-09-01&to=2026-09-30"
Endpoints
Every endpoint is a GET under https://pluginanalytics.dev/api/rest/v1/ and returns JSON: the same numbers the dashboard shows.
| Endpoint | Returns |
|---|---|
plugin | The plugin's name, platform, plan and visible history in days. |
overview | Active servers, new installs, players, errors, listing views and downloads in the period and the one before, with daily series and release markers. |
servers?dim=version | Active servers right now by plugin version, Minecraft version, software, country, Java, OS, online mode, size and cores, and one dimension (dim: version, mc, platform, country…) day by day. |
events | Every event and command with its count, the previous period's count, reach and daily series. |
events/<name> | One event day by day, with its properties' values. |
errors?status=open | Issues with occurrences, installs affected, versions and labels. status: open, resolved, ignored or all; page, q (search) and label filter. |
errors/<id> | One issue: stack trace, daily occurrences and installs affected per plugin version. |
downloads | Cumulative downloads per day from each connected source, and listing views per day. |
retention?period=week | Install cohorts and the share still running the plugin after each day or week. Pro and Premium. |
Dates
from and to take YYYY-MM-DD (UTC) or days since 1970-01-01, which is how dates come back in responses (day fields). Without them you get the last 30 days. Dates older than your plan's history are moved to its first visible day.
Errors and limits
- Up to 20 requests per minute per token; past that,
429. 401: missing, malformed or revoked token.402: the endpoint needs a paid plan.404: unknown endpoint or item.- Errors come back as
{"error": "…"}. - Responses allow any origin (CORS), but never put a token in a public web page: anyone could read it.