-
Notifications
You must be signed in to change notification settings - Fork 77
Developer Guides ‐ CRCON API
🧭 You are here : Wiki home / Developer Guides / CRCON API
There is an API for CRCON available at http://(your VPS IP):8010/api/
(first -or only- game server managed in CRCON)
You'll find a list of endpoints and related documentation at http://(your VPS IP):8010/api/get_api_documentation
You can generate an API token in the admin panel located here : http://(your VPS IP):8010/admin
Each token you'll create will get the permissions of the user it belongs.
If you want your API token to have full permissions, create a dedicated user and give him "superuser" status, then create a token from his account.
Create new user with permissions you wish for the API key to have.
- Login to the Admin interface at
http://(your VPS IP):8010/admin
- Click the '+Add' link, next to users
- Enter username and password and click
Save and continue editing
- The password can be random and forgotten, Steam ID ins't required.
- Ensure that the account has the
Active
checkbox checked. - Provide permission to user
- You can give specific permissions to each user via the Permissions section or Groups.
- Login to the Admin interface at
http://(your VPS IP):8010/admin
- Click the
+Add
link, next toDjango API Keys
Important
The API key will be provided in next step, make sure you copy this down and save it. You will not see it again.
- Fill out API details and click
Save
- Select the user for the API Key.
- Add notes (great for tracking API keys)
You can access them through the various endpoints available at http://(your VPS IP):8010/api/
, most of which require authentication.
curl https://(your VPS IP):8010/api/get_map_rotation -H "Authorization: Bearer <django-api-token>"
curl -X POST https://(your VPS IP):8010/api/get_historical_logs -H "Authorization: Bearer <django-api-token>" -d '{"log_type":"KILL",
"limit":9999}'
curl -X POST https://(your VPS IP):8010/api/get_gamestate -H "Authorization: Bearer <django-api-token>"
import requests
headers = {
"Authorization": "bearer 12345678-your-api-token-123456789",
"Connection": "keep-alive",
"Content-Type": "application/json"
}
data_request={
"player": "ThisGuy",
"steam_id_64": "765611981123456952",
"message": "test"
}
foo = requests.post("http://(your VPS IP):8010/api/do_message_player", data=json.dumps(data_request), headers=headers)
You can use Postman to send API requests to your CRCON.
Example config in Postman :
Hell Let Loose (HLL) Community RCON (CRCON) Wiki - Back to Home
Maps
Records
Settings
Others
Stats
(TODO)
- Admin panel (needs update)
- Migrate CRCON to another VPS
- Replace the game server managed in CRCON
- Adding a game server to manage in CRCON
- Overview Project Structure
- Development environment
- Building your own Docker images
- CRCON API
- Streaming Logs
- Remotely connect to the PostgreSQL database
- Miscellaneous (needs update)
- HLL RCON Commands (needs update)
- Please look at this first
- Ask for help