Method: projects.secrets.versions.list

Lists SecretVersions. This call does not return secret data.

HTTP request

GET https://secretmanager.googleapis.com/v1beta1/{parent=projects/*/secrets/*}/versions

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The resource name of the Secret associated with the SecretVersions to list, in the format projects/*/secrets/*.

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

  • secretmanager.versions.list

Query parameters

Parameters
pageSize

integer

Optional. The maximum number of results to be returned in a single page. If set to 0, the server decides the number of results to return. If the number is greater than 25000, it is capped at 25000.

pageToken

string

Optional. Pagination token, returned earlier via ListSecretVersionsResponse.next_page_token][].

Request body

The request body must be empty.

Response body

Response message for SecretManagerService.ListSecretVersions.

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

JSON representation
{
  "versions": [
    {
      object (SecretVersion)
    }
  ],
  "nextPageToken": string,
  "totalSize": integer
}
Fields
versions[]

object (SecretVersion)

The list of SecretVersions sorted in reverse by createTime (newest first).

nextPageToken

string

A token to retrieve the next page of results. Pass this value in ListSecretVersionsRequest.page_token to retrieve the next page.

totalSize

integer

The total number of SecretVersions.

Authorization scopes

Requires the following OAuth scope:

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

For more information, see the Authentication Overview.