I am trying to delete all the users in my Atlassian test cloud site and when I run the below script it could not resolve host. But it was doing the job few weeks back.
- USERNAME=$1
- APIKEY=$2
- cat userkey | while read line;
- do
- echo "Deleting user $line"
- curl -I --header "X-Atlassian-Token: no-check" -u "$USERNAME:$APIKEY" --request DELETE \
- --url "https://<atlassiancloud>.atlassian.net/rest/api/3/user?accountId=$line"
- sleep 3
- done
I give the username and key while I run the script.