# Proxy Usage Analytics

The raw Log objects are good for display table data, however, to produce a chronological graph they are impractical as they would reduce huge data egress and subsquent processing.

To remediate this, there is a Log Analytics API Route which returns timebucketed summaries of Proxy Network Requests:

```json
{
    "count": 0,
    "data": {
        "intervals": [
            {
            "bytes": 0,
            "error": 0,
            "interval": "string",
            "requests": 0,
            "successful": 0
            }
        ],
        "total_bytes": 0,
        "total_error": 0,
        "total_requests": 0,
        "total_successful": 0
    },
    "message": "Log analysis successful."
}
```

When using the analytics API you must send in two datetime parameters and the interval at which you want to timebucket the summaries to.

You can also filter the dataset used by the analytics, for example, if you wanted to get analytics on datacenter proxy network requests only then you could include the parameter `log_network`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://internal.developer.documentation.private.user.pingproxies.com/logs-and-analytics/proxy-usage-analytics.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
