---
title: "POST /v1/topicStats/{+topic}:computeMessageStats"
method: POST
path: "/v1/topicStats/{+topic}:computeMessageStats"
tags: ["topicStats"]
---

# POST /v1/topicStats/{+topic}:computeMessageStats

`POST /v1/topicStats/{+topic}:computeMessageStats`

Compute statistics about a range of messages in a given topic and partition.

## Path parameters

- `topic` string, required

## Request body

- ComputeMessageStatsRequest — Compute statistics about a range of messages in a given topic and partition.
  - `endCursor` Cursor — A cursor that describes the position of a message within a topic partition.
    - `offset` string, int64 — The offset of a message within a topic partition. Must be greater than or equal 0.
  - `partition` string, int64 — Required. The partition for which we should compute message stats.
  - `startCursor` Cursor — A cursor that describes the position of a message within a topic partition.
    - `offset` string, int64 — The offset of a message within a topic partition. Must be greater than or equal 0.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/pubsublite.md) · [All operations](https://skmtc.net/google/apis/pubsublite/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/pubsublite/versions/d973df9a0149/schema)
