Skip to content
PayloadPuffin.
Join the waitlist

GET/v1/analytics/usagepreview

Get the app’s billable units this month, its organization’s monthly unit quota, and the app’s lifetime counters of events, deliveries, attempts, payload bytes and transform runs.

Returns

200

The query result.

  • data object Required

    Event counts for the current month and lifetime counters of the app.

    • unitsThisMonth number Required

      Billable units the app used since the start of the current UTC month.

    • unitQuota number Required

      The billable units the organization’s plan includes per UTC month, shared by every app in the organization.

    • quotaExceeded boolean Required

      Whether the organization has used its included units without a paid plan, so ingestion is refused with 402 quota_exceeded.

    • eventsReceived number Required

      Events accepted since the app was created.

    • deliveriesCreated number Required

      Deliveries created since the app was created.

    • deliveriesHeld number Required

      Deliveries created on hold, and not attempted, because their event was too old when it was fanned out, since the app was created.

    • attempts number Required

      Delivery attempts made since the app was created.

    • payloadBytes number Required

      Payload bytes accepted since the app was created.

    • transformInvocations number Required

      Transform runs since the app was created.

    • deliveryInternalErrors number Required

      Times a delivery failed inside PayloadPuffin before a request was sent, since the app was created.

Example

Request
curl -X GET "https://api.payloadpuffin.com/v1/analytics/usage" \
  -H "Authorization: Bearer $PAYLOADPUFFIN_API_KEY"
Response 200
{
  "data": {
    "unitsThisMonth": 0,
    "unitQuota": 0,
    "quotaExceeded": true,
    "eventsReceived": 0,
    "deliveriesCreated": 0,
    "deliveriesHeld": 0,
    "attempts": 0,
    "payloadBytes": 0,
    "transformInvocations": 0,
    "deliveryInternalErrors": 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.