Logs
Getting started with logs
Send structured events from your game server, then search them in the dashboard.
Send one or many events
Use a logs key (cnf_log_) against POST /api/v1/logs. Body can be a single object or an array.
curl
curl -X POST https://app.back2rp.org/api/v1/logs \
-H "Authorization: Bearer cnf_log_your_key" \
-H "Content-Type: application/json" \
-d '[{
"name": "player-kills",
"level": "info",
"message": "Player eliminated",
"playerSource": "32",
"metadata": { "victim": "18", "weapon": "WEAPON_PISTOL" }
}]'Useful fields
- name / file / dataset — groups events into a log file in the dashboard.
- level —
debug,info,warn,error. - playerSource — player id / source for filtering.
- metadata — any JSON object you want to keep searchable later.
Search tips
Dashboard explore supports filter-style queries such as:
filters
level:error
player:12
resource:ox_inventory
"vehicle spawned"player:12is a valid alias forplayerSource(alsosrc:).- Unknown keys such as
resource:ox_inventoryare treated as metadata filters (match events where that metadata field equals the value). - Free text without a key (or quoted phrases) searches the message / text field.
FiveM
Prefer the official FiveM resource so you are not hand-rolling HTTP on every event. When your naming is solid, read best practices.
