Re: [galaxy-dev] How to get an API key during execution?

2013-12-10 Thread Dannon Baker
Hi Neil,

You'll want to look at the users API controller, specifically the api_key
method.  Your downstream tool could, upon receiving an empty API key from
the wrapper, generate a new key and use it (after which it'd also be
available to the user).


On Thu, Dec 5, 2013 at 9:05 PM, neil.burd...@csiro.au wrote:

  Hi,
 I know that if I put :

 ${ __app__.model.User.get( $__user_id__ ).api_keys[0].key }

 in my tools xml file I am able to get the current api key.

 The xml calls my python script with this value, which i then use to
 execute workflows via the API.

 However, if this is value empty/blank is there a way I can generate an api
 key it from within my python script. i.e. is there a method I can call
 which would generate this for me?

 Thanks
 Neil

 ___
 Please keep all replies on the list by using reply all
 in your mail client.  To manage your subscriptions to this
 and other Galaxy lists, please use the interface at:
   http://lists.bx.psu.edu/

 To search Galaxy mailing lists use the unified search at:
   http://galaxyproject.org/search/mailinglists/

___
Please keep all replies on the list by using reply all
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/

[galaxy-dev] How to get an API key during execution?

2013-12-05 Thread Neil.Burdett
Hi,
I know that if I put :

${ __app__.model.User.get( $__user_id__ ).api_keys[0].key }

in my tools xml file I am able to get the current api key.

The xml calls my python script with this value, which i then use to execute 
workflows via the API.

However, if this is value empty/blank is there a way I can generate an api key 
it from within my python script. i.e. is there a method I can call which would 
generate this for me?

Thanks
Neil
___
Please keep all replies on the list by using reply all
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/