Add server/query

Braydon 2024-04-06 23:04:18 -07:00
parent 1f97e1a0f3
commit 406ab7280f

50
server%2Fquery.md Normal file

@ -0,0 +1,50 @@
# Query Server
`GET` `/server/<platform>/<query>`
Ping a Java or Bedrock server and retrieve it's status.
## Path Variables
| Name | Type | Description |
|----------|:------:|--------------------------------:|
| platform | string | `JAVA` or `BEDROCK` |
| hostname | string | `The server hostname to lookup` |
## Response
```json
{
"value": {
"hostname": "mc.hypixel.net",
"ip": "209.222.115.103",
"port": 25565,
"version": {
"name": "Requires MC 1.8 / 1.20",
"protocol": 47, // The protocol version of the server
"protocolName": "1.8" // The protocol name of the server
},
"players": {
"online": 29457,
"max": 200000,
"sample": []
},
"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": [
" <span style=\"color:#55FF55\">Hypixel Network <span style=\"color:#FF5555\">[1.8-1.20]",
" <span style=\"color:#00AAAA\"><span style=\"color:\">SB 0.19.12 <span style=\"color:#AAAAAA\">| <span style=\"color:#FFAA00\"><span style=\"color:\">TNT UPDATE <span style=\"color:#AAAAAA\">| <span style=\"color:#55FFFF\"><span style=\"color:\">EASTER EVENT"
]
},
"enforcesSecureChat": false,
"preventsChatReports": false,
"mojangBanned": false, // Is the server Mojang banned?
"icon": "data:image/png;base64,iVBORw0KGgoAAAANS..." // The base64 encoded server icon
},
"cached": 1712465892957 // -1 if not cached
}
```