> ## Documentation Index
> Fetch the complete documentation index at: https://docs.didit.me/llms.txt
> Use this file to discover all available pages before exploring further.

# इवेंट एनरिचमेंट मेट्रिक्स API

> Didit के साथ किसी अवधि के इवेंट इंजेस्ट और IP एनरिचमेंट काउंटर पढ़ें: कैश हिट दर, अद्वितीय IP अनुपात और प्रति हज़ार इवेंट नए लुकअप।

इवेंट एनरिचमेंट मेट्रिक्स API प्रॉम्प्ट प्राप्त करें
प्रॉम्प्ट को क्लिपबोर्ड पर कॉपी करें

<pre>
  \`Read the event ingestion and IP-enrichment counters of my Didit application for a period.

  Endpoint:
  GET [https://verification.didit.me/v3/events/enrichment-metrics/?days=30](https://verification.didit.me/v3/events/enrichment-metrics/?days=30)

  Authentication:
  Use the x-api-key header with my Didit API key. A scoped key needs transactions: read.

  Goal:

  * Monitor event volume and confirm that IP enrichment is resolved once per unique address rather than once per event, for a usage dashboard or an alert.

  Behavior:

  * days defaults to 30 and is clamped to 1-365; a non-integer value falls back to 30.
  * The period covers today plus the previous days days, by UTC calendar day.
  * Counters are summed over every lane (server, batch and device).
  * The three ratios are null when their denominator is zero.

  Example call:
  curl -X GET "[https://verification.didit.me/v3/events/enrichment-metrics/?days=30](https://verification.didit.me/v3/events/enrichment-metrics/?days=30)" \
  -H "x-api-key: YOUR\_API\_KEY"

  What to read from the response:

  * events\_ingested - new events stored (replays are not counted).
  * events\_rejected - items rejected inside batch requests (a rejected single-event request is not counted).
  * enrichment\_lookups - events whose public IP address was resolved; enrichment\_cache\_hits - answered from the cache; enrichment\_provider\_calls - needed a fresh resolution.
  * enrichment\_skipped\_low\_value - low-value telemetry whose address was not cached; it never triggers a lookup of its own.
  * unique\_ips\_seen - distinct addresses that needed a fresh resolution.
  * cache\_hit\_rate, unique\_ip\_ratio, provider\_calls\_per\_1k\_events - the ratios.
  * period\_days - the period actually applied.

  Failure modes:

  * 401 - the API key has expired.
  * 403 - missing API key (a wrong, revoked or expired key gets 401), or a scoped key without transactions: read.

  Side effects: none. This is a pure read.

  For the full integration shape, see /integration/integration-prompt.\`
</pre>

यहाँ पेस्ट करें

बिज़नेस कंसोल इवेंट सूची के ऊपर वही संख्याएँ दिखाता है। इवेंट इनजेशन गाइड में [IP एनरिचमेंट](https://docs.didit.me/hi/transaction-monitoring/events.md#ip-एनरिचमेंट) देखें, जिससे पता चलता है कि कम-मूल्य वाली टेलीमेट्री एनरिचमेंट केवल तभी क्यों पढ़ती है जब कोई दूसरा इवेंट पहले ही पते को हल कर चुका हो, और एनरिच किए गए पते में मौजूद फ़ील्ड के लिए [IP एनरिचमेंट](https://docs.didit.me/hi/transaction-monitoring/ip-enrichment.md) देखें।


## OpenAPI

````yaml hi/openapi-25.json GET /v3/events/enrichment-metrics/
openapi: 3.0.0
info:
  version: 3.0.0
  title: Didit Verification API
  description: पहचान सत्यापन API। x-api-key हेडर के साथ प्रमाणीकृत करें।
servers:
  - url: https://verification.didit.me
security: []
tags: []
paths:
  /v3/events/enrichment-metrics/:
    get:
      tags:
        - Monitoring Events
      summary: इवेंट संवर्धन मेट्रिक्स प्राप्त करें
      description: >-
        एक अवधि के लिए अपने एप्लिकेशन के इवेंट इनजेशन और IP-एनरिचमेंट काउंटर्स
        लौटाएं, जो सभी लेनों (सर्वर, बैच और डिवाइस) पर जोड़कर गिने गए हैं, ताकि
        आप इवेंट वॉल्यूम देख सकें और पुष्टि कर सकें कि एनरिचमेंट प्रति इवेंट के
        बजाय प्रति यूनीक पते पर एक बार हल किया गया है। यह अवधि आज और पिछले
        `days` दिनों को कवर करती है, जिसकी गणना UTC कैलेंडर तिथि के अनुसार की
        जाती है। जब उनका डिनॉमिनेटर शून्य होता है तो तीनों अनुपात null होते हैं।
        स्कोप्ड API कुंजी के लिए `transactions: read` की आवश्यकता होती है। [IP
        एनरिचमेंट](https://docs.didit.me/hi/transaction-monitoring/events#ip-एनरिचमेंट)
        देखें।
      operationId: get_monitoring_event_enrichment_metrics
      parameters:
        - name: days
          in: query
          required: false
          description: >-
            दिनों में अवधि की लंबाई। डिफ़ॉल्ट रूप से 30; मान 1 से 365 तक सीमित
            हैं, और गैर-पूर्णांक मान 30 पर वापस आ जाता है। लागू किया गया मान
            `period_days` के रूप में लौटाया जाता है।
          schema:
            type: integer
            default: 30
            minimum: 1
            maximum: 365
          example: 30
      responses:
        '200':
          description: अवधि के लिए काउंटर्स और अनुपात।
          content:
            application/json:
              schema:
                type: object
                required:
                  - events_ingested
                  - events_rejected
                  - enrichment_lookups
                  - enrichment_cache_hits
                  - enrichment_provider_calls
                  - enrichment_skipped_low_value
                  - unique_ips_seen
                  - period_days
                  - cache_hit_rate
                  - unique_ip_ratio
                  - provider_calls_per_1k_events
                properties:
                  events_ingested:
                    type: integer
                    description: >-
                      नए इवेंट संग्रहीत किए गए। आइडेम्पोटेंट रीप्ले नहीं गिने
                      जाते हैं।
                  events_rejected:
                    type: integer
                    description: >-
                      बैच अनुरोधों (सर्वर और डिवाइस लेन) के अंदर अस्वीकृत आइटम।
                      अस्वीकृत एकल-इवेंट अनुरोध की गणना नहीं की जाती है।
                  enrichment_lookups:
                    type: integer
                    description: >-
                      वे इवेंट्स जिनके सार्वजनिक IP पते का समाधान किया गया था,
                      कैश से या नए सिरे से।
                  enrichment_cache_hits:
                    type: integer
                    description: कैश से उत्तर दिए गए लुकअप।
                  enrichment_provider_calls:
                    type: integer
                    description: वे लुकअप जिनके लिए पते के नए रिज़ॉल्यूशन की आवश्यकता थी।
                  enrichment_skipped_low_value:
                    type: integer
                    description: >-
                      कम-मूल्य वाले टेलीमेट्री इवेंट जिनका पता पहले से ज्ञात
                      नहीं था। वे कभी भी स्वयं किसी नए रिज़ॉल्यूशन को ट्रिगर
                      नहीं करते हैं।
                  unique_ips_seen:
                    type: integer
                    description: वे पते जिनके लिए नए रिज़ॉल्यूशन की आवश्यकता थी।
                  period_days:
                    type: integer
                    description: क्लैम्पिंग के बाद लागू किया गया `days` मान।
                  cache_hit_rate:
                    type: number
                    nullable: true
                    description: >-
                      `enrichment_cache_hits / enrichment_lookups`, 4 दशमलव
                      स्थानों तक पूर्णांकित। जब कोई लुकअप नहीं था तब Null।
                  unique_ip_ratio:
                    type: number
                    nullable: true
                    description: >-
                      `unique_ips_seen / events_ingested`, 4 दशमलव स्थानों तक
                      पूर्णांकित। Null जब कोई इवेंट इंगेस्ट नहीं किया गया था।
                  provider_calls_per_1k_events:
                    type: number
                    nullable: true
                    description: >-
                      प्रति 1000 अंतर्ग्रहित इवेंट्स पर नए रिज़ॉल्यूशन, 2 दशमलव
                      स्थानों तक पूर्णांकित। कोई इवेंट अंतर्ग्रहित न होने पर
                      null।
              examples:
                Last 30 days:
                  value:
                    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
                No events yet:
                  value:
                    events_ingested: 0
                    events_rejected: 0
                    enrichment_lookups: 0
                    enrichment_cache_hits: 0
                    enrichment_provider_calls: 0
                    enrichment_skipped_low_value: 0
                    unique_ips_seen: 0
                    period_days: 30
                    cache_hit_rate: null
                    unique_ip_ratio: null
                    provider_calls_per_1k_events: null
        '401':
          description: >-
            स्कोप्ड API कुंजी की समय-सीमा समाप्त हो गई है। केवल समय-सीमा समाप्त
            कुंजी को `401` मिलता है; अनुपलब्ध या अमान्य कुंजी को `403` मिलता है।
          content:
            application/json:
              examples:
                Expired key:
                  value:
                    detail: This API key has expired.
        '403':
          description: >-
            अनुपस्थित `x-api-key` (गलत, निरस्त या समाप्त कुंजी को `401` मिलता
            है), बिना `transactions: read` वाली स्कोप्ड कुंजी, कुछ वर्कफ़्लो या
            स्वीकृत सत्रों तक सीमित कुंजी (ऐसी कुंजी कभी भी लेन-देन निगरानी डेटा
            तक नहीं पहुँचती), या कुंजी की IP अनुमति सूची के बाहर से किया गया
            अनुरोध।
          content:
            application/json:
              examples:
                Missing or invalid API key:
                  value:
                    detail: You do not have permission to perform this action.
                Scoped key without access:
                  value:
                    detail: This API key has no read access to transactions.
                Key limited to workflows or approved sessions:
                  value:
                    detail: >-
                      This API key only reaches sessions inside its workflow or
                      status limits, so it can't use this endpoint.
                IP not allowed:
                  value:
                    detail: This API key can't be used from this IP address.
        '429':
          description: >-
            रेट लिमिट पार हो गई: `GET` अनुरोध प्रति API कुंजी प्रति मिनट 600
            अनुरोधों का बजट साझा करते हैं। `Retry-After` सेकंड प्रतीक्षा करें,
            फिर पुनः प्रयास करें।
          headers:
            Retry-After:
              description: पुनः प्रयास करने से पहले प्रतीक्षा करने के सेकंड।
              schema:
                type: integer
                minimum: 1
                example: 30
          content:
            application/json:
              examples:
                Throttled:
                  value:
                    detail: >-
                      GET request rate limit exceeded. You can make up to 600
                      requests per minute.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X GET
            'https://verification.didit.me/v3/events/enrichment-metrics/?days=30'
            \
              -H 'x-api-key: YOUR_API_KEY'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.monitoring_events.retrieve_enrichment_metrics()
            print(result)
        - lang: javascript
          label: Node.js
          source: >-
            import Didit from "@didit-protocol/sdk-node";


            // Reads DIDIT_API_KEY.

            const didit = new Didit();


            const result = await
            didit.monitoringEvents.retrieveEnrichmentMetrics();

            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.MonitoringEvents.RetrieveEnrichmentMetrics(ctx, didit.MonitoringEventsRetrieveEnrichmentMetricsParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
        - lang: java
          label: Java
          source: |-
            import me.didit.Didit;

            // Reads DIDIT_API_KEY.
            Didit client = new Didit();

            var result = client.monitoringEvents().retrieveEnrichmentMetrics();
            System.out.println(result);
        - lang: php
          label: PHP
          source: |-
            <?php

            require 'vendor/autoload.php';

            use Didit\DiditClient;

            // Reads DIDIT_API_KEY.
            $didit = new DiditClient();

            $result = $didit->monitoringEvents->retrieveEnrichmentMetrics();
            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

            # Reads DIDIT_API_KEY.
            didit = Didit::Client.new

            result = didit.monitoring_events.retrieve_enrichment_metrics
            puts result.to_h
        - lang: csharp
          label: .NET
          source: >-
            using System;

            using System.Text.Json;

            using Didit;


            // Reads DIDIT_API_KEY.

            using var client = new DiditClient();


            var result = await
            client.MonitoringEvents.RetrieveEnrichmentMetricsAsync();

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        आपकी एप्लिकेशन की API कुंजी, Business Console में Developers -> API keys
        से। प्राथमिक कुंजी के पास पूर्ण एक्सेस होता है। एक नामित कुंजी को स्कोप
        किया जा सकता है: प्रति संसाधन none, read या write, कुछ वर्कफ़्लो या
        स्वीकृत सत्रों तक सीमित, IP पतों की सूची तक सीमित, और समाप्ति तिथि तक
        सीमित। 401 का अर्थ है कि कुंजी गलत है, निरस्त कर दी गई है या उसकी
        समय-सीमा समाप्त हो गई है; 403 का अर्थ है कि कोई कुंजी नहीं भेजी गई थी,
        कुंजी के पास इस संसाधन या कार्रवाई का एक्सेस नहीं है, या अनुरोध उसकी IP
        सूची से बाहर के पते से आया था; सत्र रूट पर 404 का अर्थ है कि सत्र कुंजी
        के वर्कफ़्लो या स्थितियों से बाहर है। मीडिया एक्सेस के बिना एक कुंजी को
        छवि, वीडियो और PDF URL null के रूप में प्राप्त होते हैं, और सत्र write
        के बिना एक कुंजी को सत्र लिंक और token null के रूप में प्राप्त होते हैं।
        देखें https://docs.didit.me/console/api-keys।

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.