Delete a Secret
In this example we will delete the secret name demosecret.
You can not edit a secret. If you need to update a secret, just delete and create it again with the new value.
curl -X "POST" \
"https://<url.kelvin.ai>/api/v4/secrets/demosecret/delete" \
-H "Authorization: Bearer <Your Current Token>" \
-H "Accept: application/json" \
-d ''
The response code will be 200 or an error code from 4XX.
from kelvin.api.client import Client
# Login
client = Client(config={"url": "https://<url.kelvin.ai>", "username": "<your_username>"})
client.login(password="<your_password>")
# Delete Secret
response = client.secret.delete_secret(secret_name="demosecret")
print(response)
You will see the output like this;
None
kelvin secret delete demosecret
You will need to confirm the delete process and if everything went well you will get the confirmation response like this;
[kelvin.sdk][2024-03-19 21:08:12][I] Deleting secret(s) "demosecret" from the platform
[kelvin.sdk][2024-03-19 21:08:12][W]
This operation will delete the secret(s) "demosecret" from the platform
Are you sure? [y/N] y
[kelvin.sdk][2024-03-19 21:08:17][R] Secret "demosecret" successfully deleted from the platform