Query log events
curl --request POST \
--url https://api.fivemesh.io/v1/logs/query \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"serverId": "<string>",
"from": "<string>",
"to": "<string>",
"limit": 123,
"level": "<string>",
"eventType": "<string>",
"resource": "<string>",
"message": "<string>",
"playerId": "<string>",
"identifier": {},
"cursor": "<string>"
}
'import requests
url = "https://api.fivemesh.io/v1/logs/query"
payload = {
"serverId": "<string>",
"from": "<string>",
"to": "<string>",
"limit": 123,
"level": "<string>",
"eventType": "<string>",
"resource": "<string>",
"message": "<string>",
"playerId": "<string>",
"identifier": {},
"cursor": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
serverId: '<string>',
from: '<string>',
to: '<string>',
limit: 123,
level: '<string>',
eventType: '<string>',
resource: '<string>',
message: '<string>',
playerId: '<string>',
identifier: {},
cursor: '<string>'
})
};
fetch('https://api.fivemesh.io/v1/logs/query', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fivemesh.io/v1/logs/query",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'serverId' => '<string>',
'from' => '<string>',
'to' => '<string>',
'limit' => 123,
'level' => '<string>',
'eventType' => '<string>',
'resource' => '<string>',
'message' => '<string>',
'playerId' => '<string>',
'identifier' => [
],
'cursor' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fivemesh.io/v1/logs/query"
payload := strings.NewReader("{\n \"serverId\": \"<string>\",\n \"from\": \"<string>\",\n \"to\": \"<string>\",\n \"limit\": 123,\n \"level\": \"<string>\",\n \"eventType\": \"<string>\",\n \"resource\": \"<string>\",\n \"message\": \"<string>\",\n \"playerId\": \"<string>\",\n \"identifier\": {},\n \"cursor\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fivemesh.io/v1/logs/query")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"serverId\": \"<string>\",\n \"from\": \"<string>\",\n \"to\": \"<string>\",\n \"limit\": 123,\n \"level\": \"<string>\",\n \"eventType\": \"<string>\",\n \"resource\": \"<string>\",\n \"message\": \"<string>\",\n \"playerId\": \"<string>\",\n \"identifier\": {},\n \"cursor\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fivemesh.io/v1/logs/query")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"serverId\": \"<string>\",\n \"from\": \"<string>\",\n \"to\": \"<string>\",\n \"limit\": 123,\n \"level\": \"<string>\",\n \"eventType\": \"<string>\",\n \"resource\": \"<string>\",\n \"message\": \"<string>\",\n \"playerId\": \"<string>\",\n \"identifier\": {},\n \"cursor\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyFiveMesh Logs
Query log events
Search one server’s events within a bounded time range and paginate with a signed cursor.
POST
/
logs
/
query
Query log events
curl --request POST \
--url https://api.fivemesh.io/v1/logs/query \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"serverId": "<string>",
"from": "<string>",
"to": "<string>",
"limit": 123,
"level": "<string>",
"eventType": "<string>",
"resource": "<string>",
"message": "<string>",
"playerId": "<string>",
"identifier": {},
"cursor": "<string>"
}
'import requests
url = "https://api.fivemesh.io/v1/logs/query"
payload = {
"serverId": "<string>",
"from": "<string>",
"to": "<string>",
"limit": 123,
"level": "<string>",
"eventType": "<string>",
"resource": "<string>",
"message": "<string>",
"playerId": "<string>",
"identifier": {},
"cursor": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
serverId: '<string>',
from: '<string>',
to: '<string>',
limit: 123,
level: '<string>',
eventType: '<string>',
resource: '<string>',
message: '<string>',
playerId: '<string>',
identifier: {},
cursor: '<string>'
})
};
fetch('https://api.fivemesh.io/v1/logs/query', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fivemesh.io/v1/logs/query",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'serverId' => '<string>',
'from' => '<string>',
'to' => '<string>',
'limit' => 123,
'level' => '<string>',
'eventType' => '<string>',
'resource' => '<string>',
'message' => '<string>',
'playerId' => '<string>',
'identifier' => [
],
'cursor' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fivemesh.io/v1/logs/query"
payload := strings.NewReader("{\n \"serverId\": \"<string>\",\n \"from\": \"<string>\",\n \"to\": \"<string>\",\n \"limit\": 123,\n \"level\": \"<string>\",\n \"eventType\": \"<string>\",\n \"resource\": \"<string>\",\n \"message\": \"<string>\",\n \"playerId\": \"<string>\",\n \"identifier\": {},\n \"cursor\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fivemesh.io/v1/logs/query")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"serverId\": \"<string>\",\n \"from\": \"<string>\",\n \"to\": \"<string>\",\n \"limit\": 123,\n \"level\": \"<string>\",\n \"eventType\": \"<string>\",\n \"resource\": \"<string>\",\n \"message\": \"<string>\",\n \"playerId\": \"<string>\",\n \"identifier\": {},\n \"cursor\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fivemesh.io/v1/logs/query")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"serverId\": \"<string>\",\n \"from\": \"<string>\",\n \"to\": \"<string>\",\n \"limit\": 123,\n \"level\": \"<string>\",\n \"eventType\": \"<string>\",\n \"resource\": \"<string>\",\n \"message\": \"<string>\",\n \"playerId\": \"<string>\",\n \"identifier\": {},\n \"cursor\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyRequires
Set
This example uses a server-bound key. Include
Events use snake_case fields such as
logs:read, an eligible customer subscription and access to the connected server’s Logs source.
string
cfx.re join code. Required for a global key; optional for a server-bound key. A key bound to another server is refused.
string
required
RFC 3339 start time.
string
required
RFC 3339 end time. The range may span at most seven days and is limited by plan retention.
integer
default:"100"
1 to 100 results. Defaults to 100.
Filters
string
Optional
debug, info, warn, error or fatal filter.string
Optional event type.
string
Optional resource name.
string
Optional message search.
string
Optional player handle.
object
Exact match such as
{"owner":"player","key":"discord","value":"123"}.
Owner can be player or target.string
Optional opaque
pagination.nextCursor from the previous response.LOGS_FROM and LOGS_TO to the UTC timestamps you want to search:
curl -X POST "https://api.fivemesh.io/v1/logs/query" \
-H "Authorization: Bearer $FIVEMESH_API_KEY" \
-H "Content-Type: application/json" \
-d "{\"from\":\"$LOGS_FROM\",\"to\":\"$LOGS_TO\",\"level\":\"error\",\"limit\":100}"
serverId when using a global key.
Response and pagination
{
"success": true,
"events": [],
"pagination": {
"hasMore": false,
"nextCursor": null
},
"range": {
"from": "2026-10-01T08:00:00.000Z",
"to": "2026-10-01T14:00:00.000Z"
},
"requestId": "req_..."
}
event_id, occurred_at, event_type and player_identifiers.
When hasMore is true, keep the original request’s from, to, server and filters unchanged and send nextCursor as cursor. The returned range describes the effective search window after retention is applied; it may be narrower than the original request. Start a new search when the cursor expires or the filters change.
Responses are private and not cached. Rate limits and concurrent-search limits apply; honor Retry-After on RATE_LIMITED responses.
Related pages
Was this page helpful?