> ## Documentation Index
> Fetch the complete documentation index at: https://docs.datris.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Secrets API

> Manage secrets in HashiCorp Vault

The Secrets API lets you list, read, update, and delete secrets stored in HashiCorp Vault. Secrets are scoped to the current environment (e.g., `oss`).

## List Secrets

```
GET /api/v1/secrets
```

Returns a JSON array of secret names for the current environment.

### Example

```bash theme={null}
curl -s http://localhost:8080/api/v1/secrets | jq .
```

### Response

```json theme={null}
["activemq", "anthropic", "chroma", "embedding", "kafka-producer", "minio", "mongodb", "ollama", "openai", "pgvector", "postgres", "qdrant", "weaviate"]
```

***

## Get Secret

```
GET /api/v1/secrets/{name}
```

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `name`    | path | Secret name |

Sensitive fields (`password`, `apiKey`, `secretKey`, `token`, `secret`) are always masked as `••••••••`. Non-sensitive fields show their actual values.

### Example

```bash theme={null}
curl -s http://localhost:8080/api/v1/secrets/anthropic | jq .
```

### Response

```json theme={null}
{
  "name": "anthropic",
  "fields": {
    "endpoint": "https://api.anthropic.com/v1/messages",
    "model": "claude-opus-4-8",
    "apiKey": "••••••••"
  }
}
```

### Error

Returns `404` if the secret does not exist.

***

## Update Secret

Create or update a secret.

```
PUT /api/v1/secrets/{name}
Content-Type: application/json
```

| Parameter | Type | Description              |
| --------- | ---- | ------------------------ |
| `name`    | path | Secret name              |
| body      | JSON | Key-value pairs to store |

### Example

```bash theme={null}
curl -X PUT http://localhost:8080/api/v1/secrets/anthropic \
  -H "Content-Type: application/json" \
  -d '{
    "endpoint": "https://api.anthropic.com/v1/messages",
    "model": "claude-opus-4-8",
    "apiKey": "sk-ant-..."
  }'
```

### Response

```json theme={null}
{"status": "ok"}
```

***

## Delete Secret

```
DELETE /api/v1/secrets/{name}
```

| Parameter | Type | Description           |
| --------- | ---- | --------------------- |
| `name`    | path | Secret name to delete |

### Example

```bash theme={null}
curl -X DELETE http://localhost:8080/api/v1/secrets/my-secret
```

### Response

```json theme={null}
{"status": "ok"}
```
