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

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

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', 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",
  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"

	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")
  .header("Authorization", "<api-key>")
  .header("Guild", "<api-key>")
  .asString();
require 'uri'
require 'net/http'

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

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
  }
}
Moderations are paginated using Discord snowflakes for guaranteed sequential ordering.

Cursor Format

  • Type: Discord Snowflake (int64)
  • Example: 1090340521350131742
  • Ordering: Descending (newest first)

Authorizations

Authorization
string
header
required
Guild
string
header
required

Query Parameters

after
integer<int64>
limit
integer

Response

200 - application/json

List of moderations

data
object[]
pagination
object