Los Angeles Roleplay Server API Documentation

https://api.larpsr.xyz

Game Data

GET /api/players Get all online players

Response

[
  {
    "Player": "Username:12345678",
    "Team": "Civilian",
    "Callsign": null
  }
]
GET /api/vehicles Get all spawned vehicles

Response

[
  {
    "Owner": "Username:12345678",
    "Vehicle": "Ferrari",
    "Plate": "ABC123"
  }
]
GET /api/all-logs Get all game logs (joins, kills, modcalls, commands)

Response

{
  "joinlogs": [...],
  "killlogs": [...],
  "modcalllogs": [...],
  "commandlogs": [...]
}
GET /api/detections Get latest bot detections

Response

[
  {
    "type": "RDM",
    "player": "Username",
    "timestamp": 1705823400
  }
]

Roblox Data

GET /api/roblox-user-info/:userId Get detailed Roblox user info

Path Parameters

NameTypeDescription
userId number Roblox user ID

Response

{
  "name": "Username",
  "displayName": "Display Name",
  "blurb": "Bio text...",
  "isPremium": false,
  "accountAge": 1234,
  "friendCount": 50,
  "presence": "Offline"
}

Verification

POST /api/start-unverified-scan Start scanning for unverified players

Response (202)

{ "message": "Scan started." }

Response (409 - Already Running)

{ "message": "A scan is already in progress." }
GET /api/unverified-scan-status Get current scan progress and results

Response

{
  "isRunning": false,
  "progress": 25,
  "total": 25,
  "results": {
    "unverified": [...],
    "unknown": [...]
  },
  "startedAt": 1705823400000
}

Commands

POST /api/execute-command Execute an in-game server command

Request Body

{
  "command": ":kick Username Reason"
}

Response (200)

{ "message": "Command executed." }

Roleplay System

GET /rp-requests Get all pending roleplay requests

Response

[
  {
    "id": "abc123",
    "type": "Robbery",
    "user": {
      "discordId": "123456789",
      "username": "User#0001"
    },
    "createdAt": 1705823400000
  }
]
POST /rp-approve Approve a roleplay request

Request Body

{
  "requestId": "abc123",
  "staffUser": {
    "username": "StaffMember",
    "role": "Moderator"
  }
}
POST /rp-decline Decline a roleplay request

Request Body

{
  "requestId": "abc123",
  "staffUser": {
    "username": "StaffMember",
    "role": "Moderator"
  },
  "reason": "Not enough details provided"
}
4