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,557,113
Community Members
 
Community Events
184
Community Groups

Get all issues from Jira and all tasks from Confluence over the API to a user

Hello to all, @Julia Riedinger  and I need some help.

We want develop a website where we show all tasks per user from Confluence and Jira.
We are not getting any further here, maybe you can help us.

Here the situation:

I’m trying to get all the tasks from Jira and Confluence assigned to a particular user by making an XMLHTTPRequest in a local development environment in JavaScript.

The APIs I’m using are https://{jira-domain}/rest/api/2/search for Jira and https://{confluence-domain}/rest/mywork/latest/task for Confluence whereat I still need to pass the name of a user whose tasks I want to receive.

 

Currently the request won’t deliver any data due to an error caused by CORS that blocks cross-origin HTTP requests.

The Jira API request is blocked because there is no ‘Access-Control-Allow-Origin’ header present on the requested resource. The Confluence API request is blocked because this header is set to a wildcard ‘*’ and this is not allowed when the withCredentials attribute of the HTTP request is set to true. If this attribute is set to false the error message says that the request doesn’t have HTTP ok status.

There is an Add-On for Mozilla Firefox called CORS Everywhere that bypasses the CORS rules. With this Add-On activated the data from Jira API request will be displayed but still not from Confluence API request.

 

With the reverse proxy Cors-Anywhere that is meant to set the missing headers in an HTTP request the API requests both result in a 404 Not Found error.

 

code_snippet.png

 

confluence_error.png

 

jira_error.png

Thanks and kind regards,
Henning

0 comments

Comment

Log in or Sign up to comment