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

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

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

Compute the corresponding cursor for a publish or event time in a topic partition.

## Path parameters

- `topic` string, required

## Request body

- ComputeTimeCursorRequest — Compute the corresponding cursor for a publish or event time in a topic partition.
  - `partition` string, int64 — Required. The partition for which we should compute the cursor.
  - `target` TimeTarget — A target publish or event time. Can be used for seeking to or retrieving the corresponding cursor.
    - `eventTime` string, google-datetime — Request the cursor of the first message with event time greater than or equal to `event_time`. If messages are missing an event time, the publish time is used as a fallback. As event times are user supplied, subsequent messages may have event times less than `event_time` and should be filtered by the client, if necessary.
    - `publishTime` string, google-datetime — Request the cursor of the first message with publish time greater than or equal to `publish_time`. All messages thereafter are guaranteed to have publish times >= `publish_time`.

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