Skip to main content
client.secrets.list_secrets() lists the secrets in a folder in an environment of a project. The machine identity needs a role in the project that can read secrets, such as Viewer.

Parameters

str
The ID of the project. Pass project_id or project_slug. If you pass both, the SDK uses project_id.
str
The slug of the project.
str
required
The slug of the environment, such as dev.
str
required
The path of the folder, such as / or /backend.
bool
default:"False"
Whether to also list the secrets in every subfolder of secret_path.
bool
default:"True"
Whether to also return the folder’s secret imports, in imports.
bool
default:"True"
Whether to replace each secret reference, such as ${dev.DB_HOST}, with the value it points to.
bool
default:"True"
Whether to return the secrets’ values. If False, each secret’s secretValueHidden is True and its secretValue is <hidden-by-infisical>.
List[str]
Tag slugs, to list only the secrets that have at least one of these tags.

Returns

ListSecretsResponse