Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,552,588
Community Members
 
Community Events
184
Community Groups

Which authentication method to use to create a JIRA issue using REST API in R?

When I use the authentication methods provided in the documentation, it fails. I am not able to access projects created through JIRA Work Management. Am I looking at the correct help document? Can someone direct me to recent documentation that as a working script? 

1 answer

1 accepted

1 vote
Answer accepted
marc -Collabello--Phase Locked-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 25, 2021

The authentication method depends on if you are on cloud or not.  For cloud, you can access the REST API with Basic Auth as described here: https://developer.atlassian.com/cloud/jira/platform/basic-auth-for-rest-apis/

Thanks a lot, @marc -Collabello--Phase Locked-! I am able to authenticate my credentials now. However, I am not able to create issues using the script as shown below using R (libraries: httr and RJSONIO). Kindly let me know what am I missing?

{
  "fields": {
     "project": [ABC"],
     "summary": ["TESTING SUMMARY"],
     "description": ["TESTING DESCRIPTION"],
     "issuetype": ["Story"],
     "assignee": ["5XXXXXXXXXXXXXXXXXX2"]
    }
}

 x <- list(fields=list(project=c(key="ABC"),
              summary="TESTING SUMMARY",
              description="TESTING DESCRIPTION",
              issuetype=c(name="Story"),
              assignee=c(accountId="5XXXXXXXXXXXXXXXXXX2")
           )
)

POST("https://sitename.atlassian.net/rest/api/2/issue/",body=RJSONIO::toJSON(x),
            authenticate("abcedfegeisadfksdalfkjsdlfkf=", "basic"),
            add_headers("Content-Type"="application/json"), verbose() )

 

How do I create a TASK using POSTMAN REST client? I am not able to use Basic authentication as both user id and password are required. At present, we are using base64(user id:password). I am in desperate need of a solution. Can you please help? 

I am able to fetch Project information using the JiraAgileR package. But, not able to create a Task.

marc -Collabello--Phase Locked-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 26, 2021

My recommendation is to look into the documentation and source code of https://github.com/atlassian-api/atlassian-python-api . The code is quite readable, and you could translate the methods you need into R.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events