ERMDocs

API Endpoints

Available ERM API endpoints for shifts, punishments, departments, and guild info.

All endpoints require a valid UniqueToken header. See Authentication for setup.

Base URL: https://api.ermdev.xyz


Guild

Get Guild Info

GET /v1/guild

Returns basic information about the Discord server linked to the API key.

Response:

{
  "success": true,
  "data": {
    "guild_id": "123456789012345678",
    "name": "My ER:LC Community",
    "member_count": 842,
    "erm_version": "2.5.1"
  }
}

Shifts

Get Active Shifts

GET /v1/guild/shifts

Returns all currently active (on-duty) shifts.

Response:

{
  "success": true,
  "data": [
    {
      "user_id": "123456789012345678",
      "username": "JohnDoe",
      "shift_type": "Patrol",
      "started_at": "2024-01-15T14:30:00Z",
      "elapsed_seconds": 3600
    }
  ]
}

Get Shift History

GET /v1/guild/shifts/history

Query parameters:

ParameterTypeDescription
user_idstringFilter by Discord user ID
shift_typestringFilter by shift type name
limitintegerMax results (default 50, max 200)
afterISO8601Only shifts started after this date
beforeISO8601Only shifts started before this date

Punishments

Get Punishments

GET /v1/guild/punishments

Query parameters:

ParameterTypeDescription
roblox_usernamestringFilter by Roblox username
typestringFilter by punishment type
limitintegerMax results (default 50, max 200)

Response:

{
  "success": true,
  "data": [
    {
      "id": "abc123",
      "roblox_username": "BadPlayer123",
      "type": "Ban",
      "reason": "RDM",
      "issued_by": "StaffMember",
      "issued_at": "2024-01-15T12:00:00Z"
    }
  ]
}

Get Punishment by ID

GET /v1/guild/punishments/:id

Departments

List Departments

GET /v1/guild/departments

Returns all departments configured for the server.

Get Department Members

GET /v1/guild/departments/:department_id/members

Returns all members on the department roster with their rank and shift totals.


Activity

Get Activity Report

GET /v1/guild/activity

Query parameters:

ParameterTypeDescription
startISO8601Start of the reporting period
endISO8601End of the reporting period
department_idstringFilter to a specific department

Returns total shift hours per member for the specified period.

On this page