I am using Jenkin job to automatically update the consul key using https endpoint. The syntax I am using to update the consul key using curl command in bash script is below which works fine:-
curl -f -s --show-error "https://example.com/a/b/c?AdminKey=xxxxx&token=yyyyyyy&value=nnn”. (Here key is -->a/b/c)
The above command updates value of consul key “a/b/c” with “nnn”
Now I want to fetch the value of same key in a variable then how I can fetch it using Jenkins job (bash script and curl command) similar to what I have mentioned above?
Note: I have tried curl command such as variable=
curl -f -s --show-error "https://example.com/a/b/c?AdminKey=xxxxx&token=yyyyyyy&value=nnn” where variable is some temp variable to hold the value.But this is not working.