GET
/
v2
/
Kafka
/
stats
/
topic
/
{id}
curl -X GET \
  https://api.upstash.com/v2/kafka/stats/topic/:id \
  -u 'EMAIL:API_KEY'
{
  "throughput": [
    {
      "x": "2022-02-07 12:05:11",
      "y": 0
    }
    ...
  ],
  "produce_throughput": [
    {
      "x": "2022-02-07 12:05:11",
      "y": 0
    }
    ...
  ],
  "consume_throughput": [
    {
      "x": "2022-02-07 12:05:11",
      "y": 0
    }
    ...
  ],
  "diskusage": [
    {
      "x": "2022-02-07 12:20:11",
      "y": 0
    }
    ...
  ],
  "total_monthly_storage": 0,
  "total_monthly_produce": 0,
  "total_monthly_consume": 0
}

URL Parameters

id
required

The ID of the Kafka topic

Response Parameters

throughput
Object
produce_throughput
Object
consume_throughput
Object
diskusage
Object
total_monthly_storage
int

Average storage size of the Kafka topic in the current month

total_monthly_produce
int

Total number of monthly produced messages to the Kafka topic

total_monthly_consume
int

Total number of monthly consumed messages from the Kafka topic

curl -X GET \
  https://api.upstash.com/v2/kafka/stats/topic/:id \
  -u 'EMAIL:API_KEY'
{
  "throughput": [
    {
      "x": "2022-02-07 12:05:11",
      "y": 0
    }
    ...
  ],
  "produce_throughput": [
    {
      "x": "2022-02-07 12:05:11",
      "y": 0
    }
    ...
  ],
  "consume_throughput": [
    {
      "x": "2022-02-07 12:05:11",
      "y": 0
    }
    ...
  ],
  "diskusage": [
    {
      "x": "2022-02-07 12:20:11",
      "y": 0
    }
    ...
  ],
  "total_monthly_storage": 0,
  "total_monthly_produce": 0,
  "total_monthly_consume": 0
}