get rules of whitelist.
curl --request GET \
--url https://apix.us.amity.co/api/v2/whitelist/records \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--header 'X-API-Key: <api-key>'import requests
url = "https://apix.us.amity.co/api/v2/whitelist/records"
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>",
"X-API-Key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
Authorization: '<authorization>',
'Content-Type': '<content-type>',
'X-API-Key': '<api-key>'
}
};
fetch('https://apix.us.amity.co/api/v2/whitelist/records', 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://apix.us.amity.co/api/v2/whitelist/records",
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: <authorization>",
"Content-Type: <content-type>",
"X-API-Key: <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://apix.us.amity.co/api/v2/whitelist/records"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("X-API-Key", "<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://apix.us.amity.co/api/v2/whitelist/records")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apix.us.amity.co/api/v2/whitelist/records")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = '<content-type>'
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "<string>",
"data": {
"results": [
{
"regex": "<string>",
"ruleId": "<string>",
"isEnabled": true,
"isDeleted": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}
}{
"status": "error",
"code": 404,
"message": "Resource Not Found."
}{
"status": "error",
"code": 500,
"message": "Unexpected error"
}Moderation
get rules of whitelist.
Get rules of whitelist.
GET
/
api
/
v2
/
whitelist
/
records
get rules of whitelist.
curl --request GET \
--url https://apix.us.amity.co/api/v2/whitelist/records \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--header 'X-API-Key: <api-key>'import requests
url = "https://apix.us.amity.co/api/v2/whitelist/records"
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>",
"X-API-Key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
Authorization: '<authorization>',
'Content-Type': '<content-type>',
'X-API-Key': '<api-key>'
}
};
fetch('https://apix.us.amity.co/api/v2/whitelist/records', 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://apix.us.amity.co/api/v2/whitelist/records",
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: <authorization>",
"Content-Type: <content-type>",
"X-API-Key: <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://apix.us.amity.co/api/v2/whitelist/records"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("X-API-Key", "<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://apix.us.amity.co/api/v2/whitelist/records")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apix.us.amity.co/api/v2/whitelist/records")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = '<content-type>'
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "<string>",
"data": {
"results": [
{
"regex": "<string>",
"ruleId": "<string>",
"isEnabled": true,
"isDeleted": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}
}{
"status": "error",
"code": 404,
"message": "Resource Not Found."
}{
"status": "error",
"code": 500,
"message": "Unexpected error"
}⌘I