Hi Mona,<div><br></div><div>It looks like the session isn't being shared properly with Annio.  Is Annio calling the web API using javascript AJAX calls, or something else?</div><div><br></div><div>Thanks,</div><div><br>

</div><div>Zach<br><br><div class="gmail_quote">On Wed, Jun 27, 2012 at 8:56 PM, Mona Wong <span dir="ltr"><<a href="mailto:mona@sdsc.edu" target="_blank">mona@sdsc.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
Hi Zach:<br>
<br>
        I'm trying to get the useSession parameter working for the web API call from the application Annio but am getting "{"stat":"fail","message":"This item doesn't exist or you don't have the permissions.","code":-151}" returned instead.<br>


<br>
        The interesting thing is that I am able to make the call manually in my browser and it works.<br>
<br>
        Annio and Midas are installed on the same server (<a href="http://idash-images.sdsc.edu/annio/" target="_blank">http://idash-images.sdsc.edu/annio/</a> and <a href="http://idash-images.sdsc.edu/midas/" target="_blank">http://idash-images.sdsc.edu/midas/</a>, respectively) and I know the session has not expired yet.<br>


<br>
        Any other idea why Annio get a failure result while the browser works fine?<br>
<br>
thanks,<br>
<div class="im HOEnZb">Mona<br>
<br>
<br>
On Jun 25, 2012, at 6:14 PM, Zach Mullen wrote:<br>
<br>
</div><div class="im HOEnZb">> You may be able to use the session for this; if you pass the "useSession" parameter to a web API method, it will attempt to use session authentication instead of the web API token, but this only works for clients that support session cookies.  So the question is, how is Annio going to write data back into Midas?  If the application is running in the same place as Midas, you should be able to just pass useSession to the web API assuming the user's session is still active.  That seems to me that it would work because Annio is an HTML5 application and is running in the browser, so it would have all of the same session cookies from the Midas instance.<br>


><br>
><br>
> Thanks,<br>
><br>
> Zach<br>
<br>
</div><div class="im HOEnZb">*********************************************<br>
    Mona Wong<br>
    Web & iPad Application Developer<br>
    San Diego Supercomputer Center<br>
<br>
</div><div class="HOEnZb"><div class="h5">    You are the light you wish to see.<br>
*********************************************<br>
<br>
<br>
<br>
</div></div></blockquote></div><br><br>
</div>