@@ -111,6 +111,44 @@ curl -X PUT http://localhost:8080/api/secret/b7ecb6ebabc231/my-backend/review \
}
```
#### PATCH secret endpoint
Partially update a secret in the Vault server, seamlessly depending on the detected Key-Value engine version. This uses native [version 2 `PATCH`](https://www.vaultproject.io/api-docs/secret/kv/kv-v2#patch-secret) API and it implemented using Read, Merge then Write for version 1.
##### Single Field Update
Patch a single field of a secret path generating a [JSON Patch](https://datatracker.ietf.org/doc/html/rfc6902) for you.
| `secret_path` (_path parameter_) | this is your secret location in the Vault server |
#### DELETE secret endpoint
Delete a secret from the Vault server, seamlessly using the right API depending on the detected Key-Value engine version ([version 1](https://www.vaultproject.io/api-docs/secret/kv/kv-v1#delete-secret) or [version 2](https://www.vaultproject.io/api-docs/secret/kv/kv-v2#delete-latest-version-of-secret)).
* This function requests the Vault server endpoint to do a partial update of a secret.
* It manages seamlessly the KV engine version
* - version 1: https://developer.hashicorp.com/vault/api-docs/secret/kv/kv-v1#read-secret then https://www.vaultproject.io/api-docs/secret/kv/kv-v1#create-update-secret
* - version 2: https://developer.hashicorp.com/vault/api-docs/secret/kv/kv-v2#patch-secret