{"name":"Glonkworks Public API","version":1,"docs":"https://6.dev.glonk.party/docs","scope":"Public read-only endpoints for server discovery","endpoints":[{"id":"api-index","method":"GET","path":"/api","section":"Discovery","summary":"API index","description":"Returns the current public API manifest and links back to the site docs.","exampleRequest":"GET /api","exampleResponse":"{\n  \"name\": \"Glonkworks Public API\",\n  \"docs\": \"/docs\",\n  \"endpoints\": [...]\n}","url":"https://6.dev.glonk.party/api"},{"id":"health","method":"GET","path":"/api/health","section":"Operations","summary":"Health check","description":"Returns a non-sensitive health summary for public uptime monitoring. The endpoint reports ok only when the application can reach its required database dependency.","notes":["Response is uncached and intended for external uptime monitors.","The response never includes connection strings, hostnames, stack traces, row data, or raw dependency errors.","Returns 503 with status degraded when the database check fails."],"exampleRequest":"GET /api/health","exampleResponse":"{\n  \"status\": \"ok\",\n  \"checks\": {\n    \"database\": \"ok\"\n  },\n  \"checkedAt\": \"2026-06-25T00:00:00.000Z\"\n}","url":"https://6.dev.glonk.party/api/health"},{"id":"discord-widget","method":"GET","path":"/api/discord/widget","section":"Discord","summary":"Discord Game Stats Widget data","description":"Returns the dynamic stat payload consumed by Discord's Game Stats Widget integration.","notes":["Response is public and cached for roughly 45 seconds.","Daily metrics use the Glonkworks calendar day in America/New_York.","The endpoint does not perform Discord OAuth, Discord auth, or per-user lookups."],"exampleRequest":"GET /api/discord/widget","exampleResponse":"{\n  \"data\": {\n    \"dynamic\": [\n      { \"type\": 2, \"name\": \"totalOnline\", \"value\": 28 },\n      { \"type\": 1, \"name\": \"totalDistance\", \"value\": \"1.1k Km\" },\n      { \"type\": 1, \"name\": \"dailySpeed\", \"value\": \"88 Mph\" },\n      { \"type\": 2, \"name\": \"dailyCrashes\", \"value\": 69 },\n      { \"type\": 2, \"name\": \"dailyHours\", \"value\": 41 },\n      { \"type\": 2, \"name\": \"dailyExp\", \"value\": 9552 }\n    ]\n  }\n}","url":"https://6.dev.glonk.party/api/discord/widget"},{"id":"servers-list","method":"GET","path":"/api/servers","section":"Servers","summary":"List public servers","description":"Returns the public server directory with live status data, player counts, display metadata, and recent gameplay activity scoring.","notes":["Response is uncached and intended for live server status views.","Live presence prefers fresh GlonkCore runtime or ingest data. If a managed GlonkCore heartbeat has gone stale, the server is treated as offline rather than revived from stale BeamMP directory data.","When fresh GlonkCore session data is available, registeredPlayers, guestPlayers, and playerRoster split the live population without creating public guest profiles.","recentActivity is a decayed live pulse derived from recent STATS_BATCH, PLAYER_JOIN, PLAYER_LEAVE, and ECONOMY_REWARD ingest data.","recentActivity.score is an internal ranking value used for discovery and is subject to tuning; public pages should use the tier, labels, and breakdown instead of displaying the raw score.","One server may include fallbackRecommendation when it is currently the network's Weekly Favorite based on recent weekly return behavior. That weekly loyalty signal also adds a small decaying ranking boost.","Maintenance and test flags may be present when configured."],"exampleRequest":"GET /api/servers","exampleResponse":"[\n  {\n    \"id\": \"example.com:30814\",\n    \"slug\": \"glonkworks-freeroam\",\n    \"name\": \"Glonkworks Freeroam\",\n    \"ip\": \"example.com\",\n    \"port\": 30814,\n    \"status\": \"online\",\n    \"map\": \"/levels/west_coast_usa/info.json\",\n    \"players\": 6,\n    \"registeredPlayers\": 4,\n    \"guestPlayers\": 2,\n    \"maxPlayers\": 12,\n    \"playerRoster\": [\n      {\n        \"kind\": \"registered\",\n        \"name\": \"DriverA\",\n        \"isGuest\": false,\n        \"beammpId\": \"beammp-player-id\"\n      },\n      {\n        \"kind\": \"guest\",\n        \"name\": \"GuestDriver\",\n        \"isGuest\": true,\n        \"guestSessionId\": \"guest-session-123\"\n      }\n    ],\n    \"lastIngestAt\": \"2026-03-16T08:00:00.000Z\",\n    \"recentActivity\": {\n      \"score\": 15.93,\n      \"windowMinutes\": 180,\n      \"statBatchCount\": 12,\n      \"uniquePlayers\": 4,\n      \"distanceMeters\": 18420,\n      \"crashes\": 5,\n      \"vehicleResets\": 3,\n      \"playtimeSeconds\": 2460,\n      \"joinCount\": 3,\n      \"leaveCount\": 1,\n      \"rewardCount\": 2,\n      \"rewardCredits\": 14,\n      \"uniqueEarners\": 2,\n      \"featuredRank\": 1,\n      \"tier\": \"surging\",\n      \"isHot\": true,\n      \"isTopActivityServer\": true,\n      \"dominantSignals\": [\"Joining Fast\", \"Heavy Driving\"],\n      \"lastEventAt\": \"2026-03-16T08:02:00.000Z\",\n      \"breakdown\": {\n        \"drivingScore\": 11.22,\n        \"momentumScore\": 4.01,\n        \"rewardScore\": 0,\n        \"rewardScoreBase\": 6.12,\n        \"mostLovedBoost\": 0.7,\n        \"occupancyModifier\": 1.04,\n        \"decayedDistanceMeters\": 12610.44,\n        \"decayedVehicleResets\": 2.38,\n        \"decayedCrashes\": 3.14,\n        \"decayedPlaytimeSeconds\": 1510.77,\n        \"decayedStatBatches\": 7.63,\n        \"decayedUniqueDrivers\": 3.35,\n        \"decayedJoins\": 2.44,\n        \"decayedLeaves\": 0.58,\n        \"decayedUniqueJoiners\": 2.11,\n        \"decayedRewardCount\": 1.56,\n        \"decayedRewardCredits\": 9.4,\n        \"decayedUniqueEarners\": 1.22\n      }\n    },\n    \"fallbackRecommendation\": {\n      \"kind\": \"most_loved\",\n      \"label\": \"Weekly Favorite\",\n      \"reason\": \"Returning drivers kept coming back here more than anywhere else this week.\"\n    },\n    \"isMaintenance\": false,\n    \"isTest\": false\n  }\n]","url":"https://6.dev.glonk.party/api/servers"}]}