Getting Session info via REST API

I'm building a web-app that relies on the JIRA/Agile REST API to get/put information into our JIRA instance (onDemand).

I'd like to add the web-app user as a watcher to my create issue use case, and found the session API:

to get the information I need. Though I'm not able to get it working in my app. Using the API in my browser, all works fine, though if I try this through javascript/jquery/json, I get no response:

<!doctype html>
<html lang="en">
  <meta charset="utf-8">
  <title>jQuery.getJSON demo</title>
  <script src=""></script>
<div id="jira"></div>

(function() {
  var jiraAPI = "";
  $.getJSON( jiraAPI, {
    format: "json"
   }).done(function( data ) {
       $( "#jira" ).text( data );

    alert( "done");


I suspect I'm running into an authorization issue, but not sure where to turn.

Ideas/suggestions (code examples would work best!)



1 answer

0 vote
Jason Worley Atlassian Team Nov 17, 2013

Just throwing this out there in case you haven't come across our REST API documentation:

Hope this helps!

Jason - thanks for the tip - though I'm up on the tutorials, my question is very specific to using the API from Javascript.

I'm able to use other parts of the REST API (both JIRA and JIRA Agile) pretty comfortably (passing in credentials, etc. for server-side usage)...

I believe (though could use some confirmation) that this session API is getting information from the client-side.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,317 views 14 20
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot