Method: projects.secrets.list

ListsSecrets.

HTTP request

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

The URL usesgRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The resource name of the project associated with theSecrets, in the formatprojects/*.

Authorization requires the followingIAM permission on the specified resourceparent:

  • secretmanager.secrets.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 viaListSecretsResponse.next_page_token.

Request body

The request body must be empty.

Response body

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

Response message forSecretManagerService.ListSecrets.

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

object (Secret)

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

nextPageToken

string

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

totalSize

integer

The total number ofSecrets.

Authorization Scopes

Requires the following OAuth scope:

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

For more information, see theAuthentication Overview.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-05-14 UTC.