Get webhook metrics
Get webhook metrics by webhook id and metric name
GET
/
webhooks
/
{webhookId}
/
metrics
/
{metricName}
TypeScript
const response: Promise<FireblocksResponse<WebhookMetric>> = fireblocks.webhooksV2.getMetrics(webhooksV2ApiGetMetricsRequest);CompletableFuture<ApiResponse<WebhookMetric>> response = fireblocks.webhooksV2().getMetrics(webhookId, metricName);response = fireblocks.webhooks_v2.get_metrics(webhook_id, metric_name);curl --request GET \
--url https://api.fireblocks.io/v1/webhooks/{webhookId}/metrics/{metricName}const options = {method: 'GET'};
fetch('https://api.fireblocks.io/v1/webhooks/{webhookId}/metrics/{metricName}', 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.fireblocks.io/v1/webhooks/{webhookId}/metrics/{metricName}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.fireblocks.io/v1/webhooks/{webhookId}/metrics/{metricName}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.fireblocks.io/v1/webhooks/{webhookId}/metrics/{metricName}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"value": 55
}{
"message": "<string>",
"code": 123
}Path Parameters
Example:
"44fcead0-7053-4831-a53a-df7fb90d440f"
Name of the metric to retrieve
Available options:
LAST_ACTIVE_HOUR_ERROR_RATE Example:
"LAST_ACTIVE_HOUR_ERROR_RATE"
Response
Webhook metrics
The value of the metric
Example:
55
Was this page helpful?
⌘I
TypeScript
const response: Promise<FireblocksResponse<WebhookMetric>> = fireblocks.webhooksV2.getMetrics(webhooksV2ApiGetMetricsRequest);CompletableFuture<ApiResponse<WebhookMetric>> response = fireblocks.webhooksV2().getMetrics(webhookId, metricName);response = fireblocks.webhooks_v2.get_metrics(webhook_id, metric_name);curl --request GET \
--url https://api.fireblocks.io/v1/webhooks/{webhookId}/metrics/{metricName}const options = {method: 'GET'};
fetch('https://api.fireblocks.io/v1/webhooks/{webhookId}/metrics/{metricName}', 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.fireblocks.io/v1/webhooks/{webhookId}/metrics/{metricName}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.fireblocks.io/v1/webhooks/{webhookId}/metrics/{metricName}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.fireblocks.io/v1/webhooks/{webhookId}/metrics/{metricName}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"value": 55
}{
"message": "<string>",
"code": 123
}