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/guildReturns 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/shiftsReturns 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/historyQuery parameters:
| Parameter | Type | Description |
|---|---|---|
user_id | string | Filter by Discord user ID |
shift_type | string | Filter by shift type name |
limit | integer | Max results (default 50, max 200) |
after | ISO8601 | Only shifts started after this date |
before | ISO8601 | Only shifts started before this date |
Punishments
Get Punishments
GET /v1/guild/punishmentsQuery parameters:
| Parameter | Type | Description |
|---|---|---|
roblox_username | string | Filter by Roblox username |
type | string | Filter by punishment type |
limit | integer | Max 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/:idDepartments
List Departments
GET /v1/guild/departmentsReturns all departments configured for the server.
Get Department Members
GET /v1/guild/departments/:department_id/membersReturns all members on the department roster with their rank and shift totals.
Activity
Get Activity Report
GET /v1/guild/activityQuery parameters:
| Parameter | Type | Description |
|---|---|---|
start | ISO8601 | Start of the reporting period |
end | ISO8601 | End of the reporting period |
department_id | string | Filter to a specific department |
Returns total shift hours per member for the specified period.