On this page

Event Streaming Metrics Summary API

Considerations

  • The latest 4 hours of data is accurate to the minute. Beyond that, the data is aggregated for every hour. Note this when requesting metric data older than 4 hours.
  • Amplitude retains event streaming metrics for the last 90 days. Sending start or end time beyond this threshold returns a 500 status.

Limits

The API has a limit of 4 concurrent requests per project, and 12 requests per minute per project. Amplitude rejects requests above this threshold with a 429 status code.

Request

Send a GET request with required and optional parameters to https://analytics.amplitude.com/api/2/event-streaming/delivery-metrics-summary.

The following example shows a basic request with only the required parameters.

bash
curl --location --request GET 'https://analytics.amplitude.com/api/2/event-streaming/delivery-metrics-summary?sync_id=SYNC_ID&time_period=TIME_PERIOD' \
-u '{api_key}:{secret_key}'

Query parameters

ParameterRequiredDescription
sync_idYesThe ID for a specific streaming destination. Find this ID under the title of the sync on the destination's setting page.
time_periodYesRetrieves the data for a specified period. One of: TEN_MINUTES, ONE_HOUR, FOUR_HOURS, ONE_DAY, ONE_WEEK, TWO_WEEKS, or CUSTOM.
startRequired if time_period is CUSTOMThe inclusive starting time of the custom interval in the format YYYY-MM-DDThh:mmTZD (ISO-8601). For example, 2022-10-01T07:00:00+01:00.
endRequired if time_period is CUSTOMThe exclusive end time of the custom interval in the format YYYY-MM-DDThh:mmTZD (ISO-8601). For example, 2022-10-31T07:00:00+01:00.

Response

The response is a JSON object with the delivery metrics for the specified sync.

AttributeDescription
timePeriodstring. The time_period sent in the request.
eventsDeliveredint. The total number of delivered events.
eventsNotDeliveredint. The total number of events that weren't delivered.
deliveryRatedouble. The delivery success rate.
latencyInSecondsdouble. The p95 latency in seconds.
timePeriodStartstring. The UTC (ISO-8601) timestamp for the request start time.
timePeriodEndstring. The UTC (ISO-8601) timestamp for the request end time.
successOnFirstAttemptint. Events delivered successfully in the first attempt.
successAfterRetryint. Events delivered successfully after one or more retries.
eventsExpiredint. Events that weren't sent after all retry attempts.
eventsDiscardedint. Events that weren't sent due to data incomplete/invalid.
json
{
  "timePeriod": "CUSTOM",
  "eventsDelivered": 19,
  "eventsNotDelivered": 0,
  "deliveryRate": 1.0,
  "latencyInSeconds": 5.098051910578275,
  "timePeriodStart": "2022-10-01 06:00:00.000000",
  "timePeriodEnd": "2022-10-31 06:00:00.000000",
  "successOnFirstAttempt": 19,
  "successAfterRetry": 0,
  "eventsExpired": 0,
  "eventsDiscarded": 0
}

Status codes

CodeMessage
200Success
400Bad request
401Unauthorized
403Forbidden: attempt to access sync outside of organization and app.
429Rate limit exceeded
500Internal server error

Was this helpful?