I would like to access the worklogs for our JIRA OnDemand instance from within Google Apps via UrlFetchApp.fetch().
In order to start, I was attempting to use curl using basic auth from the command line to prove I can access it. I used this example as my guide: https://developer.atlassian.com/display/JIRADEV/JIRA+REST+API+Example+-+Basic+Authentication
I attempted to use the form where I am passing the header info. My thought is that I can pass the header info via Google Apps UrlFetchApp.fetch() to do the same thing. I am using the form of the example of: -H
"Authorization: Basic ZnJlZDpmcmVk"
, but with my proper info,
I am hitting the following URL: https://((ourinstance)).atlassian.net/rest/api/2/search?fields=id,self,key,summary,issuetype,timespent,reporter,created,updated,priority,status,labels,creator,assignee,versions,aggregatetimespent,worklog&jql=project= FAST AND updated >= 2014-07-06 AND updated <= 2014-07-19
When I do so, I get a 401 Unauthorized in return. I can successfully use that URL in my browser to get JSON back with the data I seek.
The account I am using is setup to allow Google Apps for login. I also reset the password, so I could use basic auth. I am able to login and out using both.
Is what I am attempting possible in OnDemand? What am I missing?
Thanks.
Community moderators have prevented the ability to post new answers.
Hi Dave,
The problem might be that the user authentication for Google is distinct from that in JIRA. The first time you authenticate with Google you are asked to create a password for JIRA, which is the local passwored stored in the JIRA DB. This means that using the API, you need to authenticate with that local user/password and not your Google credentials - is that what you're doing with curl?
Cheers,
-dave
Hi @David Nicholson [Atlassian], do you know if using google credentials to access the APIs will be supported soon? Most of the people I've talked to who have Google auth to JIRA opted to not create a password and only use SSO with Google Auth. So it is impossible for those people to use the REST apis, without asking an admin to set them a temporary password.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm not aware of any plans, but any user can change their own password from the forgot password link on the login page - this will not affect their Google password or authentication at all.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.