# list_secret_versions

`tools/call` · `POST /clanker/v1/secrets:list-versions`

List a secret's versions in one environment, newest first, 100 at a time: each version's number, whether it holds a value, who wrote it and when. Never a value. Needs read access.

- Area: Vault
- Needs the read grant. Read-only. Idempotent.

## Inputs

- `product` (string, required): The product's slug, such as storefront.
- `name` (string, required): The secret's name, such as DATABASE_URL.
- `environment` (string, required): The environment's slug, such as staging.
- `before` (integer): Only versions numbered below this one, for the next page. From -9,007,199,254,740,991 to 9,007,199,254,740,991.

## Request

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_secret_versions",
    "arguments": {
      "product": "storefront",
      "name": "DATABASE_URL",
      "environment": "staging"
    }
  }
}
```

## HTTP request

The same call over the clanker HTTP API, with a clanker OAuth access token:

```bash
curl -X POST https://api.clankership.com/clanker/v1/secrets:list-versions \
  -H "Authorization: Bearer $CLANKER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "product": "storefront",
    "name": "DATABASE_URL",
    "environment": "staging"
  }'
```
