Proxy Analytics

On this page, we'll explore the endpoints that provide detailed proxy-level analytics for your custom domains. These endpoints offer insights into the technical performance and operational aspects of your domain infrastructure, helping you monitor and optimize your service delivery.

The proxy analytics API provides comprehensive data about your domains' infrastructure performance, including request volumes, data transfer statistics, response times, and server behavior. Track metrics such as request counts, bandwidth usage, response time distributions, datacenter and bot traffic patterns, and HTTP response codes. These insights help you understand your domains' technical performance, identify potential issues, and ensure optimal service delivery to your users.


Common Parameters

Analytics endpoints support the following common parameters:

  • Name
    from
    Type
    string
    Description

    Start date for the analytics period in ISO 8601 format YYYY-MM-DD, e.g., "2024-01-01". If not provided, defaults to 30 days ago. Timezone is UTC.

  • Name
    to
    Type
    string
    Description

    End date for the analytics period in ISO 8601 format YYYY-MM-DD, e.g., "2024-01-31". If not provided, defaults to current date. Timezone is UTC.

  • Name
    frequency
    Type
    string
    Description

    (For time-series endpoints only) Time grouping frequency. Available values: day, week, month. Default: day.


GET/api/v1/analytics/custom_domains/:uuid/request_count

Request count

This endpoint returns the total number of HTTP requests processed for your custom domain.

Optional attributes

  • Name
    from
    Type
    string
    Description

    Start date for the analytics period (ISO 8601 format).

  • Name
    to
    Type
    string
    Description

    End date for the analytics period (ISO 8601 format).

Request

GET
/api/v1/analytics/custom_domains/:uuid/request_count
curl -G https://app.saascustomdomains.com/api/v1/analytics/custom_domains/:uuid/request_count \
  -H "Authorization: Bearer {token}" \
  -d from="2024-01-01" \
  -d to="2024-01-31"

Response

{
  "count": 123456
}

GET/api/v1/analytics/custom_domains/:uuid/request_counts_by_date

Request counts by date

This endpoint returns the number of HTTP requests broken down by date.

Optional attributes

  • Name
    from
    Type
    string
    Description

    Start date for the analytics period (ISO 8601 format). Defaults to 30 days ago.

  • Name
    to
    Type
    string
    Description

    End date for the analytics period (ISO 8601 format). Defaults to current date.

  • Name
    frequency
    Type
    string
    Description

    Time grouping frequency (day, week, month). Default: day.

Request

GET
/api/v1/analytics/custom_domains/:uuid/request_counts_by_date
curl -G https://app.saascustomdomains.com/api/v1/analytics/custom_domains/:uuid/request_counts_by_date \
  -H "Authorization: Bearer {token}" \
  -d frequency="day" \
  -d from="2024-01-01" \
  -d to="2024-01-31"

Response

{
  "data": {
    "2024-01-01": 45678,
    "2024-01-02": 52341,
    "2024-01-03": 48765,
    "2024-01-04": 51234
  }
}

GET/api/v1/analytics/custom_domains/:uuid/total_data_transfer

Total data transfer

This endpoint returns the total amount of data transferred for your custom domain. This includes both incoming and outgoing traffic. The value is in bytes.

Optional attributes

  • Name
    from
    Type
    string
    Description

    Start date for the analytics period (ISO 8601 format). Defaults to 30 days ago.

  • Name
    to
    Type
    string
    Description

    End date for the analytics period (ISO 8601 format). Defaults to current date.

Request

GET
/api/v1/analytics/custom_domains/:uuid/total_data_transfer
curl -G https://app.saascustomdomains.com/api/v1/analytics/custom_domains/:uuid/total_data_transfer \
  -H "Authorization: Bearer {token}" \
  -d from="2024-01-01" \
  -d to="2024-01-31"

Response

{
  "bytes": 1234567890
}

GET/api/v1/analytics/custom_domains/:uuid/data_transfer_by_date

Data transfer by date

This endpoint returns the amount of data transferred in bytes broken down by date. This includes both incoming and outgoing traffic.

