Color theme

Server config

Base: /api/serverconfig

Read and change Hytale's config.json

Handler: ServerConfigHandler
GET /api/serverconfig

Get server config

Returns the complete config.json of the server.

Response Example

{
  "MaxPlayers": 20,
  "ServerName": "My Server",
  "SkipModValidationForVersion": "abc123"
}

cURL

curl -X GET 'http://localhost:5550/api/serverconfig' \
  -H 'X-Admin-Token: YOUR_TOKEN'

Internal Behavior

Reads config.json at the server root.
POST /api/serverconfig

Change server config

Updates one or more keys of config.json. Most changes need a restart.

Request Body

Field Type Required Description
<key> any No Any config.json keys with new values

Response Example

{
  "success": true,
  "updated_keys": [
    "MaxPlayers",
    "ServerName"
  ]
}

cURL

curl -X POST 'http://localhost:5550/api/serverconfig' \
  -H 'X-Admin-Token: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"MaxPlayers": 50, "MOTD": "Welcome"}'

Internal Behavior

Merges the values and writes config.json.
POST /api/serverconfig/reload

Reload server config

Reads config.json from disk again.

Response Example

{
  "success": true,
  "action": "reload"
}

cURL

curl -X POST 'http://localhost:5550/api/serverconfig/reload' \
  -H 'X-Admin-Token: YOUR_TOKEN'

Internal Behavior

Reloads the file into the mod.