Method: projects.topics.snapshots.list

Lists the names of the snapshots on this topic. Snapshots are used in subscriptions.seek operations, which allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment state of messages in an existing subscription to the state captured by a snapshot.

HTTP request

GET https://pubsub.googleapis.com/v1/{topic}/snapshots

Path parameters

Parameters
topic

string

Required. The name of the topic that snapshots are attached to. Format is projects/{project}/topics/{topic}.

Query parameters

Parameters
pageSize

integer

Maximum number of snapshot names to return.

pageToken

string

The value returned by the last ListTopicSnapshotsResponse; indicates that this is a continuation of a prior snapshots.list call, and that the system should return the next page of data.

Request body

The request body must be empty.

Response body

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

Response for the snapshots.list method.

JSON representation
{
  "snapshots": [
    string
  ],
  "nextPageToken": string
}
Fields
snapshots[]

string

The names of the snapshots that match the request.

nextPageToken

string

If not empty, indicates that there may be more snapshots that match the request; this value should be passed in a new ListTopicSnapshotsRequest to get more snapshots.

Authorization Scopes

Requires one of the following OAuth scopes:

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

For more information, see the Authentication Overview.