I am trying to write a script that will update some fields of a JIRA issue. The problem i am facing is I am not able to even authenticate to Atlassian. I have tried all the prescribed ways in the documentation -
curl -D- -u yourname\@example.com:password -X GET -H "Content-Type: application/json" https://yourdomain.atlassian.net/rest/api/2/issue/createmeta
And this
curl -i -H "Content-Type: application/json" -X POST -d '{"username":"username","password":"password"}' https://yourdomain.atlassian.net/rest/auth/1/session
Neither of above mentioned approaches works.
For 1) i get this huge html in response which basically is for http status 401.
For 2)I get this response - {"errorMessages":["Login failed"],"errors":{}}
One doubt that i have is it might be because of our SSO integration. We use Okta solution for single sign on.
Can someone please help.