8 Replies Latest reply on Apr 19, 2017 2:57 PM by Harsh Agarwal

    Connecting Tableau WDC to JIRA API [Solved]

    Kirill Andriychuk

      I have spent most of the time for the last few days wrapping my head around automating access to JIRA queue through WDC and I think I figured it out.

      Big thanks to Daniel Leventhal and Martin Sleeman who donated some of their valuable time to jump on the call with me and help me address some issues.

       

      Lets get to it:

      The biggest challenge you will encounter is cross domain AJAX call and JIRA authentication. That can be fixed with CURL. We will create a local file called jira_results.html and simply dump the CURL result into it. And we can automate that via CRON.

       

      curl --user user:pass -o /www/jira_results.html "https://jira.example.com/rest/api/2/search?jql=[YOUR QUERY PARAMETERS]&fields=[YOUR FIELDS]&maxResults=1000".


      maxResults=1000 is important because JIRA returns only 50 results by default via API. The above call will create the jira_results.html file with the outcome of your JIRA query that you pass as jql parameter.

       

      Next steps are pretty easy. You take the jsonConnector.html that you are provided so kindly in the WDC package and upload it to the server. Launch the Tableau Desktop with Web Data Connector connection, when prompted to provide the URL, enter www.your_web_site.com/jsonConnector.html. That will bring up the interface for JSON connection. In the URL there enter www.your_web_site.com/jira_results.html and that should create a data extract with your JIRA query results.

      I have originally done this without maxResults=1000 and my extract had only 50 entries. After adding this parameter to my CURL call, I simply refreshed the extract and now I see over 100 JIRA tickets, which is what I see in JIRA interface.

       

      Word of caution: this is all initial and RAW setup with no consideration for security. If your environment is not behind firewall, everyone will be able to see your www.your_web_site.com/jira_results.html file.