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

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

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

Compute the head cursor for the partition. The head cursor's offset is guaranteed to be less than or equal to all messages which have not yet been acknowledged as published, and greater than the offset of any message whose publish has already been acknowledged. It is zero if there have never been messages in the partition.

## Path parameters

- `topic` string, required

## Request body

- ComputeHeadCursorRequest — Compute the current head cursor for a partition.
  - `partition` string, int64 — Required. The partition for which we should compute the head cursor.

## 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)