Optional attributes

  • Name
    from
    Type
    string
    Description

    Start date for the analytics period (ISO 8601 format). Defaults to 30 days ago.

  • Name
    to
    Type
    string
    Description

    End date for the analytics period (ISO 8601 format). Defaults to current date.

  • Name
    frequency
    Type
    string
    Description

    Time grouping frequency (day, week, month). Default: day.

Request

GET
/api/v1/analytics/custom_domains/:uuid/data_transfer_by_date
curl -G https://app.saascustomdomains.com/api/v1/analytics/custom_domains/:uuid/data_transfer_by_date \
  -H "Authorization: Bearer {token}" \
  -d frequency="day" \
  -d from="2024-09-01" \
  -d to="2024-09-29"

Response

{
  "data": {
    "2024-09-01": 0,
    "2024-09-10": 653420657,
    "2024-09-11": 1318207597,
    "2024-09-12": 710554739,
    "2024-09-13": 1095841197,
    "2024-09-14": 713811207,
    "2024-09-15": 609299976,
    "2024-09-16": 1328296801,
    "2024-09-17": 661176948
  }
}

GET/api/v1/analytics/custom_domains/:uuid/average_response_time

Average response time

This endpoint returns the average response time for requests to your custom domain. The duration is in seconds.

Optional attributes

  • Name
    from
    Type
    string
    Description

    Start date for the analytics period (ISO 8601 format). Defaults to 30 days ago.

  • Name
    to
    Type
    string
    Description

    End date for the analytics period (ISO 8601 format). Defaults to current date.

Request

GET
/api/v1/analytics/custom_domains/:uuid/average_response_time
curl -G https://app.saascustomdomains.com/api/v1/analytics/custom_domains/:uuid/average_response_time \
  -H "Authorization: Bearer {token}" \
  -d from="2024-01-01" \
  -d to="2024-01-31"

Response

{
  "duration": 0.245
}

GET/api/v1/analytics/custom_domains/:uuid/average_response_time_by_date

Average response time by date

This endpoint returns the average response time for requests broken down by date. The duration is in seconds.

Optional attributes

  • Name
    from
    Type
    string
    Description

    Start date for the analytics period (ISO 8601 format). Defaults to 30 days ago.

  • Name
    to
    Type
    string
    Description

    End date for the analytics period (ISO 8601 format). Defaults to current date.

  • Name
    frequency
    Type
    string
    Description

    Time grouping frequency (day, week, month). Default: day.

Request

GET
/api/v1/analytics/custom_domains/:uuid/average_response_time_by_date
curl -G https://app.saascustomdomains.com/api/v1/analytics/custom_domains/:uuid/average_response_time_by_date \
  -H "Authorization: Bearer {token}" \
  -d frequency="day" \
  -d from="2024-01-01" \
  -d to="2024-01-31"

Response

{
  "data": {
    "2024-01-01": 0.234,
    "2024-01-02": 0.255,
    "2024-01-03": 0.223,
    "2024-01-04": 0.215
  }
}

GET/api/v1/analytics/custom_domains/:uuid/response_time_distribution

Response time distribution

This endpoint returns the distribution of response times across different time buckets.

Optional attributes

  • Name
    from
    Type
    string
    Description

    Start date for the analytics period (ISO 8601 format).

  • Name
    to
    Type
    string
    Description

    End date for the analytics period (ISO 8601 format).

Request

GET
/api/v1/analytics/custom_domains/:uuid/response_time_distribution
curl -G https://app.saascustomdomains.com/api/v1/analytics/custom_domains/:uuid/response_time_distribution \
  -H "Authorization: Bearer {token}" \
  -d from="2024-01-01" \
  -d to="2024-01-31"

Response

{
  "data": {
    "0-100ms": "10676",
    "100-200ms": "5673",
    "200-300ms": "515",
    "300-400ms": "4272",
    "400-500ms": "9762",
    "500-600ms": "11376",
    "600-700ms": "7644",
    "700-800ms": "4976",
    "800-900ms": "4579",
    "900ms-1s": "2465",
    "1-1.5s": "3271",
    "1.5-2s": "1368",
    "2-3s": "514",
    "3-5s": "512",
    "5-10s": "217",
    "10s+": "140"
  }
}

GET/api/v1/analytics/custom_domains/:uuid/files

Files

This endpoint returns analytics data for the most requested files on your custom domain, sorted by number of requests.

