curl --request GET \
--url https://quark.bot/api/servers/{guild_id}/logs \
--header 'Authorization: Bearer <token>'import requests
url = "https://quark.bot/api/servers/{guild_id}/logs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://quark.bot/api/servers/{guild_id}/logs', 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://quark.bot/api/servers/{guild_id}/logs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://quark.bot/api/servers/{guild_id}/logs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://quark.bot/api/servers/{guild_id}/logs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://quark.bot/api/servers/{guild_id}/logs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"entries": [
{
"id": "<string>",
"type": 123,
"timestamp": 123,
"executor": {
"id": "<string>",
"name": "<string>"
},
"target": {
"id": "<string>",
"name": "<string>"
},
"channel": {
"id": "<string>",
"name": "<string>"
},
"role": "<string>",
"name": "<string>",
"reason": "<string>",
"count": 123,
"content": "<string>",
"contentAfter": "<string>",
"messages": [
{}
],
"messagesTruncated": 123,
"emoji": {},
"action": "<string>",
"value": "<string>",
"delivery": {
"status": "delivered",
"reason": "<string>",
"channelId": "<string>",
"messageId": "<string>"
}
}
],
"total": 123,
"retentionMs": 123,
"walled": true,
"cursor": "<string>",
"categoryCounts": {}
}{}{}{}{
"error": "<string>"
}{
"error": "<string>"
}List logs
Returns the server’s logs, newest first. This is the same data the log viewer shows.
How far back you can read depends on the server’s plan: the last hour on the free plan and Pro Lite, 30 days on Quark Pro. A request that reaches further back is cut to that window and walled is true.
curl --request GET \
--url https://quark.bot/api/servers/{guild_id}/logs \
--header 'Authorization: Bearer <token>'import requests
url = "https://quark.bot/api/servers/{guild_id}/logs"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://quark.bot/api/servers/{guild_id}/logs', 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://quark.bot/api/servers/{guild_id}/logs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://quark.bot/api/servers/{guild_id}/logs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://quark.bot/api/servers/{guild_id}/logs")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://quark.bot/api/servers/{guild_id}/logs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"entries": [
{
"id": "<string>",
"type": 123,
"timestamp": 123,
"executor": {
"id": "<string>",
"name": "<string>"
},
"target": {
"id": "<string>",
"name": "<string>"
},
"channel": {
"id": "<string>",
"name": "<string>"
},
"role": "<string>",
"name": "<string>",
"reason": "<string>",
"count": 123,
"content": "<string>",
"contentAfter": "<string>",
"messages": [
{}
],
"messagesTruncated": 123,
"emoji": {},
"action": "<string>",
"value": "<string>",
"delivery": {
"status": "delivered",
"reason": "<string>",
"channelId": "<string>",
"messageId": "<string>"
}
}
],
"total": 123,
"retentionMs": 123,
"walled": true,
"cursor": "<string>",
"categoryCounts": {}
}{}{}{}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The server's ID. Must be the server the token was created for.
^\d{17,20}$"301655085954367490"
Query Parameters
Text to search for. Matches whole words in message content, and parts of names, channels, roles and reasons.
200Only entries after this time, in milliseconds since the Unix epoch. Limited to what the server's plan allows.
Only entries before this time, in milliseconds since the Unix epoch.
One or more categories. Repeat the parameter for each.
categoryMembers, categoryText, categoryVoice, categoryServer, categoryRoles, categoryChannels, categoryQuark, categoryActions, categoryModlog One or more log type IDs. Repeat the parameter for each.
A channel ID.
A user ID.
Whether member did the action, had it done to them, or either.
executor, target, either A role name, or part of one.
100Entries per page.
1 <= x <= 200The cursor from the previous page.
Set to pro to act on the Quark Pro bot's configuration. Leave out for the main Quark bot.
pro Response
A page of logs.
Show child attributes
Show child attributes
How many entries match the filters from this page onwards. On the first page it is the total number of matches.
How far back this server's plan lets you read, in milliseconds.
True if the request asked for more history than the plan allows.
Pass this as cursor to get the next page. Null when there are no more.
Number of entries in each category that match the other filters. The category filter itself is not applied.
Show child attributes
Show child attributes
Was this page helpful?

