We're Hiring!

getting a session key easily

General user discussion about using the OMERO platform to its fullest. Please ask new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

There are workflow guides for various OMERO functions on our help site - http://help.openmicroscopy.org

You should find answers to any basic questions about using the clients there.

getting a session key easily

Postby dsudar » Sat Jul 25, 2015 7:40 pm

Hi all,
I've been trying to automate various parts of our workflow using shell scripts and such and am finding that it would be very convenient to be able to simply get the session key of a session I just opened. Sure, I could extricate it from the "bin/omero sessions list" output but I keep thinking it would be so easy if the return value from "bin/omero login" were to be that session key or if there were an additional subcommand such as "bin/omero sessions getkey" that would return the most recent active session. Possible consideration?
Thanks,
- Damir
dsudar
 
Posts: 235
Joined: Mon May 14, 2012 8:43 pm
Location: Berkeley, CA, USA

Re: getting a session key easily

Postby sbesson » Mon Jul 27, 2015 7:16 am

Hi Damir,

thanks for the feedback. You are right that there is not direct way to retrieve the session key at the moment. Your best workaround might be to use the output of the file subcommand, e.g.

Code: Select all
$ key=$(basename $(dist/bin/omero sessions file))
$ echo $key
d8b1159f-a56f-4306-9779-46da4cb100e6


We have a list of various CLI enhancements we consider for implementation in the near future. A specific `bin/omero sessions key` subcommand has already been listed so now may be a good time to have it implemented. We will keep you posted.

Best,
Sebastien
User avatar
sbesson
Team Member
 
Posts: 421
Joined: Tue Feb 28, 2012 7:20 pm


Return to User Discussion

Who is online

Users browsing this forum: No registered users and 1 guest