curl --request GET \
--url https://api.catenatelematics.com/v2/notifications/webhooks/{webhook_id}/metrics \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.catenatelematics.com/v2/notifications/webhooks/{webhook_id}/metrics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.catenatelematics.com/v2/notifications/webhooks/{webhook_id}/metrics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.catenatelematics.com/v2/notifications/webhooks/{webhook_id}/metrics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.catenatelematics.com/v2/notifications/webhooks/{webhook_id}/metrics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.get("https://api.catenatelematics.com/v2/notifications/webhooks/{webhook_id}/metrics")
.header("Authorization", "Bearer <token>")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.catenatelematics.com/v2/notifications/webhooks/{webhook_id}/metrics");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.catenatelematics.com/v2/notifications/webhooks/{webhook_id}/metrics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"avg_response_time_ms": {
"14d": 158,
"24h": 160,
"6h": 150,
"7d": 155
},
"dlq_count": 5,
"ewma_success_rate": 0.98,
"http_attempts": {
"14d": 6500,
"24h": 420,
"6h": 105,
"7d": 3000
},
"http_failure_attempts": {
"14d": 500,
"24h": 20,
"6h": 5,
"7d": 200
},
"http_success_attempts": {
"14d": 6000,
"24h": 400,
"6h": 100,
"7d": 2800
},
"message_count": {
"14d": 6000,
"24h": 400,
"6h": 100,
"7d": 2800
},
"message_success_count": {
"14d": 5800,
"24h": 390,
"6h": 98,
"7d": 2700
},
"success_rate": {
"14d": 96,
"24h": 97,
"6h": 98,
"7d": 96
},
"webhook_id": "123e4567-e89b-12d3-a456-426614174000"
}{
"code": 400,
"message": "Bad Request",
"detail": "<string>"
}{
"code": 401,
"message": "Unauthorized",
"detail": "<string>"
}{
"code": 403,
"message": "Forbidden",
"detail": "<string>"
}{
"code": 404,
"message": "Not Found",
"detail": "<string>"
}{
"code": 405,
"message": "Method Not Allowed",
"detail": "<string>"
}{
"code": 409,
"message": "Conflict",
"detail": "<string>"
}{
"code": 422,
"message": "Invalid Request Body",
"detail": [
{
"path": "<string>",
"input": "<string>",
"message": "<string>",
"error_type": "<string>"
}
]
}{
"code": 429,
"message": "Too Many Requests",
"detail": {
"retry_after_seconds": 123,
"message": "<string>"
}
}{
"message": "Internal Server Error"
}Get Webhook Subscription Metrics
Get delivery metrics for a webhook subscription.
curl --request GET \
--url https://api.catenatelematics.com/v2/notifications/webhooks/{webhook_id}/metrics \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.catenatelematics.com/v2/notifications/webhooks/{webhook_id}/metrics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.catenatelematics.com/v2/notifications/webhooks/{webhook_id}/metrics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.catenatelematics.com/v2/notifications/webhooks/{webhook_id}/metrics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.catenatelematics.com/v2/notifications/webhooks/{webhook_id}/metrics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.get("https://api.catenatelematics.com/v2/notifications/webhooks/{webhook_id}/metrics")
.header("Authorization", "Bearer <token>")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.catenatelematics.com/v2/notifications/webhooks/{webhook_id}/metrics");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.catenatelematics.com/v2/notifications/webhooks/{webhook_id}/metrics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"avg_response_time_ms": {
"14d": 158,
"24h": 160,
"6h": 150,
"7d": 155
},
"dlq_count": 5,
"ewma_success_rate": 0.98,
"http_attempts": {
"14d": 6500,
"24h": 420,
"6h": 105,
"7d": 3000
},
"http_failure_attempts": {
"14d": 500,
"24h": 20,
"6h": 5,
"7d": 200
},
"http_success_attempts": {
"14d": 6000,
"24h": 400,
"6h": 100,
"7d": 2800
},
"message_count": {
"14d": 6000,
"24h": 400,
"6h": 100,
"7d": 2800
},
"message_success_count": {
"14d": 5800,
"24h": 390,
"6h": 98,
"7d": 2700
},
"success_rate": {
"14d": 96,
"24h": 97,
"6h": 98,
"7d": 96
},
"webhook_id": "123e4567-e89b-12d3-a456-426614174000"
}{
"code": 400,
"message": "Bad Request",
"detail": "<string>"
}{
"code": 401,
"message": "Unauthorized",
"detail": "<string>"
}{
"code": 403,
"message": "Forbidden",
"detail": "<string>"
}{
"code": 404,
"message": "Not Found",
"detail": "<string>"
}{
"code": 405,
"message": "Method Not Allowed",
"detail": "<string>"
}{
"code": 409,
"message": "Conflict",
"detail": "<string>"
}{
"code": 422,
"message": "Invalid Request Body",
"detail": [
{
"path": "<string>",
"input": "<string>",
"message": "<string>",
"error_type": "<string>"
}
]
}{
"code": 429,
"message": "Too Many Requests",
"detail": {
"retry_after_seconds": 123,
"message": "<string>"
}
}{
"message": "Internal Server Error"
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
Response
Successful Response
Webhook Metrics model
Intended to be calculated from the WebhookLogs table and not stored in the database.
The ID of the webhook that the metrics are for
The total number of HTTP requests made (including retries)
Show child attributes
Show child attributes
{
"14d": 5600,
"24h": 400,
"6h": 100,
"7d": 2800
}
The number of HTTP requests that received a 2xx response
Show child attributes
Show child attributes
{
"14d": 5600,
"24h": 400,
"6h": 100,
"7d": 2800
}
The number of HTTP requests that failed or received a non-2xx response
Show child attributes
Show child attributes
{
"14d": 5600,
"24h": 400,
"6h": 100,
"7d": 2800
}
The total number of unique messages/events processed (regardless of retries)
Show child attributes
Show child attributes
{
"14d": 5600,
"24h": 400,
"6h": 100,
"7d": 2800
}
The number of messages that were successfully delivered (after all retries)
Show child attributes
Show child attributes
{
"14d": 5600,
"24h": 400,
"6h": 100,
"7d": 2800
}
The success rate of the webhook. Only available if there are at least 200 messages
Show child attributes
Show child attributes
{
"14d": 5600,
"24h": 400,
"6h": 100,
"7d": 2800
}
The average response time of the webhook
Show child attributes
Show child attributes
{
"14d": 5600,
"24h": 400,
"6h": 100,
"7d": 2800
}
The exponentially weighted moving average success rate of the webhook. If lower than 0.95, the webhook is considered unhealthy and marked as stale.
The number of messages that failed to be delivered, and were put in the DLQ. Messages are stored for 14 days and must be replayed manually.
Was this page helpful?