This endpoint lets you get the key-identified value of secret for a given secret store.
GET http://localhost:<daprPort>/v1.0/secrets/<secret-store-name>/<key>| Parameter | Description |
|---|---|
| daprPort | the Dapr port |
| secret-store-name | the name of the secret store to get the secret from |
| key | the key identifying the name of the secret to get |
Some secret stores have optional metadata properties. metadata is populated using query parameters:
GET http://localhost:<daprPort>/v1.0/secrets/<secret-store-name>/<key>?metadata.version_id=15The following optional meta can be provided to the GCP Secret Manager component
| Query Parameter | Description |
|---|---|
| metadata.version_id | version for the given secret key |
The following optional meta can be provided to the AWS Secret Manager component
| Query Parameter | Description |
|---|---|
| metadata.version_id | version for the given secret key |
| metadata.version_stage | version stage for the given secret key |
JSON-encoded value
| Code | Description |
|---|---|
| 200 | OK |
| 204 | Secret not found |
| 400 | Secret store is missing or misconfigured |
| 500 | Failed to get secret |
curl http://localhost:3500/v1.0/secrets/vault/db-secret \
-H "Content-Type: application/json"curl http://localhost:3500/v1.0/secrets/vault/db-secret?metadata.version_id=15&metadata.version_stage=AAA \
-H "Content-Type: application/json"