---
title: pydo.security.list_secret_versions()
description: List Secret Versions
product: Reference
url: https://docs.digitalocean.com/reference/pydo/reference/security/list_secret_versions/
last_updated: "2026-08-03"
---

> **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](https://docs.digitalocean.com/llms.txt). Markdown versions of pages use the same URL with `index.html.md` in place of the HTML page (for example, append `index.html.md` to the directory path instead of opening the HTML document).

# pydo.security.list_secret_versions()

Generated on 3 Aug 2026 from `pydo` version [`v0.40.0`](https://github.com/digitalocean/pydo/releases/tag/v0.40.0v0.40.0)

## Usage

```python
client.security.list_secret_versions(secret="my-database-password", region=None)
```

Returns `JSON`Raises `HttpResponseError`

## Description

To list all versions of a secret, send a GET request to [`/v2/security/secrets/{secret}/versions`](https://docs.digitalocean.com/reference/api/reference/security/index.html.md#security_list_secret_versions).

## Parameters

`secret` string required

The name of the secret.

`region` string optional

The slug identifier for the region where the resource is available.

One of: `ams1`, `ams2`, `ams3`, `blr1`, `fra1`, `lon1`, `nyc1`, `nyc2`, `nyc3`, `sfo1`, `sfo2`, `sfo3`, `sgp1`, `tor1`, `syd1`

## Response Example

## Show Response Example

```json
{
  "versions": [
    {
      "version": 1,
      "created_at": "2025-12-04T00:00:00Z",
      "updated_at": "2025-12-04T00:00:00Z"
    }
  ]
}
```

## More Information

See [`/v2/security/secrets/{secret}/versions`](https://docs.digitalocean.com/reference/api/reference/security/index.html.md#security_list_secret_versions) in the API reference for additional detail on responses, headers, parameters, and more.