DS2 Revival

JSON API

Updated

The data behind these pages, for bots, launchers and community sites. Free to use; no key needed.

Ground rules

GET /api/status

Service health and headline counts.

{"server": "use1.dsii.uk", "time": 1792700000, "all_up": true,
 "services": [{"name": "Chat (peerchat)", "protocol": "TCP", "port": 6667, "up": true}, ...],
 "players": {"chat": 5, "signed_in": 2, "in_games": 4},
 "games": 2,
 "lobbies": {"portals_in_use": 2, "staging_rooms": 1},
 "relay": {"hosts": 1, "connections": 2}}

GET /api/games

Games in the server list, most players first.

{"time": 1792700000, "games": [
  {"name": "Friday co-op", "map": "ds2_world", "state": "playing", "mode": "4x1", "mode_name": "",
   "heroes_per_player": 1, "players": 2, "max_players": 4, "password": false,
   "version": "2.30.0.4277", "edition": "Broken World", "portal": "Agarrus", "network": "Internet"}]}

GET /api/lobbies

Who is where.

{"time": 1792700000, "chat_users": ["Arden", "Valdis"],
 "portals": [{"name": "Agarrus", "network": "Internet", "groupid": 1, "players": ["Arden"], "games": 1}, ...],
 "staging_rooms": [{"players": ["Arden", "Valdis"]}],
 "other_rooms": {"rooms": 0, "players": 0}}

Staging rooms are listed without their names (the names encode the host's addresses). Other chat rooms are only counted.

GET /api/stats?range=24h|7d|30d

Totals, peaks and history. range defaults to 24h.

{"time": 1792700000, "range": "24h", "bucket_seconds": 900, "recording_since": 1792600000,
 "totals": {"accounts": 9, "profiles": 9, "vault_profiles": 9,
            "parties": {"ds2": 3, "broken_world": 1},
            "stats_records": {"newgame": 0, "updgame": 0},
            "games_hosted": {"total": 12, "last_24h": 3, "last_7d": 12, "last_30d": 12,
                             "by_edition": {"Dungeon Siege II": 10, "Broken World": 2},
                             "by_mode": {"4x1": 11, "8x1": 1}}},
 "peaks": {"chat": {"value": 7, "time": 1792650000}, ...},
 "series": {"chat": [[1792613700, 2], [1792614600, null], ...], "signed_in": [...], "in_games": [...],
            "games": [...], "relay_hosts": [...], "relay_conns": [...]}}