Question: Galaxy Api run tool
0
gravatar for chavaldranis
14 days ago by
chavaldranis0 wrote:

Hello,

I have some issue to use the galaxy api to start a job.

From : https://docs.galaxyproject.org/en/master/_modules/galaxy/webapps/galaxy/api/tools.html#ToolsController.create

I'm using this command

curl -X POST -H "Content-Type: application/json" -d '{"key":"my_key","tool_id":"Show beginning1","tool_version":"1.0.0","inputs":{"lineNum":10,"input":{"values":[{"src":"hda","name":"Select first on data 18","tags":[],"keep":false,"hid":19,"id":"bbd44e69cb8906b5fc5c181d22be27d6"}],"batch":false}}}' https://usegalaxy.org/api/tools

And I got this error msg {"err_msg": "API authentication required for this request", "err_code": 403001}

Anyone have an idea or have an example of this kind of command working ?

tool api • 92 views
ADD COMMENTlink written 14 days ago by chavaldranis0
0
gravatar for Martin Čech
13 days ago by
Martin Čech ♦♦ 4.7k
United States
Martin Čech ♦♦ 4.7k wrote:

I assume in the actual call you replace my_key with your actual API key. Is that correct?

edit: check out the Galaxy API library for Python: http://bioblend.readthedocs.io/en/latest/api_docs/galaxy/all.html#bioblend.galaxy.tools.ToolClient.run_tool

ADD COMMENTlink modified 13 days ago • written 13 days ago by Martin Čech ♦♦ 4.7k

Yes I replace my_key with my actual API key.

Actually, I would like to make it work without using python :/

ADD REPLYlink modified 13 days ago • written 13 days ago by chavaldranis0

I tried with the Galaxy API library for Python, to check if I can make it work

from bioblend import galaxy

gi = galaxy.GalaxyInstance(url='https://usegalaxy.org/', key='011d381c1...')
inputs = {"lineNum":10,"input":{"values":[{"src":"hda","name":"Select first on data 18","tags":[],"keep":False,"hid":19,"id":"bbd44e69cb8906b5fc5c181d22be27d6"}],"batch":False}}
gi.tools.run_tool(history_id='3efc1e4fbcc09bd8',tool_id='Show beginning1',tool_inputs=inputs)

And it works. I'm wondering what's wrong in the first command

ADD REPLYlink written 12 days ago by chavaldranis0

I am no curl guru so I would probably catch/log the requests and compare them.

ADD REPLYlink written 12 days ago by Martin Čech ♦♦ 4.7k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 108 users visited in the last hour