πŸš€v2 API Reference

API Authentication

All requests to the API must have a valid Server-Key header provided.

circle-info

Not sure where to find your server key?

Join your private server, open the settings, and search for "API key" under the ER:LC API header.

What's new in API v2?

PRC API v2 is intended to provide a more consistent and simpler request model for developers. In addition, it provides highly requested data, such as player locations and vehicle colours!

API v1 will continue to operate, without major changes, until further notice.

Endpoint Information

Fetch server information

get

Returns server status data. Additional fields can be included by setting query parameters to 'true'. All query parameters are optional.

Authorizations
server-keystringRequired

REQUIRED ON ALL REQUESTS.

Query parameters
PlayersbooleanOptional

Include player list in response

Example: true
StaffbooleanOptional

Include staff list (Admins, Mods, Helpers) in response

Example: true
JoinLogsbooleanOptional

Include join logs in response

Example: true
QueuebooleanOptional

Include queue data in response

Example: true
KillLogsbooleanOptional

Include kill logs in response

Example: true
CommandLogsbooleanOptional

Include command logs in response

Example: true
ModCallsbooleanOptional

Include moderator call logs in response

Example: true
EmergencyCallsbooleanOptional

Include emergency call logs in response

Example: true
VehiclesbooleanOptional

Include vehicle list in response

Example: true
Responses
chevron-right
200

Requested data. Optional fields only included when query=true.

application/json
NamestringRequiredExample: API Test
OwnerIdintegerRequired
CoOwnerIdsinteger[]Required
CurrentPlayersintegerRequired
MaxPlayersintegerRequired
JoinKeystringRequiredExample: APIServer
AccVerifiedReqstringRequiredExample: Disabled / Email / Phone/ID
TeamBalancebooleanRequired
Queueinteger[]Optional

Only included when Queue=true query parameter is provided

get
/v2/server

Run a command as a player named "virtual server management"

post
Authorizations
server-keystringRequired

REQUIRED ON ALL REQUESTS.

Body
commandstringOptional

The command to be executed

Example: :h Hey everyone!
Responses
chevron-right
200

Command executed successfully

application/json
messagestringOptional

A message explaining the status of your command

Example: Success
post
/v2/server/command

Resetting a global API key:

If you were issued a global API key, you can reset it by sending a POST to /v1/api-key/reset with the "authorization" header set as your API key. This will send a new key which can only be viewed once. If you lose the key, the person who requested the API key must contact PRC.

Last updated