Get Webhook
curl --request GET \
--url https://api.chainbase.online/v1/webhooks/{webhook_id} \
--header 'x-api-key: <x-api-key>'import requests
url = "https://api.chainbase.online/v1/webhooks/{webhook_id}"
headers = {"x-api-key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
fetch('https://api.chainbase.online/v1/webhooks/{webhook_id}', 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://api.chainbase.online/v1/webhooks/{webhook_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <x-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://api.chainbase.online/v1/webhooks/{webhook_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<x-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://api.chainbase.online/v1/webhooks/{webhook_id}")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chainbase.online/v1/webhooks/{webhook_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body"{\"code\":0,\"msg\":\"ok\",\"data\":{\"total\":1,\"data\":[{\"webhook_id\":\"cebcd999-882c-4279-ab60-10e85dfd8610\",\"filters\":[{\"field\":\"contract_address\",\"values\":[\"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\",\"0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599\",\"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\"0xdAC17F958D2ee523a2206206994597C13D831ec7\"]}],\"webhook_name\":\"massive-erc20-transfer\",\"webhook_url\":\"https://gtsfh5g3c4.hk.aircode.run/erc20transfer\",\"data_source\":\"polygon_logs\",\"additional_headers\":[{\"name\":\"Authorization\",\"value\":\"Bearer xyz\"}],\"created_at\":\"2023-08-28T08:58:31.529726Z\",\"updated_at\":\"2023-08-28T09:00:19.129449Z\",\"status\":\"deactivated\"}]}}""{\"code\":-1,\"msg\":\"internal error:sql: no rows in result set\",\"data\":[]}"Get Webhook
Get specific webhook info
GET
/
webhooks
/
{webhook_id}
Get Webhook
curl --request GET \
--url https://api.chainbase.online/v1/webhooks/{webhook_id} \
--header 'x-api-key: <x-api-key>'import requests
url = "https://api.chainbase.online/v1/webhooks/{webhook_id}"
headers = {"x-api-key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
fetch('https://api.chainbase.online/v1/webhooks/{webhook_id}', 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://api.chainbase.online/v1/webhooks/{webhook_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <x-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://api.chainbase.online/v1/webhooks/{webhook_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<x-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://api.chainbase.online/v1/webhooks/{webhook_id}")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chainbase.online/v1/webhooks/{webhook_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body"{\"code\":0,\"msg\":\"ok\",\"data\":{\"total\":1,\"data\":[{\"webhook_id\":\"cebcd999-882c-4279-ab60-10e85dfd8610\",\"filters\":[{\"field\":\"contract_address\",\"values\":[\"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\",\"0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599\",\"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\"0xdAC17F958D2ee523a2206206994597C13D831ec7\"]}],\"webhook_name\":\"massive-erc20-transfer\",\"webhook_url\":\"https://gtsfh5g3c4.hk.aircode.run/erc20transfer\",\"data_source\":\"polygon_logs\",\"additional_headers\":[{\"name\":\"Authorization\",\"value\":\"Bearer xyz\"}],\"created_at\":\"2023-08-28T08:58:31.529726Z\",\"updated_at\":\"2023-08-28T09:00:19.129449Z\",\"status\":\"deactivated\"}]}}""{\"code\":-1,\"msg\":\"internal error:sql: no rows in result set\",\"data\":[]}"