/webhooks/rest/v1/webhooks/test-filter REST API Endpoint
Body Parameters
network
string
REQUIRED
Loading...
block
string
REQUIRED
Loading...
filter_function
string
REQUIRED
Loading...
Returns
filtered_data
object
Loading...
block
string
Loading...
network
string
Loading...
Request
curl -X POST \
"https://api.quicknode.com/webhooks/rest/v1/webhooks/test_filter" \
-H "accept: application/json" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d $'{
"network": "ethereum-mainnet",
"block": "17811625",
"filter_function": "ZnVuY3Rpb24gbWFpbihwYXlsb2FkKSB7CiAgY29uc3QgewogICAgZGF0YSwKICAgIG1ldGFkYXRhLAogIH0gPSBwYXlsb2FkOwoKICAvLyBsb2dpYyB0byBmaWx0ZXIgZGF0YQoKICByZXR1cm4gcGF5bG9hZDsKfQ=="
}' const axios = require('axios')
const url = 'https://api.quicknode.com/webhooks/rest/v1/webhooks/test_filter'
const payload = {
network: 'ethereum-mainnet',
block: '17811625',
filter_function:
'ZnVuY3Rpb24gbWFpbihwYXlsb2FkKSB7CiAgY29uc3QgewogICAgZGF0YSwKICAgIG1ldGFkYXRhLAogIH0gPSBwYXlsb2FkOwoKICAvLyBsb2dpYyB0byBmaWx0ZXIgZGF0YQoKICByZXR1cm4gcGF5bG9hZDsKfQ==',
}
const headers = {
accept: 'application/json',
'Content-Type': 'application/json',
'x-api-key': 'YOUR_API_KEY', // Replace with your actual API key
}
axios
.post(url, payload, { headers })
.then(response => {
console.log(response.data)
})
.catch(error => {
console.error('Error:', error.response?.data || error.message)
})
import requests
url = "https://api.quicknode.com/webhooks/rest/v1/webhooks/test_filter"
payload = {
"network": "ethereum-mainnet",
"block": "17811625",
"filter_function": "ZnVuY3Rpb24gbWFpbihwYXlsb2FkKSB7CiAgY29uc3QgewogICAgZGF0YSwKICAgIG1ldGFkYXRhLAogIH0gPSBwYXlsb2FkOwoKICAvLyBsb2dpYyB0byBmaWx0ZXIgZGF0YQoKICByZXR1cm4gcGF5bG9hZDsKfQ=="
}
headers = {
"accept": "application/json",
"Content-Type": "application/json",
"x-api-key": "YOUR_API_KEY" # Replace with your actual API key
}
response = requests.post(url, headers=headers, json=payload)
print(response.text) require "uri"
require "net/http"
require "json"
# Set up the URL for the request
url = URI("https://api.quicknode.com/webhooks/rest/v1/webhooks/test_filter")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["Content-Type"] = "application/json"
request["x-api-key"] = "YOUR_API_KEY" # Replace with your actual API key
request.body = {
"network" => "ethereum-mainnet",
"block" => "17811625",
"filter_function" => "ZnVuY3Rpb24gbWFpbihwYXlsb2FkKSB7CiAgY29uc3QgewogICAgZGF0YSwKICAgIG1ldGFkYXRhLAogIH0gPSBwYXlsb2FkOwoKICAvLyBsb2dpYyB0byBmaWx0ZXIgZGF0YQoKICByZXR1cm4gcGF5bG9hZDsKfQ=="
}.to_json
response = https.request(request)
puts response.body Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free