Search leaves
curl --request GET \
--url https://core.ermbot.xyz/api/v1/leaves/search \
--header 'Authorization: <api-key>' \
--header 'Guild: <api-key>'import requests
url = "https://core.ermbot.xyz/api/v1/leaves/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/leaves/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/leaves/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/leaves/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/leaves/search")
.header("Authorization", "<api-key>")
.header("Guild", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://core.ermbot.xyz/api/v1/leaves/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,
"reason": "<string>",
"message_id": 123,
"type_": "<string>",
"guild": 123,
"expiry": 123,
"expired": true,
"accepted": true,
"denied": true,
"voided": true
}
],
"pagination": {
"next_cursor": 123,
"limit": 123,
"has_more": true
}
}Leaves
Search Leaves
GET
/
api
/
v1
/
leaves
/
search
Search leaves
curl --request GET \
--url https://core.ermbot.xyz/api/v1/leaves/search \
--header 'Authorization: <api-key>' \
--header 'Guild: <api-key>'import requests
url = "https://core.ermbot.xyz/api/v1/leaves/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/leaves/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/leaves/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/leaves/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/leaves/search")
.header("Authorization", "<api-key>")
.header("Guild", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://core.ermbot.xyz/api/v1/leaves/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,
"reason": "<string>",
"message_id": 123,
"type_": "<string>",
"guild": 123,
"expiry": 123,
"expired": true,
"accepted": true,
"denied": true,
"voided": true
}
],
"pagination": {
"next_cursor": 123,
"limit": 123,
"has_more": true
}
}Query Parameters
⌘I