Hi Neil,
to import all published workflows you can use a script like this:

import sys
sys.path.insert(1, 'galaxy-central/scripts/api')
import common
api_key = 'YOUR_USER_API_KEY'
workflows = common.get(api_key, 'http://YOUR_SERVER/api/workflows?show_published=True') published_workflow_ids = [str(workflow[u'id']) for workflow in workflows if bool(workflow[u'published'])]
for pw_id in published_workflow_ids:
    data['workflow_id'] = pw_id
common.post(api_key, 'http://YOUR_SERVER/api/workflows/import', data)


Il 2014-01-19 03:12 neil.burd...@csiro.au ha scritto:
Hi Nicola,
                that is exactly what I'm looking for, however, how do
I execute the script/tool? I would like to import all published
workflows. What is the name of the script to run and the arguments ?
Can you give an example please?

Thanks again

Date: Fri, 17 Jan 2014 11:36:03 +0100
From: Nicola Soranzo <sora...@crs4.it>
To: <galaxy-dev@lists.bx.psu.edu>
Subject: Re: [galaxy-dev] Import workflows via API
Message-ID: <d834d247437269704a26e8bbf8f67...@crs4.it>
Content-Type: text/plain; charset=UTF-8; format=flowed

Il 2014-01-17 06:45 neil.burd...@csiro.au ha scritto:

 I execute workflows via the API. However, if I want another user to
use my workflows, I can publish my workflows, but the new user then
has to go on to the web browser and import this workflow.

Is there a method/script which I can call via the API which can
all available (published) workflows so the user doesn't have to click
a button on the web browser "import workflow" ?

Thanks for any help

Hi Neil,
you are very lucky, just yesterday my pull request implementing exactly
this has been merged in galaxy-central:


and is also available in BioBlend thanks to my colleague Simone Leo:



Nicola Soranzo, Ph.D.
Bioinformatics Program, CRS4
Loc. Piscina Manna, 09010 Pula (CA), Italy

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:

To search Galaxy mailing lists use the unified search at:

Reply via email to