Jump to
Ctrl
+
/

Batching

To optimize efficiency, especially when managing a high volume of requests, our system offers the capability to consolidate multiple individual requests into a single batch before transmitting them.

Code Example

The Structure of the batch should be as follows:

{ 
    "data" : [ 
      { 
        "http_route" : "/api/doxify-api", 
        "http_request_method" : "GET", 
        "http_response_status_code" : 200, 
        "network_protocol_name" : "http", 
        "network_protocol_version" : "3.1.1", 
        "server_address" : "example.com", 
        "server_port" : "80", 
        "url_scheme" : "https", 
        "timestamp" : 1714741336, 
        "http_bag" : { 
          "api_key" : "AIzaSyDaGmWKa4JsXZ...", 
          "email" : "[email protected]", 
          "user_agent" : "Mozilla", 
          "ip" : "127.0.0.1" 
        } 
      }, 
      { 
        "http_route" : "/api/doxify-api", 
        "http_request_method" : "GET", 
        "http_response_status_code" : 200, 
        "network_protocol_name" : "http", 
        "network_protocol_version" : "3.1.1", 
        "server_address" : "example.com", 
        "server_port" : "80", 
        "url_scheme" : "https", 
        "timestamp" : 1714741336, 
        "http_bag" : { 
          "api_key" : "AIzaSyDaGmWKa4JsXZ...", 
          "email" : "[email protected]", 
          "user_agent" : "Mozilla", 
          "ip" : "127.0.0.1" 
        } 
      } 
    ] 
  } 

Requests per Batch

The API Metrics Add-on supports batching requests, with each batch capable of containing up to 1,000 requests/batch. For additional details, refer to the section titled 'Error Management and Usage Guidelines’.