Complete API Documentation

Authentication

POST /api/admin/login

Authenticate admin access.

{ "key": "your_admin_key" }
Response
{ "success": true }

User Management

GET /api/admin/users

Get all registered users.

Response
{ "success": true, "users": [ { "id": 1, "username": "user1", "hwid": "hwid_string", "blacklisted": false } ] }
GET /api/admin/active-users

Get all currently active users.

Response
{ "success": true, "activeUsers": [ { "hwid": "hwid_string", "username": "user1", "connectedAt": "timestamp", "lastHeartbeat": "timestamp" } ] }
POST /api/admin/ban/:userId

Ban a specific user.

Response
{ "success": true }
POST /api/admin/unban/:userId

Unban a specific user.

Response
{ "success": true }
POST /api/admin/reset-hwid/:userId

Reset HWID for a specific user.

Response
{ "success": true, "message": "HWID reset successful" }

Token Management

GET /api/admin/tokens

Get all authentication tokens.

Response
{ "success": true, "tokens": [ { "token": "token_string", "used": false, "created_at": "timestamp" } ] }
POST /api/admin/generate-token

Generate a new authentication token.

Response
{ "success": true, "token": "generated_token_string" }

Client Control

POST /api/admin/send-message

Send a message to a specific client.

{ "hwid": "client_hwid", "message": "Your message" }
Response
{ "success": true }
POST /api/admin/close-app

Force close the application for a specific client.

{ "hwid": "client_hwid" }
Response
{ "success": true }
POST /api/admin/shutdown-pc

Shutdown the PC for a specific client.

{ "hwid": "client_hwid" }
Response
{ "success": true }

Version Control

GET /api/admin/version

Get current application version.

Response
{ "success": true, "version": "1.0.0" }
POST /api/admin/update-version

Update application version.

{ "version": "new_version_string" }
Response
{ "success": true, "version": "new_version_string" }

Database Management

GET /api/admin/table/:tableName

Get data from a specific database table (users or tokens).

Response
{ "success": true, "rows": [/* table data */] }
POST /api/admin/table/:tableName/update

Update data in a specific database table.

{ "original": [/* original data */], "updated": [/* updated data */] }
Response
{ "success": true }