📚API Reference
API Authentication
All requests to the API must have a valid Server-Key header provided.
API Reference
PRC moderators and the API development team are unable to provide support with coding or integrating the API into third party solutions.
POST endpoints have higher rate limits, ensure you are reading and respecting all rate limit headers!
REQUIRED ON ALL REQUESTS.
The command to be executed
:h Hey everyone!Command executed successfully
No content
Bad request
Unauthorized
The private server has no players in it
Problem communicating with Roblox
POST /v1/server/command HTTP/1.1
Host: api.policeroleplay.community
server-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 30
{
"command": ":h Hey everyone!"
}No content
REQUIRED ON ALL REQUESTS.
Server status data
Unauthorized
GET /v1/server HTTP/1.1
Host: api.policeroleplay.community
server-key: YOUR_API_KEY
Accept: */*
{
"Name": "API Test",
"OwnerId": 1,
"CoOwnerIds": [
1
],
"CurrentPlayers": 1,
"MaxPlayers": 1,
"JoinKey": "APIServer",
"AccVerifiedReq": "Disabled / Email / Phone/ID",
"TeamBalance": true
}REQUIRED ON ALL REQUESTS.
Players in server
Unauthorized
GET /v1/server/players HTTP/1.1
Host: api.policeroleplay.community
server-key: YOUR_API_KEY
Accept: */*
[
{
"Player": "PlayerName:Id",
"Permission": "Normal / Server Administrator / Server Owner / Server Moderator",
"Callsign": "The player's callsign - only available if the player is on a non-civilian team",
"Team": "The player's team "
}
]REQUIRED ON ALL REQUESTS.
Join logs data
Unauthorized
GET /v1/server/joinlogs HTTP/1.1
Host: api.policeroleplay.community
server-key: YOUR_API_KEY
Accept: */*
[
{
"Join": true,
"Timestamp": 1704614400,
"Player": "PlayerName:Id"
}
]REQUIRED ON ALL REQUESTS.
Players in queue (by Roblox id)
Unauthorized
GET /v1/server/queue HTTP/1.1
Host: api.policeroleplay.community
server-key: YOUR_API_KEY
Accept: */*
[
1
]REQUIRED ON ALL REQUESTS.
Kill logs data
Unauthorized
GET /v1/server/killlogs HTTP/1.1
Host: api.policeroleplay.community
server-key: YOUR_API_KEY
Accept: */*
[
{
"Killed": "PlayerName:Id",
"Timestamp": 1704614400,
"Killer": "PlayerName:Id"
}
]REQUIRED ON ALL REQUESTS.
Command logs data
Unauthorized
GET /v1/server/commandlogs HTTP/1.1
Host: api.policeroleplay.community
server-key: YOUR_API_KEY
Accept: */*
[
{
"Player": "PlayerName:Id",
"Timestamp": 1704614400,
"Command": ":h"
}
]REQUIRED ON ALL REQUESTS.
Moderator call logs data. 'Moderator' is only sent if a mod has responded to the call.
Unauthorized
GET /v1/server/modcalls HTTP/1.1
Host: api.policeroleplay.community
server-key: YOUR_API_KEY
Accept: */*
[
{
"Caller": "PlayerName:Id",
"Moderator": "PlayerName:Id",
"Timestamp": 1704614400
}
]REQUIRED ON ALL REQUESTS.
Vehicles in the server
Unauthorized
GET /v1/server/vehicles HTTP/1.1
Host: api.policeroleplay.community
server-key: YOUR_API_KEY
Accept: */*
[
{
"Texture": "Standard",
"Name": "2019 Falcon Interceptor Utility",
"Owner": "flat_bird"
}
]REQUIRED ON ALL REQUESTS.
Server Staff
Unauthorized
GET /v1/server/staff HTTP/1.1
Host: api.policeroleplay.community
server-key: YOUR_API_KEY
Accept: */*
{
"CoOwners": [
1
],
"Admins": {
"54249787": "Black_Hallow",
"77573259": "sli_ckk"
},
"Mods": {
"2": "JohnDoe",
"3": "JaneDoe"
}
}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