diff --git a/server%2Fquery.md b/server%2Fquery.md index 94bf566..b7baf5e 100644 --- a/server%2Fquery.md +++ b/server%2Fquery.md @@ -3,6 +3,8 @@ Ping a Java or Bedrock server and retrieve it's status. +View the [Swagger Docs](https://mc.rainnny.club/swagger-ui/index.html#/Server%20Controller/getServer) for more. + ## Path Variables | Name | Type | Description | |----------|:------:|----------------------------------------------------------:| @@ -18,61 +20,107 @@ Ping a Java or Bedrock server and retrieve it's status. ## Cache Results are cached for up to `1 minute` -## Response +## Java Response ```json { - "value": { - "hostname": "mc.hypixel.net", - "ip": "209.222.115.103", - "port": 25565, - "version": { // (Java Only) - "name": "Requires MC 1.8 / 1.20", - "protocol": 47, // The protocol version of the server - "protocolName": "1.8" // The protocol name of the server (if identified) - }, - "players": { - "online": 29457, - "max": 200000, - "sample": [ // Not always present (Java Only) - { - "id": "fc1d5fe7-f29b-430d-80bb-3b093a638b0f", - "name": "Rainnny" + "value": { + "hostname": "mc.hypixel.net", + "ip": "209.222.115.100", + "port": 25565, + "records": [ + { + "type": "SRV", + "ttl": 228, + "priority": 1, + "weight": 1, + "port": 25565, + "target": "mc.hypixel.net" + }, + { + "type": "A", + "ttl": 23, + "address": "209.222.115.100" + } + ], + "players": { + "online": 49063, + "max": 200000 }, - ... - ] - }, - "motd": { - "raw": [ - " §aHypixel Network §c[1.8-1.20]", - " §3§lSB 0.19.12 §7| §6§lTNT UPDATE §7| §b§lEASTER EVENT" - ], - "clean": [ - " Hypixel Network [1.8-1.20]", - " SB 0.19.12 | TNT UPDATE | EASTER EVENT" - ], - "html": [ - " Hypixel Network [1.8-1.20]", - " SB 0.19.12 | TNT UPDATE | EASTER EVENT" - ] - }, - "modInfo": { // Not always present (Java Only) - "type": "FML", - "modList": [ - { - "modid": "minecraft", - "version": "1.8.9" + "motd": { + "raw": [ + " §aHypixel Network §c[1.8-1.20]", + " §b§lSB 0.20 §f§lGLACITE TUNNELS §7| §6§lTNT UPDATE" + ], + "clean": [ + " Hypixel Network [1.8-1.20]", + " SB 0.20 GLACITE TUNNELS | TNT UPDATE" + ], + "html": [ + " Hypixel Network [1.8-1.20]", + " SB 0.20 GLACITE TUNNELS | TNT UPDATE" + ] }, - ... - ] + "version": { + "name": "Requires MC 1.8 / 1.20", + "protocol": 47, + "protocolName": "1.8" + }, + "favicon": { + "base64": "data:image/png;base64,iV…mHEPQgkAAAAASUVORK5CYII=...", + "url": "https://mc.rainnny.club/server/icon/mc.hypixel.net" + }, + "previewsChat": false, + "enforcesSecureChat": false, + "preventsChatReports": false, + "mojangBanned": false }, - "enforcesSecureChat": false, // (Java Only) - "preventsChatReports": false, // (Java Only) - "mojangBanned": false, // Is the server Mojang banned? (Java Only) - "favicon": { // The base64 encoded server icon, only present if the server has an icon - "base64": "data:image/png;base64,iV…mHEPQgkAAAAASUVORK5CYII=", - "url": "https://mc.rainnny.club/server/icon/java/mc.hypixel.net" - } - }, - "cached": 1712465892957 // -1 if not cached + "cached": 1713024877386 // -1 if not cached +} +``` + +## Bedrock Response +```java +{ + "value": { + "hostname": "gateway.wildnetwork.net", + "ip": "198.244.215.7", + "port": 19132, + "records": [ + { + "type": "A", + "ttl": 300, + "address": "198.244.215.7" + } + ], + "players": { + "online": 0, + "max": 1000 + }, + "motd": { + "raw": [ + "WildNetwork", + "WildNetwork - Prison - SMP" + ], + "clean": [ + "WildNetwork", + "WildNetwork - Prison - SMP" + ], + "html": [ + "WildNetwork", + "WildNetwork - Prison - SMP" + ] + }, + "id": "12929675432988707659", + "edition": "MCPE", + "version": { + "protocol": 662, + "name": "1.20.70" + }, + "gamemode": { + "name": "Survival", + "numericId": 1 + } + }, + "cached": 1713025005404 // -1 if not cached } ``` \ No newline at end of file