It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage
Highlighted

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
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you