Skip to main content
GET
/
api
/
v1
/
moderations
/
search
Search moderations
curl --request GET \
  --url https://core.ermbot.xyz/api/v1/moderations/search \
  --header 'Authorization: <api-key>' \
  --header 'Guild: <api-key>'
import requests

url = "https://core.ermbot.xyz/api/v1/moderations/search"

headers = {
"Authorization": "<api-key>",
"Guild": "<api-key>"
}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: '<api-key>', Guild: '<api-key>'}};

fetch('https://core.ermbot.xyz/api/v1/moderations/search', 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://core.ermbot.xyz/api/v1/moderations/search",
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: <api-key>",
"Guild: <api-key>"
],
]);

$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://core.ermbot.xyz/api/v1/moderations/search"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Guild", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://core.ermbot.xyz/api/v1/moderations/search")
.header("Authorization", "<api-key>")
.header("Guild", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://core.ermbot.xyz/api/v1/moderations/search")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
request["Guild"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "data": [
    {
      "id": {
        "$oid": "<string>"
      },
      "user_id": 123,
      "username": "<string>",
      "guild": 123,
      "type_": "<string>",
      "reason": "<string>",
      "moderator": "<string>",
      "moderator_id": 123,
      "epoch": 123,
      "until_epoch": 123
    }
  ],
  "pagination": {
    "next_cursor": 123,
    "limit": 123,
    "has_more": true
  }
}

Authorizations

Authorization
string
header
required
Guild
string
header
required

Query Parameters

snowflake
integer<int64>
username
string
user_id
integer<int64>
type
string
reason
string
moderator
string
moderator_id
integer<int64>
epoch
integer<int64>
until_epoch
integer<int64>
after
integer<int64>
limit
integer

Response

200 - application/json

Search results

data
object[]
pagination
object