<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hi Manuel,
<div class=""><br class="">
</div>
<div class=""> Apologies for the confusion.</div>
<div class=""><br class="">
</div>
<div class="">All http calls to OMERO.web will close any statefull services they use, so this will limit the</div>
<div class="">resources that are consumed on the server during your session. However, it is still a good idea to</div>
<div class="">log out when you are done, since this will free up the server session and prevent large stale session cleanups every 30 minutes.</div>
<div class=""><br class="">
</div>
<div class="">It is fine to combine /api/ and /webgateay/ or /webclient/ URLs in the same session.</div>
<div class="">There’s no technical difference between them. It’s just that the /api/ URLs are</div>
<div class="">designed to be more consistent and are better documented.</div>
<div class=""><br class="">
</div>
<div class=""> Regards,</div>
<div class=""><br class="">
</div>
<div class="">   Will.</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">PS: did you also see the JSONClient.java example linked under <a href="https://docs.openmicroscopy.org/omero/5.4.6/developers/json-api.html#getting-started" class="">https://docs.openmicroscopy.org/omero/5.4.6/developers/json-api.html#getting-started</a> ?</div>
<div class="">Is that any use to you?</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On 7 Aug 2018, at 07:33, Manuel Stritt <<a href="mailto:manuel.stritt@idorsia.com" class="">manuel.stritt@idorsia.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">Hi Damir,
<div class=""><br class="">
</div>
<div class="">thanks a lot for that.</div>
<div class=""><br class="">
</div>
<div class="">Here you do the logout via the URL /webclient/logout/</div>
<div class="">And for the login you are using /webclient/login/</div>
<div class=""><br class="">
</div>
<div class="">According to the documentation</div>
<div class=""><a href="https://docs.openmicroscopy.org/omero/5.4.7/developers/json-api.html#getting-started" class="">https://docs.openmicroscopy.org/omero/5.4.7/developers/json-api.html#getting-started</a><br class="">
</div>
<div class="">I'm using the URL</div>
<div class="">/api/v0/login/</div>
<div class="">for login instead. </div>
<div class="">So should we use the /webclient/ methods or the /api/v0/ methods?</div>
<div class=""><br class="">
</div>
<div class="">Unfortunately there's no /api/v0/logout/ available, this only works via /webclint/logout/.</div>
<div class=""><br class="">
</div>
<div class="">Or can these two be combined, e.g. login with /api/v0/login/ and logout via /webclient/logout/ ?</div>
<div class=""><br class="">
</div>
<div class="">Regards,</div>
<div class="">Manuel</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="gmail_extra"><br class="">
<div class="gmail_quote">On Mon, Aug 6, 2018 at 10:06 PM, Damir Sudar <span dir="ltr" class="">
<<a href="mailto:dsudar@lbl.gov" target="_blank" class="">dsudar@lbl.gov</a>></span> wrote:<br class="">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="auto" class="">Hi Manuel,
<div class=""><br class="">
</div>
<div class="">Roger Noble from Zegami put together a small python program to connect to an OMERO server via the webgateway and retrieve data and visualizations. Originally that was developed for public repositories such as IDR, but I submitted some code to
 enable it to work with non public servers with full authentication which is now integrated into that package. I used the python requests package to handle opening and closing the session. See: <br class="">
<a href="https://github.com/zegami/omero-idr-fetch" target="_blank" class="">https://github.com/zegami/<wbr class="">omero-idr-fetch</a></div>
<div class=""><br class="">
</div>
<div class="">Cheers,</div>
<div class="">Damir</div>
<div class=""><br class="">
<div id="m_945901052266033364AppleMailSignature" class="">Sent from my iPad, please excuse poor spelling</div>
<div class=""><br class="">
On Aug 6, 2018, at 08:20, Manuel Stritt <<a href="mailto:manuel.stritt@idorsia.com" target="_blank" class="">manuel.stritt@idorsia.com</a>> wrote:<br class="">
<br class="">
</div>
<blockquote type="cite" class="">
<div class="">
<div dir="ltr" class="">
<div class="">Dear all,<br class="">
</div>
<div class=""><br class="">
</div>
<div class="">one more question regarding the webgateway. Currently I </div>
<div class="">- get a crsf-token</div>
<div class="">- login using the crsf-token and get a session-id</div>
<div class="">- do <a href="http://s.th/" target="_blank" class="">s.th</a>. e.g. query image data</div>
<div class=""><br class="">
</div>
<div class="">now - should I not close the session or do a logout at the end?</div>
<div class=""><br class="">
</div>
<div class="">I guess it will timeout after a while.  So is it correct to just create new sessions / login calls - or is there a way to close it?</div>
<div class=""><br class="">
</div>
<div class="">Regards,</div>
<div class="">Manuel</div>
<div class=""> <br class="">
</div>
<br class="">
<div class="gmail_extra">
<div class="gmail_quote"><br class="">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="">
<div dir="ltr" class="">
<div class="">Hi Manuel</div>
<div class=""><br class="">
</div>
<div class="">You'll always need to create a web Django session. Have you seen <a href="https://docs.openmicroscopy.org/omero/5.4.7/developers/json-api.html#getting-started" target="_blank" class="">
https://docs.openmicroscopy.or<wbr class="">g/omero/5.4.7/developers/json-<wbr class="">api.html#getting-started</a> ? It includes an example of using Python to log in to web.</div>
<div class=""><br class="">
</div>
<div class="">Simon<br class="">
</div>
<div class=""><br class="">
</div>
</div>
<div class="gmail_extra"><br class="">
<div class="gmail_quote">On 3 August 2018 at 15:05, Manuel Stritt <span dir="ltr" class="">
<<a href="mailto:manuel.stritt@idorsia.com" target="_blank" class="">manuel.stritt@idorsia.com</a>></span> wrote:<br class="">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr" class="">Dear all,
<div class=""><br class="">
</div>
<div class="">I'm using the webgateway to programmatically e.g. download images. That works if a user used the web viewer before and logged in there,</div>
<div class="">but it would be nice to use the webgateway completely programmatically without user interaction.</div>
<div class=""><br class="">
</div>
<div class="">Is there a way to perform an authentication via rest-API / webgateway directly?</div>
<div class=""><br class="">
</div>
<div class="">Regards,</div>
<div class="">Manuel<br clear="all" class="">
<div class=""><br class="">
</div>
<br class="">
</div>
</div>
<br class="">
<div class=""><br class="">
</div>
<div class="">
<div class=""><font size="2" class="">The information of this email and in any file transmitted with it is strictly confidential and may be legally privileged.</font></div>
<div class=""><font size="2" class="">It is intended solely for the addressee. If you are not the intended recipient, any copying, distribution or any other use of this email is prohibited and may be unlawful. In such case, you should please notify the sender
 immediately and destroy this email.</font></div>
