Unify and manage your data

Retrieve messages sent by Event Streaming Processor

Use this API to retrieve the number of messages sent by the Event Streaming Processor for each destination topic during specific time intervals. The response includes message counts grouped by topic name and timestamp.

HTTP method and endpoint

Use the following HTTP method and endpoint path to submit the request for retrieving Event Streaming Processor message counts.
POST /statistics-reporting/{tenantId}/API/eventStreamingProcessor/sentMessages

Replace {tenantId} with the ID of the target tenant.

Request headers

The following request headers must be included.
HeaderValueRequired
Content-Typeapplication/jsonYes
AuthorizationBearer {access_token}Yes

Request body

The following table describes the request body parameters, including accepted values and defaults.
ParameterTypeRequiredDescriptionAccepted values / Default
from (1)LongYesStart time in epoch milliseconds
to (1)LongYesEnd time in epoch milliseconds
envStringYesTarget environmentExample: prod, qa, dev Default: none
resolutionIntegerYesTime resolution in milliseconds for aggregating data
Note:
  1. The time range defined by the from and to values must not exceed one month. If the specified range exceeds the allowed limit, the API returns an HTTP 416 Range Not Satisfiable error with the following response:
    {
      "errors": [
        {
          "message": "Invalid time range."
        }
      ]
    }
    

Example request

Use the following example to see how a complete request is structured with headers and a JSON body.
curl -X POST https://{baseUrl}/statistics-reporting/{tenantId}/API/eventStreamingProcessor/sentMessages \
  -H "Authorization: Bearer YOUR_BEARER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "from": 1698134400000,
    "to": 1698138000000,
    "env": "prod",
    "resolution": 60000
  }'

Response fields

The following table describes the fields returned in the response body.
FieldSubfieldTypeDescription
timestampLongNumeric value representing the start time of the interval in milliseconds
valuesArrayArray containing one or more name-value pairs
nameString The identifier for the destination/topic
valueIntegerThe count of messages sent to that destination during that time interval

Example response

The following example shows message counts grouped by destination topic and timestamp.
[
  {
    "timestamp": 1698134400000,
    "values": [
      {
        "name": "7d8e8db_topic_na07-prod-datapipeline",
        "value": 11257
      }
    ]
  },
  {
    "timestamp": 1698134460000,
    "values": [
      {
        "name": "7d8e8db_topic_na07-prod-datapipeline",
        "value": 11011
      }
    ]
  }
]