Method: topicStats.projects.locations.topics.computeTimeCursor

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

HTTP request

POST https://{endpoint}/v1/topicStats/{topic=projects/*/locations/*/topics/*}:computeTimeCursor

Where {endpoint} is one of the supported service endpoints.

The URLs use gRPC Transcoding syntax.

Path parameters

Parameters
topic

string

Required. The topic for which we should compute the cursor.

Authorization requires the following IAM permission on the specified resource topic:

  • pubsublite.topics.computeTimeCursor

Request body

The request body contains data with the following structure:

JSON representation
{
  "partition": string,
  "target": {
    object (TimeTarget)
  }
}
Fields
partition

string (int64 format)

Required. The partition for which we should compute the cursor.

target

object (TimeTarget)

Required. The target publish or event time. Specifying a future time will return an unset cursor.

Response body

If successful, the response body contains data with the following structure:

Response containing the cursor corresponding to a publish or event time in a topic partition.

JSON representation
{
  "cursor": {
    object (Cursor)
  }
}
Fields
cursor

object (Cursor)

If present, the cursor references the first message with time greater than or equal to the specified target time. If such a message cannot be found, the cursor will be unset (i.e. cursor is not present).

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.