Forums

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

Jira REST API v6.4 - How to Authenticate Protected Calls

LearnNShare
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!
June 23, 2018

Hello All. My organisation has Jira v 6.4 installed on an Internal Server. I am trying to understand how to use the REST APIs for protected operations. E.g. Login a User and Post a Comment on a Jira-ticket.

I found https://bitbucket.org/atlassian_tutorial/atlassian-oauth-examples/src?_ga=2.222679198.481098606.1529672290-1649287736.1529672290 which suggests how to use OAUTH 1.0a with Jira

Kindly confirm in case that is the only way to API calls in order to perform operations which require Authentication?

I am basically looking for a way to do this using Javascript alone.

Thanks

1 answer

1 accepted

1 vote
Answer accepted
Mikhail_Kopylov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 23, 2018

Hi, Amandeep, did you try using Basic authentication? 

LearnNShare
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!
June 24, 2018

Hello Mikhail

 

Sorry, I didn't realised I should have referred /rest/auth/1/session in to https://docs.atlassian.com/software/jira/docs/api/REST/6.4/

 

I am able to get following response:

{
  "session": {
    "name": "JSESSIONID",
    "value": "D2796442969CE6E6355C6FA2DE3BBDE6"
  },
  "loginInfo": {
    "failedLoginCount": 13,
    "loginCount": 177,
    "lastFailedLoginTime": "2018-05-29T12:16:02.842-0400",
    "previousLoginTime": "2018-06-23T13:21:01.089-0400"
  }
}

Thanks

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events