GET
/
v2
/
kafka
/
stats
/
topic
/
{id}
curl -X GET \
  https://api.upstash.com/v2/kafka/stats/cluster/:id \
  -u 'EMAIL:API_KEY'
{
  "throughput": [
    {
      "x": "2022-02-07 11:30:28",
      "y": 0
    }
    ...
  ],
  "produce_throughput": [
    {
      "x": "2022-02-07 11:30:28",
      "y": 0
    }
    ...
  ],
  "consume_throughput": [
    {
      "x": "2022-02-07 11:30:28",
      "y": 0
    }
    ...
  ],
  "diskusage": [
    {
      "x": "2022-02-07 11:45:28",
      "y": 0
    }
    ...
  ],
  "days": [
    "Thursday",
    "Friday",
    "Saturday",
    "Sunday",
    "Monday"
  ],
  "dailyproduce": [
    {
      "x": "2022-02-07 11:30:28.937259962 +0000 UTC",
      "y": 0
    }
    ...
  ],
  "dailyconsume": [
    {
      "x": "2022-02-07 11:30:28.937256776 +0000 UTC",
      "y": 0
    }
    ...
  ],
  "total_monthly_storage": 0,
  "total_monthly_billing": 0,
  "total_monthly_produce": 0,
  "total_monthly_consume": 0
}

URL Parameters

id
string
required
The ID of the Kafka cluster

Response Parameters

throughput
Object
produce_throughput
Object
consume_throughput
Object
diskusage
Object
days
Array<string>
String representation of last 5 days of the week starting from the current day
dailyproduce
int
Last 5 days daily produced message count in kafka cluster
dailyconsume
int
Last 5 days daily consumed message count in kafka cluster
total_monthly_storage
int
Average storage size of the kafka cluster in the current month
total_monthly_billing
int
Total cost of the kafka cluster in current month
total_monthly_produce
int
Total number of produced message in current month
total_monthly_consume
int
Total number of consumed message in current month
curl -X GET \
  https://api.upstash.com/v2/kafka/stats/cluster/:id \
  -u 'EMAIL:API_KEY'
{
  "throughput": [
    {
      "x": "2022-02-07 11:30:28",
      "y": 0
    }
    ...
  ],
  "produce_throughput": [
    {
      "x": "2022-02-07 11:30:28",
      "y": 0
    }
    ...
  ],
  "consume_throughput": [
    {
      "x": "2022-02-07 11:30:28",
      "y": 0
    }
    ...
  ],
  "diskusage": [
    {
      "x": "2022-02-07 11:45:28",
      "y": 0
    }
    ...
  ],
  "days": [
    "Thursday",
    "Friday",
    "Saturday",
    "Sunday",
    "Monday"
  ],
  "dailyproduce": [
    {
      "x": "2022-02-07 11:30:28.937259962 +0000 UTC",
      "y": 0
    }
    ...
  ],
  "dailyconsume": [
    {
      "x": "2022-02-07 11:30:28.937256776 +0000 UTC",
      "y": 0
    }
    ...
  ],
  "total_monthly_storage": 0,
  "total_monthly_billing": 0,
  "total_monthly_produce": 0,
  "total_monthly_consume": 0
}