Get All Webhooks
curl --request GET \
--url https://api.chainbase.online/v1/webhooks \
--header 'x-api-key: <x-api-key>'import requests
url = "https://api.chainbase.online/v1/webhooks"
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', 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",
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"
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")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chainbase.online/v1/webhooks")
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\":2,\"data\":[{\"webhook_id\":\"9748042d-0eee-4baf-b508-1c5ec8c07686\",\"filters\":[],\"webhook_name\":\"massive-logs\",\"webhook_url\":\"https://gtsfh5g3c4.hk.aircode.run/erc20transfer\",\"data_source\":\"ethereum_logs\",\"additional_headers\":[],\"created_at\":\"2023-08-20T07:14:58.872523Z\",\"updated_at\":\"2023-08-20T07:14:58.872523Z\",\"status\":0},{\"webhook_id\":\"eefbb329-4009-4372-91e5-c906fed17db1\",\"filters\":[],\"webhook_name\":\"massive-erc20-transfer\",\"webhook_url\":\"http://receive-service.chainbase-uat.svc.cluster.local:8080\",\"data_source\":\"ethereum_logs\",\"additional_headers\":[{\"name\":\"Authorization\",\"value\":\"Bearer xyz\"}],\"created_at\":\"2023-08-25T07:27:15.611135Z\",\"updated_at\":\"2023-08-25T07:27:15.611135Z\",\"status\":0}]}}""{\"code\":-1,\"msg\":\"auth verify-secret-key error\",\"data\":null}"Get All Webhooks
Get all webhooks in the account.
GET
/
webhooks
Get All Webhooks
curl --request GET \
--url https://api.chainbase.online/v1/webhooks \
--header 'x-api-key: <x-api-key>'import requests
url = "https://api.chainbase.online/v1/webhooks"
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', 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",
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"
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")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chainbase.online/v1/webhooks")
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\":2,\"data\":[{\"webhook_id\":\"9748042d-0eee-4baf-b508-1c5ec8c07686\",\"filters\":[],\"webhook_name\":\"massive-logs\",\"webhook_url\":\"https://gtsfh5g3c4.hk.aircode.run/erc20transfer\",\"data_source\":\"ethereum_logs\",\"additional_headers\":[],\"created_at\":\"2023-08-20T07:14:58.872523Z\",\"updated_at\":\"2023-08-20T07:14:58.872523Z\",\"status\":0},{\"webhook_id\":\"eefbb329-4009-4372-91e5-c906fed17db1\",\"filters\":[],\"webhook_name\":\"massive-erc20-transfer\",\"webhook_url\":\"http://receive-service.chainbase-uat.svc.cluster.local:8080\",\"data_source\":\"ethereum_logs\",\"additional_headers\":[{\"name\":\"Authorization\",\"value\":\"Bearer xyz\"}],\"created_at\":\"2023-08-25T07:27:15.611135Z\",\"updated_at\":\"2023-08-25T07:27:15.611135Z\",\"status\":0}]}}""{\"code\":-1,\"msg\":\"auth verify-secret-key error\",\"data\":null}"Headers
YOUR-API-KEY
Example:
"demo"
Query Parameters
Offset of the webhooks pagination
Limit of the webhooks pagination
Status of the webhook
Data source the webhook subscribe to