Hi,
I use the below curl command to disable the alert which works fine.
curl -k -u admin:password https://<host>:<mgmt_port>/servicesNS/<user_context>/<app_context>/saved/searches/<search>/disable -X POST
But i am trying to hide the username and password in the below shell script but getting unauthorized exception,
SCRIPT_DIR=/tmp/
USER=$(cat $SCRIPT_DIR/.nonprodusr.txt)
PWD=$(cat $SCRIPT_DIR/.nonprod.txt)
curl -k -u $USER:$PWD https://<host>:<mgmt_port>/servicesNS/<user_context>/<app_context>/saved/searches/<search>/disable -X POST
Can you please try this?
SCRIPT_DIR="/tmp/"
USER=$(cat $SCRIPT_DIR/nonprodusr.txt)
PWD=$(cat $SCRIPT_DIR/nonprod.txt)
curl -k -u $USER:$PWD https://<host>:<mgmt_port>/servicesNS/<user_context>/<app_context>/saved/searches/<search>/disable -X POST
Thanks
KV
▄︻̷̿┻̿═━一
If any of my reply helps you to solve the problem Or gain knowledge, an upvote would be appreciated.