Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

curl: (6) Could not resolve host

Hemanth Nagarajan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 23, 2022
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.
  1. USERNAME=$1
  2. APIKEY=$2
  3. cat userkey | while read line;
  4. do
  5.     echo "Deleting user $line"
  6.     curl -I --header "X-Atlassian-Token: no-check" -u "$USERNAME:$APIKEY"  --request DELETE \
  7.     --url "https://<atlassiancloud>.atlassian.net/rest/api/3/user?accountId=$line"
  8.     sleep 3
  9. done

I give the username and key while I run the script. 

0 answers

Suggest an answer

Log in or Sign up to answer