Développeurs
Documentation API
Intégrez Hostboard dans vos outils, bots Discord ou dashboards personnalisés.
GET
/api/servers/listListe publique des serveurs avec stats (votes, joueurs, statut).
curl https://hostboard.fr/api/servers/list
POST
/api/votesVote web pour un serveur. Body: { serverId, fingerprint?, honeypot? }
curl -X POST https://hostboard.fr/api/votes -H "Content-Type: application/json" -d '{"serverId":"..."}'GET
/api/vote?token=TOKENVote in-game FiveM. Token unique par serveur (dashboard).
curl "https://hostboard.fr/api/vote?token=VOTE_TOKEN"
GET
/api/stats?serverId=IDGraphique votes 30 jours + total mensuel pour un serveur.
curl "https://hostboard.fr/api/stats?serverId=..."
GET
/api/export/votes?serverId=IDExport CSV des votes (propriétaire connecté).
curl -b cookie "https://hostboard.fr/api/export/votes?serverId=..."
GET
/api/monitoringCron monitoring FiveM (info.json + players.json). Header: Authorization: Bearer CRON_SECRET
curl -H "Authorization: Bearer $CRON_SECRET" https://hostboard.fr/api/monitoring
POST
/api/reviewsPublier ou modifier un avis (connecté). Body: { serverId, rating (1-5), comment (10-400 car.) }
curl -X POST https://hostboard.fr/api/reviews -H "Content-Type: application/json" -b cookie -d '{"serverId":"...","rating":5,"comment":"Super serveur RP !"}'PATCH
/api/servers/[id]Modifier un serveur (propriétaire). Champs : name, description, ip, port, tags, etc.
curl -X PATCH https://hostboard.fr/api/servers/SERVER_ID -H "Content-Type: application/json" -b cookie -d '{"name":"Mon serveur"}'Créer session Stripe. Body: { type, serverId, slot?, hours? }
curl -X POST https://hostboard.fr/api/stripe/checkout -H "Content-Type: application/json" -d '{"type":"showcase","serverId":"...","slot":1,"hours":12}'Resource FiveM : incluse dans le repo
fivem-resource/topgta-vote/. Configurez topgta_api et topgta_token dans votre server.cfg.