Bootstrap FreeKB - Docker - delete secret using REST API
Docker - delete secret using REST API

Updated:   |  Docker articles

A secret is a file that contains sensitive data, such as a password.

You will need an auth_token before you can delete a secret using curl. Let's say you want to delete the secret named "my_secret" that has an ID of pp6d206pqk28cj12kjv36l2v7.

The following curl command can be used to delete the secret using "my_secret".

curl -k -X DELETE -H "Authorization: Bearer $auth_token" -H 'Accept: application/json' https://hostname:port/secrets/my_secret

 

The following curl command can be used to delete the secret using the secret ID.

curl -k -X DELETE -H "Authorization: Bearer $auth_token" -H 'Accept: application/json' https://hostname:port/secrets/pp6d206pqk28cj12kjv36l2v7

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 5baa14 in the box below so that we can be sure you are a human.