curl -X GET 'https://verification.didit.me/v3/events/enrichment-metrics/?days=30' \
-H 'x-api-key: YOUR_API_KEY'import os
import requests
resp = requests.get(
'https://verification.didit.me/v3/events/enrichment-metrics/',
headers={'x-api-key': os.environ['DIDIT_API_KEY']},
params={'days': 30},
timeout=10,
)
resp.raise_for_status()
metrics = resp.json()
print(metrics['events_ingested'], metrics['cache_hit_rate'], metrics['provider_calls_per_1k_events'])const resp = await fetch('https://verification.didit.me/v3/events/enrichment-metrics/?days=30', {
headers: { 'x-api-key': process.env.DIDIT_API_KEY },
});
if (!resp.ok) throw new Error(`Request failed: ${resp.status}`);
const metrics = await resp.json();
console.log(metrics.events_ingested, metrics.cache_hit_rate, metrics.provider_calls_per_1k_events);<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://verification.didit.me/v3/events/enrichment-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 => [
"x-api-key: <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://verification.didit.me/v3/events/enrichment-metrics/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<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://verification.didit.me/v3/events/enrichment-metrics/")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://verification.didit.me/v3/events/enrichment-metrics/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"events_ingested": 128450,
"events_rejected": 214,
"enrichment_lookups": 41230,
"enrichment_cache_hits": 40118,
"enrichment_provider_calls": 1112,
"enrichment_skipped_low_value": 74320,
"unique_ips_seen": 1112,
"period_days": 30,
"cache_hit_rate": 0.973,
"unique_ip_ratio": 0.0087,
"provider_calls_per_1k_events": 8.66
}Get Event Enrichment Metrics
Read event ingestion and IP-enrichment counters for a period: cache hit rate, unique-IP ratio and fresh lookups per thousand events.
curl -X GET 'https://verification.didit.me/v3/events/enrichment-metrics/?days=30' \
-H 'x-api-key: YOUR_API_KEY'import os
import requests
resp = requests.get(
'https://verification.didit.me/v3/events/enrichment-metrics/',
headers={'x-api-key': os.environ['DIDIT_API_KEY']},
params={'days': 30},
timeout=10,
)
resp.raise_for_status()
metrics = resp.json()
print(metrics['events_ingested'], metrics['cache_hit_rate'], metrics['provider_calls_per_1k_events'])const resp = await fetch('https://verification.didit.me/v3/events/enrichment-metrics/?days=30', {
headers: { 'x-api-key': process.env.DIDIT_API_KEY },
});
if (!resp.ok) throw new Error(`Request failed: ${resp.status}`);
const metrics = await resp.json();
console.log(metrics.events_ingested, metrics.cache_hit_rate, metrics.provider_calls_per_1k_events);<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://verification.didit.me/v3/events/enrichment-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 => [
"x-api-key: <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://verification.didit.me/v3/events/enrichment-metrics/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<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://verification.didit.me/v3/events/enrichment-metrics/")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://verification.didit.me/v3/events/enrichment-metrics/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"events_ingested": 128450,
"events_rejected": 214,
"enrichment_lookups": 41230,
"enrichment_cache_hits": 40118,
"enrichment_provider_calls": 1112,
"enrichment_skipped_low_value": 74320,
"unique_ips_seen": 1112,
"period_days": 30,
"cache_hit_rate": 0.973,
"unique_ip_ratio": 0.0087,
"provider_calls_per_1k_events": 8.66
}Authorizations
Your application's API key, from Developers -> API keys in the Business Console. The primary key has full access. A named key can be scoped: none, read or write per resource, limited to some workflows or to approved sessions, to a list of IP addresses, and to an expiry date. 401 means the key is missing, wrong, revoked or expired; 403 means the key has no access to this resource or action, or the request came from an address outside its IP list; 404 on a session route means the session is outside the key's workflows or statuses. A key without media access receives image, video and PDF URLs as null, and a key without sessions write receives session links and tokens as null. See https://docs.didit.me/console/api-keys.
Query Parameters
Length of the period in days. Defaults to 30; values are clamped to 1 to 365, and a non-integer value falls back to 30. The value applied is returned as period_days.
1 <= x <= 365Response
Counters and ratios for the period.
New events stored. Idempotent replays are not counted.
Items rejected inside batch requests (server and device lanes). A rejected single-event request is not counted.
Events whose public IP address was resolved, from the cache or freshly.
Lookups answered from the cache.
Lookups that needed a fresh resolution of the address.
Low-value telemetry events whose address was not already known. They never trigger a fresh resolution of their own.
Addresses that needed a fresh resolution.
The days value applied after clamping.
enrichment_cache_hits / enrichment_lookups, rounded to 4 decimals. Null when there were no lookups.
unique_ips_seen / events_ingested, rounded to 4 decimals. Null when no events were ingested.
Fresh resolutions per 1000 ingested events, rounded to 2 decimals. Null when no events were ingested.