Référence de l'API
Tous les endpoints de l'API oxb : serveur, statistiques, bans, joueurs, logs, administrateurs et actions, avec paramètres et exemples.
Cette page n'est pas encore traduite dans votre langue : la version anglaise est affichée.
Base: https://api.oxbservices.com/v1. Every route carries x-api-key and x-api-secret (see API Keys) and answers JSON.
Read#
| Method and route | Parameters | Returns |
|---|---|---|
GET /server | — | State (ONLINE, OFFLINE, BANNED), name, IP, version, players and license expiry. |
GET /server/stats | window: 24h (default), 7d, 30d | Statistics of the server in that window. |
GET /server/players | — | The players connected now (count and players). |
GET /server/bans | limit (max. 100), page, reason, playerName | Active bans, with player, identifiers and reason. |
GET /server/bans-history | limit (max. 100), page, reason, playerName | History of bans, including the ones already removed. |
GET /server/config | — | The current configuration of the server. |
GET /server/admins | — | Administrators and their permissions. |
GET /server/logs | limit (max. 500), page, type (several separated by comma) | Records of the activity of the server. |
POST /server/lookup | body: identifier | The players that have that identifier (current or previous). |
Actions#
| Method and route | Body (JSON) | What it does |
|---|---|---|
POST /server/kick | playerId, reason?, by? | Kicks a connected player. |
POST /server/ban | playerId, reason, duration? (seconds), evidence?, by? | Bans a connected player. |
POST /server/ban/offline | playerLicense or identifiers[], reason, details?, evidenceUrl?, by? | Bans a player even if not connected. |
POST /server/unban | banId | Removes a ban. |
POST /server/unban/last | count? (max. 10), minutes? | Removes the latest bans. |
POST /server/unban/all | — | Removes all the bans of the server. |
POST /server/screenshot | playerId | Requests a screenshot of the player. |
POST /server/exec | command, by? | Runs a command in the server console. |
POST /server/admin/add | discordId, permissions[] | Adds an administrator with those permissions. |
POST /server/admin/remove | discordId | Removes an administrator. |
Examples#
curl -X POST https://api.oxbservices.com/v1/server/ban \ -H "x-api-key: $OXB_KEY" -H "x-api-secret: $OXB_SECRET" \ -H "Content-Type: application/json" \ -d '{ "playerId": 42, "reason": "Executor use", "duration": 86400, "by": "My bot" }'const res = await fetch("https://api.oxbservices.com/v1/server/players", { headers: { "x-api-key": process.env.OXB_KEY, "x-api-secret": process.env.OXB_SECRET, },});if (!res.ok) throw new Error((await res.json()).code);const { count, players } = await res.json();console.log(`${count} players`, players.map((p) => p.name));curl -X POST https://api.oxbservices.com/v1/server/ban/offline \ -H "x-api-key: $OXB_KEY" -H "x-api-secret: $OXB_SECRET" \ -H "Content-Type: application/json" \ -d '{ "playerLicense": "license:abc123…", "reason": "Alternate account of a banned player" }'Dernière mise à jour : 11 novembre 2026