API Endpoints Documentation

1. Search Stats for a Specific SteamID

URL: api.php?action=search&server={server_id}&steamid={steamid}

Description: Retrieve lifetime and stats data for a specific SteamID.

Method: GET

Parameters:

Example:

https://your-domain.com/api.php?action=search&server=1&steamid=76561197960287930

2. Insert or Update Stats

URL: api.php?action=update&secret={secret_key}&server={server_id}

Description: Insert or update player stats in both lifetime and stats tables, and update the user's avatar and name from Steam API.

Method: POST

Payload (JSON format):

[
  {
    "steamid": "76561197960287930",
    "_event": "bullets_fired",
    "amount": 5
  },
  {
    "steamid": "76561197960287931",
    "_event": "kills",
    "amount": 10
  }
]

Parameters:

Example:

https://your-domain.com/api.php?action=update&secret=12345&server=1

3. Dump Stats for a Specific SteamID

URL: api.php?action=dump&secret={secret_key}&server={server_id}&steamid={steamid}

Description: Delete stats for a specific SteamID from the stats table. It does not affect the lifetime table.

Method: DELETE

Parameters:

Example:

https://your-domain.com/api.php?action=dump&secret=12345&server=1&steamid=76561197960287930

4. Delete All Stats

URL: api.php?action=delete&secret={secret_key}&server={server_id}

Description: Deletes all records in the stats table.

Method: DELETE

Parameters:

Example:

https://your-domain.com/api.php?action=delete&secret=12345&server=1