Get Webhooks
This endpoint allows you to retrieve a list of all the webhooks created within your AML Watcher account. This is a valuable feature that provides you with an overview of all active webhooks and their details.
Endpoint: https://api.amlwatcher.com/api/webhook
Method: GET
- HTTP
- Javascript
- PHP
- Python
- Ruby
- Java
- cURL
- C#
- Go
Sample Request
GET /api/webhook HTTP/1.1
Host: api.amlwatcher.com
Authorization: Bearer Token
Sample Request
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer Token");
var requestOptions = {
method: "GET",
headers: myHeaders,
redirect: "follow",
};
fetch("https://api.amlwatcher.com/api/webhook", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log("error", error));
Sample Request
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.amlwatcher.com/api/webhook',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer Token'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Sample Request
import requests
url = "https://api.amlwatcher.com/api/webhook"
payload = ""
headers = {
'Authorization': 'Bearer Token'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
Sample Request
require "uri"
require "net/http"
url = URI("https://api.amlwatcher.com/api/webhook")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer Token"
response = https.request(request)
puts response.read_body
Sample Request
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class Main {
public static void main(String[] args) {
try {
// URL to the API endpoint
URL url = new URL("https://api.amlwatcher.com/api/webhook");
// Establishing the connection
HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection();
// Setting the request method to GET
httpURLConnection.setRequestMethod("GET");
// Setting the headers
httpURLConnection.setRequestProperty("Authorization", "Bearer Token");
// Getting the response code
int responseCode = httpURLConnection.getResponseCode();
System.out.println("Response Code: " + responseCode);
// Reading the response
BufferedReader in = new BufferedReader(new InputStreamReader(httpURLConnection.getInputStream()));
String inputLine;
StringBuilder response = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
// Printing the response
System.out.println(response.toString());
// Closing the connection
httpURLConnection.disconnect();
} catch (Exception e) {
e.printStackTrace();
}
}
}
Sample Request
curl --location --request GET 'https://api.amlwatcher.com/api/webhook'
--header 'Authorization: Bearer Token'
Sample Request
using RestSharp; // Import RestSharp namespace
using System;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
var url = "https://api.amlwatcher.com/api/webhook";
var options = new RestClientOptions(url)
{
ThrowOnAnyError = true,
Timeout = TimeSpan.FromMilliseconds(-1)
};
var client = new RestClient(options);
var request = new RestRequest(url, Method.Get);
request.AddHeader("Authorization", "Bearer Token");
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
}
}
Sample Request
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.amlwatcher.com/api/webhook"
method := "GET"
payload := strings.NewReader(``)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "Bearer Token")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Response
Parameters | Description |
---|---|
error | Whenever there is an error in your request, this param will have details of that error; otherwise it’ll remain empty. |
status | The status field is set to either “SUCCESS” or “FAIL”, indicating that the API request resulted in a successful or failure/error condition respectively. |
data | An array/object containing the actual response elements. |
Sample Response
{
"data": [
{
"_id": {
"$oid": "653f715f2cd970a571dcd"
},
"created_at": {
"$date": 16986602294
},
"endpoint": "https://webhook.site/26184bd6-6d7c-429a-9131-fe009ee74e",
"name": "Test Webhook",
"organization_id": {
"$oid": "6512d7134bb9cd92fe394"
},
"type": "monitored_status_updated",
"updated_at": {
"$date": 169866094
},
"user_id": {
"$oid": "6512d715dadd1b87911a6"
}
}
],
"error": false,
"status": "SUCCESS"
}