curl --request GET \
--url https://api.erlcrussia.xyz/v2/erlc/server \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.erlcrussia.xyz/v2/erlc/server"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.erlcrussia.xyz/v2/erlc/server', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.erlcrussia.xyz/v2/erlc/server",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.erlcrussia.xyz/v2/erlc/server"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.erlcrussia.xyz/v2/erlc/server")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.erlcrussia.xyz/v2/erlc/server")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"Name": "API Test",
"OwnerId": 1,
"CoOwnerIds": [
1
],
"CurrentPlayers": 1,
"MaxPlayers": 1,
"JoinKey": "APIServer",
"AccVerifiedReq": "Disabled",
"TeamBalance": true,
"Players": [
{
"Team": "Sheriff",
"Player": "PlayerName:Id",
"Callsign": "5D-550",
"Location": {
"LocationX": 1084.965,
"LocationZ": 2302.28,
"PostalCode": "218",
"StreetName": "Park Street",
"BuildingNumber": "2083"
},
"Permission": "Normal / Server Administrator / Server Owner / Server Co-Owner / Server Moderator",
"WantedStars": 0
}
],
"Staff": {
"Admins": {
"54249787": "Black_Hallow",
"77573259": "sli_ckk"
},
"Mods": {
"2": "JohnDoe",
"3": "JaneDoe"
},
"Helpers": {
"168691872": "Flat_bird"
}
},
"JoinLogs": [
{
"Join": true,
"Timestamp": 1704614400,
"Player": "PlayerName:Id"
}
],
"Queue": [
1
],
"KillLogs": [
{
"Killed": "PlayerName:Id",
"Timestamp": 1704614400,
"Killer": "PlayerName:Id"
}
],
"CommandLogs": [
{
"Player": "PlayerName:Id",
"Timestamp": 1704614400,
"Command": ":h"
}
],
"ModCalls": [
{
"Caller": "PlayerName:Id",
"Moderator": "PlayerName:Id",
"Timestamp": 1704614400
}
],
"EmergencyCalls": [
{
"Team": "Police",
"Caller": 68691872,
"Players": [
789012
],
"Position": [
-654.6,
666.5
],
"StartedAt": 1774216563,
"CallNumber": 43,
"Description": "stg",
"PositionDescriptor": "sdfsdfsdf"
}
],
"Vehicles": [
{
"Name": "Redline Fire Engine",
"Owner": "Shawnyg",
"Texture": "Livery Name",
"ColorHex": "#ff4444",
"ColorName": "Super Red"
}
]
}ER:LC Server Information
Get general information about ER:LC server.
Additional fields can be included by setting query parameters to ‘true’. All query parameters are optional.
curl --request GET \
--url https://api.erlcrussia.xyz/v2/erlc/server \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.erlcrussia.xyz/v2/erlc/server"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.erlcrussia.xyz/v2/erlc/server', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.erlcrussia.xyz/v2/erlc/server",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.erlcrussia.xyz/v2/erlc/server"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.erlcrussia.xyz/v2/erlc/server")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.erlcrussia.xyz/v2/erlc/server")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"Name": "API Test",
"OwnerId": 1,
"CoOwnerIds": [
1
],
"CurrentPlayers": 1,
"MaxPlayers": 1,
"JoinKey": "APIServer",
"AccVerifiedReq": "Disabled",
"TeamBalance": true,
"Players": [
{
"Team": "Sheriff",
"Player": "PlayerName:Id",
"Callsign": "5D-550",
"Location": {
"LocationX": 1084.965,
"LocationZ": 2302.28,
"PostalCode": "218",
"StreetName": "Park Street",
"BuildingNumber": "2083"
},
"Permission": "Normal / Server Administrator / Server Owner / Server Co-Owner / Server Moderator",
"WantedStars": 0
}
],
"Staff": {
"Admins": {
"54249787": "Black_Hallow",
"77573259": "sli_ckk"
},
"Mods": {
"2": "JohnDoe",
"3": "JaneDoe"
},
"Helpers": {
"168691872": "Flat_bird"
}
},
"JoinLogs": [
{
"Join": true,
"Timestamp": 1704614400,
"Player": "PlayerName:Id"
}
],
"Queue": [
1
],
"KillLogs": [
{
"Killed": "PlayerName:Id",
"Timestamp": 1704614400,
"Killer": "PlayerName:Id"
}
],
"CommandLogs": [
{
"Player": "PlayerName:Id",
"Timestamp": 1704614400,
"Command": ":h"
}
],
"ModCalls": [
{
"Caller": "PlayerName:Id",
"Moderator": "PlayerName:Id",
"Timestamp": 1704614400
}
],
"EmergencyCalls": [
{
"Team": "Police",
"Caller": 68691872,
"Players": [
789012
],
"Position": [
-654.6,
666.5
],
"StartedAt": 1774216563,
"CallNumber": 43,
"Description": "stg",
"PositionDescriptor": "sdfsdfsdf"
}
],
"Vehicles": [
{
"Name": "Redline Fire Engine",
"Owner": "Shawnyg",
"Texture": "Livery Name",
"ColorHex": "#ff4444",
"ColorName": "Super Red"
}
]
}Authorizations
Standard API key for accessing ER:LC endpoints.
Passed in Authorization: Bearer <key> header.
REQUIRED FOR ALL ER:LC ENDPOINTS.
Query Parameters
Include player list in response.
Include staff list (Admins, Mods, Helpers) in response.
Include join/leave logs in response.
Include queue data in response.
Include kill logs in response.
Include command logs in response.
Include moderator call logs in response.
Include emergency call logs in response.
Include vehicle list in response.
Response
Successful response with server information. Additional fields included only with corresponding query parameters.
ER:LC v2 API server information.
Additional fields (Players, Staff, JoinLogs, Queue, KillLogs, CommandLogs, ModCalls, Vehicles) are included only with corresponding query parameters.
Server name.
"Moscow RolePlay"
Discord ID of server owner.
123456
Array of co-owner Discord IDs.
[789012]
Current player count on server.
50
Maximum player count.
100
Key for joining server.
"MRPServer"
Account verification requirement (Disabled/Email/Phone/ID).
"Email"
Whether team balance is enabled.
true
Player list. Included only with Players=true query parameter.
Show child attributes
Show child attributes
Server staff information.
Show child attributes
Show child attributes
Join/leave logs. Included only with JoinLogs=true query parameter.
Show child attributes
Show child attributes
Server queue. Included only with Queue=true query parameter.
[1, 2, 3]
Kill logs. Included only with KillLogs=true query parameter.
Show child attributes
Show child attributes
Command logs. Included only with CommandLogs=true query parameter.
Show child attributes
Show child attributes
Moderator call logs. Included only with ModCalls=true query parameter.
Show child attributes
Show child attributes
Emergency call logs. Included only with EmergencyCalls=true query parameter.
Show child attributes
Show child attributes
Vehicle list. Included only with Vehicles=true query parameter.
Show child attributes
Show child attributes
Was this page helpful?