- name - 服务器名称(长度前缀 UTF-8 字符串)
- map - 当前地图名称
- players - 当前玩家数(int32)
- wave - 当前波数(int32)
- version - 构建号(int32)
- versionType - 版本类型字符串
- gameMode - 游戏模式序数(uint8)
- playerLimit - 最大玩家数(int32)
- description - 服务器描述
- modeName - 自定义模式名称(可选)
- port - 服务器端口(int16)
API 端点
GET /api/v1/server/status
查询 Mindustry 服务器的状态。查询参数:
| 参数 | 必填 | 类型 | 默认值 | 说明 |
|---|---|---|---|---|
host | 是 | string | - | 服务器主机名或 IP 地址 |
port | 否 | integer | 6567 | 服务器端口(1-65535) |
timeout | 否 | integer | 2000 | 查询超时时间(毫秒,最大 10000) |
curl "http://localhost:3000/api/v1/server/status?host=example.com&port=6567"