Skip to content

Latest commit

 

History

History
277 lines (193 loc) · 3.28 KB

File metadata and controls

277 lines (193 loc) · 3.28 KB
🌐 Language: 🇷🇺 Russian | ✅ 🇺🇸 English (current)

Lizerium Restarter Server API

HTTP API for bots, monitoring systems, dashboards, and remote integrations.


Base URL

Local:

http://127.0.0.1:52349

Public (example):

https://users.lizup.ru

Authentication

All protected endpoints require header:

X-Api-Key: YOUR_SECRET_KEY

Configure in:

appsettings.json

Example:

{
	"ApiSecretKey": "my_super_secret_key"
}

Content Type

Responses use:

application/json; charset=utf-8

Endpoints


GET /users

Returns current server statistics and active players.

Request

GET /users HTTP/1.1
Host: users.lizup.ru
X-Api-Key: YOUR_SECRET_KEY

Success Response

{
	"serverload": "6",
	"players": [
		{
			"name": "NubotiV",
			"rank": "142",
			"group": "0",
			"ship": "Vestnik",
			"system": "Aiur"
		},
		{
			"name": "Lizerium",
			"rank": "1",
			"group": "0",
			"ship": "Shadow Blade",
			"system": "New York"
		}
	]
}

Empty Server Example

{
	"serverload": "0",
	"players": []
}

Unauthorized Response

Status:

401 Unauthorized

Body:

{
	"error": "Unauthorized"
}

Internal Error Response

Status:

500 Internal Server Error

Body:

{
	"error": "Failed reading stats file"
}

Usage Examples


curl

curl -H "X-Api-Key: YOUR_SECRET_KEY" ^
https://users.lizup.ru/users

PowerShell

Invoke-RestMethod `
-Uri "https://users.lizup.ru/users" `
-Headers @{ "X-Api-Key" = "YOUR_SECRET_KEY" }

C#

using var client = new HttpClient();

client.DefaultRequestHeaders.Add(
    "X-Api-Key",
    "YOUR_SECRET_KEY");

string json =
    await client.GetStringAsync(
        "https://users.lizup.ru/users");

JavaScript

const res = await fetch('https://users.lizup.ru/users', {
	headers: {
		'X-Api-Key': 'YOUR_SECRET_KEY',
	},
})

const data = await res.json()

Response Fields

Field Description
serverload Current server load
players Active players array
name Player nickname
rank Player rank
group Group identifier
ship Current ship
system Current system

Security Notes

  • Never expose API key publicly
  • Prefer HTTPS deployment
  • Restrict IP access if possible
  • Rotate keys periodically

Rate Limiting

Recommended polling interval:

5-30 seconds

Avoid excessive requests.


Monitoring Integration Ideas

  • Discord bot online stats
  • Telegram bot player list
  • Web dashboard
  • Prometheus exporter
  • Server control panel

Planned Endpoints

Future optional endpoints:

/status
/restart
/start
/stop
/metrics
/version

Related Docs