Optional attributes

  • Name
    from
    Type
    string
    Description

    Start date for the analytics period (ISO 8601 format). Defaults to 30 days ago.

  • Name
    to
    Type
    string
    Description

    End date for the analytics period (ISO 8601 format). Defaults to current date.

Request

GET
/api/v1/analytics/custom_domains/:uuid/files
curl -G https://app.saascustomdomains.com/api/v1/analytics/custom_domains/:uuid/files \
  -H "Authorization: Bearer {token}" \
  -d from="2024-01-01" \
  -d to="2024-01-31"

Response

{
  "data": [
    {
      "name": "/robots.txt",
      "count": 3167,
      "percentage": 9.06
    },
    {
      "name": "/wp-login.php",
      "count": 715,
      "percentage": 2.05
    },
    {
      "name": "/xmlrpc.php",
      "count": 715,
      "percentage": 2.05
    }
  ]
}

GET/api/v1/analytics/custom_domains/:uuid/response_codes

Response codes

This endpoint returns a breakdown of HTTP response codes returned by your custom domain, including counts and percentages for each status code.

Optional attributes

  • Name
    from
    Type
    string
    Description

    Start date for the analytics period (ISO 8601 format). Defaults to 30 days ago.

  • Name
    to
    Type
    string
    Description

    End date for the analytics period (ISO 8601 format). Defaults to current date.

Request

GET
/api/v1/analytics/custom_domains/:uuid/response_codes
curl -G https://app.saascustomdomains.com/api/v1/analytics/custom_domains/:uuid/response_codes \
  -H "Authorization: Bearer {token}" \
  -d from="2024-01-01" \
  -d to="2024-01-31"

Response

{
  "data": [
    {
      "name": "200 (OK)",
      "http_code": 200,
      "count": 235621,
      "percentage": 51.69
    },
    {
      "name": "301 (Moved Permanently)",
      "http_code": 301,
      "count": 143997,
      "percentage": 31.59
    },
    {
      "name": "302 (Found)",
      "http_code": 302,
      "count": 32012,
      "percentage": 7.02
    }
  ]
}

GET/api/v1/analytics/custom_domains/:uuid/bot_requests

Bot requests

This endpoint returns analytics about requests from known bots and crawlers, including search engines, monitoring services, and other automated agents.

Optional attributes

  • Name
    from
    Type
    string
    Description

    Start date for the analytics period (ISO 8601 format). Defaults to 30 days ago.

  • Name
    to
    Type
    string
    Description

    End date for the analytics period (ISO 8601 format). Defaults to current date.

Request

GET
/api/v1/analytics/custom_domains/:uuid/bot_requests
curl -G https://app.saascustomdomains.com/api/v1/analytics/custom_domains/:uuid/bot_requests \
  -H "Authorization: Bearer {token}" \
  -d from="2024-01-01" \
  -d to="2024-01-31"

Response

{
  "data": [
    {
      "name": "CloudFlare-AlwaysOnline",
      "count": 221892,
      "percentage": 55.43
    },
    {
      "name": "Google Bot",
      "count": 43506,
      "percentage": 10.87
    },
    {
      "name": "Empty User-Agent",
      "count": 42540,
      "percentage": 10.63
    }
  ]
}

GET/api/v1/analytics/custom_domains/:uuid/datacenter_requests

Datacenter requests

This endpoint returns analytics about requests originating from different datacenters.

Optional attributes

  • Name
    from
    Type
    string
    Description

    Start date for the analytics period (ISO 8601 format).

  • Name
    to
    Type
    string
    Description

    End date for the analytics period (ISO 8601 format).

Request

GET
/api/v1/analytics/custom_domains/:uuid/datacenter_requests
curl -G https://app.saascustomdomains.com/api/v1/analytics/custom_domains/:uuid/datacenter_requests \
  -H "Authorization: Bearer {token}" \
  -d from="2024-01-01" \
  -d to="2024-01-31"

Response

{
  "data": [
    {
      "name": "Cloudflare",
      "datacenter_id": "cloudflare",
      "count": 222999,
      "percentage": 70.94
    },
    {
      "name": "GitHub",
      "datacenter_id": "github",
      "count": 57785,
      "percentage": 18.38
    }
  ]
}