Plugin Data Push

This guide explains how a plugin can push live stats and metadata to the EzBanners service. The repository includes a Java helper (`EzBannersApi`) you can use inside your Bukkit/Spigot plugin to send payloads easily.

Overview

Endpoint:

POST https://ezbanners.org/api/plugins/{plugin_uuid}/data

Plugins authenticate using the per-plugin token shown in the dashboard. The bundled Java helper computes and sends the required HMAC signature and headers for you.

Payload structure

{
  "plugin": { "name": "MyPlugin", "version": "1.2.3" },
  "stats": { "servers": 1, "players": 42, "downloads": 215 },
  "meta": { "server_uuid": "...", "server_name": "My Server", "spigot_last_update": "2026-02-01 17:36:12" }
}

Key notes:

Java helper (recommended)

The project ships a simple Java helper: EzBannersApi. It handles payload construction, signatures and repeating tasks.

// Send a single update
EzBannersApi api = new EzBannersApi(ezBannersPlugin);
ApiClient.ApiResponse resp = api.sendPluginStats("", this, 1, 12);
if (!resp.isSuccess()) { getLogger().warning("Push failed: " + resp.getMessage()); }

// Start periodic pushes every 60s
api.startAutoStatsPush("", this, 60);

Extra stats and meta

Call the extended API to include additional fields:

Map extraStats = new LinkedHashMap<>();
extraStats.put("downloads", 215);
Map meta = new LinkedHashMap<>();
meta.put("spigot_last_update", "2026-02-01 17:36:12");
api.sendPluginStats(pluginUuid, this, 1, 12, extraStats, meta);

Signature & headers

The helper computes the HMAC signature and sends these headers:

Troubleshooting

References

Related docs