Skip to content
PayloadPuffin.
Join the waitlist

Get analytics totals

GET/v1/analytics/totalspreview

Get one row per key of a dimension with its counters summed over a range. Destination rows carry the name, including the last name of a deleted destination. A read that is too large is refused with 400 validation_failed, never cut short: one whose range holds more than 1000 keys, or covers too much detail. Narrow the range.

Query parameters

  • dimension string Required

    What the totals are keyed by: app (one row for the whole app), event_type, or destination.

    Allowed values: "app", "event_type", "destination"

  • from string (date-time) Required

    The inclusive start of the range, a whole UTC hour.

  • to string (date-time) Required

    The exclusive end of the range, a whole UTC hour.

Returns

200

The query result.

  • data object Required

    One row per key with its totals over the range.

    • dimension string Required

      What the totals are keyed by: app (one row for the whole app), event_type, or destination.

      Allowed values: "app", "event_type", "destination"

    • from string (date-time) Required

      The inclusive start of the range.

    • to string (date-time) Required

      The exclusive end of the range.

    • rows object[] Required

      One row per key, sorted by key. The app dimension has one row with a null key.

      Show child attributesHide child attributes
      • key string | null Required

        The destination ID or event type the row belongs to. Null for the app dimension. ‘’ for the app-wide latency row, and ‘pp/other’ for the event types past the monthly cap, which are counted together. Event types starting with ‘pp/’ are reserved.

      • name string | null Required

        For a destination row, the current name, or the last name before the destination was deleted. Null for another dimension, and for an ID the app never held.

      • deleted boolean Required

        True when the row is a destination that is deleted. False for another dimension.

      • values object Required

        Counters summed over the range, by name, with the same names as a series point. Destination rows also carry the latency extremes in milliseconds.

        Show child attributesHide child attributes
        • events number Optional

          The events counter.

        • quarter_units number Optional

          The quarter_units counter.

        • payload_bytes number Optional

          The payload_bytes counter.

        • deliveries number Optional

          The deliveries counter.

        • deliveries_held number Optional

          The deliveries_held counter.

        • transforms number Optional

          The transforms counter.

        • attempts number Optional

          The attempts counter.

        • delivered number Optional

          The delivered counter.

        • failed number Optional

          The failed counter.

        • retried number Optional

          The retried counter.

        • internal_errors number Optional

          The internal_errors counter.

        • latency_sum_ms number Optional

          The latency_sum_ms counter.

        • status_2xx number Optional

          The status_2xx counter.

        • status_3xx number Optional

          The status_3xx counter.

        • status_4xx number Optional

          The status_4xx counter.

        • status_5xx number Optional

          The status_5xx counter.

        • status_network number Optional

          The status_network counter.

        • unhealthy number Optional

          The unhealthy counter.

        • ignored number Optional

          The ignored counter.

        • latency_min_ms number Optional

          The latency_min_ms counter.

        • latency_max_ms number Optional

          The latency_max_ms counter.

        • p50 number Optional

          The p50 counter.

        • p95 number Optional

          The p95 counter.

        • p99 number Optional

          The p99 counter.

        • samples number Optional

          The samples counter.

Example

Request
curl -X GET "https://api.payloadpuffin.com/v1/analytics/totals?dimension=app&from=2026-10-21T00%3A00%3A00.000Z&to=2026-10-22T00%3A00%3A00.000Z" \
  -H "Authorization: Bearer $PAYLOADPUFFIN_API_KEY"
Response 200
{
  "data": {
    "dimension": "app",
    "from": "from",
    "to": "to",
    "rows": [
      {
        "key": "key",
        "name": "name",
        "deleted": true,
        "values": {
          "events": 0,
          "quarter_units": 0,
          "payload_bytes": 0,
          "deliveries": 0,
          "deliveries_held": 0,
          "transforms": 0,
          "attempts": 0,
          "delivered": 0,
          "failed": 0,
          "retried": 0,
          "internal_errors": 0,
          "latency_sum_ms": 0,
          "status_2xx": 0,
          "status_3xx": 0,
          "status_4xx": 0,
          "status_5xx": 0,
          "status_network": 0,
          "unhealthy": 0,
          "ignored": 0,
          "latency_min_ms": 0,
          "latency_max_ms": 0,
          "p50": 0,
          "p95": 0,
          "p99": 0,
          "samples": 0
        }
      }
    ]
  }
}

Errors

Errors use application/problem+json. The code member is stable; branch on it rather than on title or detail.

  • 4XX application/problem+json

    The request was rejected.