<div class=""><font size="2" class="">The content of this email is not legally binding unless confirmed by letter.</font></div>
<div class=""><font size="2" class="">Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of the sender's company.</font></div>
</div>
<br class="">
______________________________<wbr class="">_________________<br class="">
ome-devel mailing list<br class="">
<a href="mailto:ome-devel@lists.openmicroscopy.org.uk" target="_blank" class="">ome-devel@lists.openmicroscopy<wbr class="">.org.uk</a><br class="">
<a href="http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel" rel="noreferrer" target="_blank" class="">http://lists.openmicroscopy.or<wbr class="">g.uk/mailman/listinfo/ome-deve<wbr class="">l</a><br class="">
<br class="">
</blockquote>
</div>
<br class="">
</div>
<br class="">
<span style="font-size:10pt" class="">The University of Dundee is a registered Scottish Charity, No: SC015096</span>
</div>
<br class="">
______________________________<wbr class="">_________________<br class="">
ome-devel mailing list<br class="">
<a href="mailto:ome-devel@lists.openmicroscopy.org.uk" target="_blank" class="">ome-devel@lists.openmicroscopy<wbr class="">.org.uk</a><br class="">
<a href="http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel" rel="noreferrer" target="_blank" class="">http://lists.openmicroscopy.or<wbr class="">g.uk/mailman/listinfo/ome-deve<wbr class="">l</a><br class="">
<br class="">
</blockquote>
</div>
<br class="">
<br class="">
</div>
</div>
<br class="">
<div class=""><br class="">
</div>
<div class="">
<div class=""><font size="2" class="">The information of this email and in any file transmitted with it is strictly confidential and may be legally privileged.</font></div>
<div class=""><font size="2" class="">It is intended solely for the addressee. If you are not the intended recipient, any copying, distribution or any other use of this email is prohibited and may be unlawful. In such case, you should please notify the sender
 immediately and destroy this email.</font></div>
<div class=""><font size="2" class="">The content of this email is not legally binding unless confirmed by letter.</font></div>
<div class=""><font size="2" class="">Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of the sender's company.</font></div>
</div>
</div>
</blockquote>
<blockquote type="cite" class="">
<div class=""><span class="">______________________________<wbr class="">_________________</span><br class="">
<span class="">ome-devel mailing list</span><br class="">
<span class=""><a href="mailto:ome-devel@lists.openmicroscopy.org.uk" target="_blank" class="">ome-devel@lists.<wbr class="">openmicroscopy.org.uk</a></span><br class="">
<span class=""><a href="http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel" target="_blank" class="">http://lists.openmicroscopy.<wbr class="">org.uk/mailman/listinfo/ome-<wbr class="">devel</a></span><br class="">
</div>
</blockquote>
</div>
</div>
<br class="">
______________________________<wbr class="">_________________<br class="">
ome-devel mailing list<br class="">
<a href="mailto:ome-devel@lists.openmicroscopy.org.uk" class="">ome-devel@lists.<wbr class="">openmicroscopy.org.uk</a><br class="">
<a href="http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel" rel="noreferrer" target="_blank" class="">http://lists.openmicroscopy.<wbr class="">org.uk/mailman/listinfo/ome-<wbr class="">devel</a><br class="">
<br class="">
</blockquote>
</div>
<br class="">
<br clear="all" class="">
<div class=""><br class="">
</div>
</div>
</div>
<br class="">
<div class=""><br class="">
</div>
<div class="">
<div class=""><font size="2" class="">The information of this email and in any file transmitted with it is strictly confidential and may be legally privileged.</font></div>
<div class=""><font size="2" class="">It is intended solely for the addressee. If you are not the intended recipient, any copying, distribution or any other use of this email is prohibited and may be unlawful. In such case, you should please notify the sender
 immediately and destroy this email.</font></div>
<div class=""><font size="2" class="">The content of this email is not legally binding unless confirmed by letter.</font></div>
<div class=""><font size="2" class="">Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of the sender's company.</font></div>
</div>
_______________________________________________<br class="">
ome-devel mailing list<br class="">
<a href="mailto:ome-devel@lists.openmicroscopy.org.uk" class="">ome-devel@lists.openmicroscopy.org.uk</a><br class="">
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
<br>
<span style="font-size:10pt;">The University of Dundee is a registered Scottish Charity, No: SC015096</span>
</body>
</html>