Thanks John.
Not sure what I am doing wrong, but in my hands it does not work. No errors but 
there is no file upload either.

ToolsClient toolsClient = galaxyInstance.getToolsClient();
ClientResponse result = toolsClient.fileUploadRequest(history.getId(), "txt", 
"whatIsAdbKey?", new 
File("C:\\Users\\mlogghe\\Documents\\bb3d562ec52a9fc5.yml"));
System.out.println(result.getClientResponseStatus());

In paster.log I also do not see any evidence that upload_handler is called.

Regards,
Marc

-----Original Message-----
From: jmchil...@gmail.com [mailto:jmchil...@gmail.com] On Behalf Of John Chilton
Sent: Thursday, April 04, 2013 3:40 PM
To: Marc Logghe
Cc: galaxy-dev@lists.bx.psu.edu
Subject: Re: [galaxy-dev] REST API: upload of dataset to history possible ?

On Tue, Apr 2, 2013 at 5:23 AM, Marc Logghe <marc.log...@ablynx.com> wrote:
> Hi,
>
> Is it currently possible to upload an input dataset to a history via the
> REST API ?

This has been possible since pull request 94:
https://bitbucket.org/galaxy/galaxy-central/pull-request/94/enable-upload-of-files-to-history-through/diff.
The idea is to use the tools API and to invoke the upload1 tool. I
imagine this is a little tricky to do with the bioblend Python library
right now, but the blend4j Java library has a high-level helper
function (ToolsClient.fileUploadRequest) to make this pretty simple:

https://github.com/jmchilton/blend4j/blob/master/src/main/java/com/github/jmchilton/blend4j/galaxy/ToolsClient.java

-John


> Or should one use a library dataset instead ?
>
> But in the latter case, only an admin can upload data, right ?
>
>
>
> Thanks,
>
> Marc
>
> ________________________________________
> THIS E-MAIL MESSAGE IS INTENDED ONLY FOR THE USE OF THE INDIVIDUAL OR ENTITY
> TO WHICH IT IS ADDRESSED AND MAY CONTAIN INFORMATION THAT IS PRIVILEGED,
> CONFIDENTIAL AND EXEMPT FROM DISCLOSURE.
> If the reader of this E-mail message is not the intended recipient, you are
> hereby notified that any dissemination, distribution or copying of this
> communication is strictly prohibited. If you have received this
> communication in error, please notify us immediately at abl...@ablynx.com.
> Thank you for your co-operation.
> "NANOBODY" and "NANOCLONE" are registered trademarks of Ablynx N.V.
> ________________________________________
>
>
> ___________________________________________________________
> 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/
________________________________________
THIS E-MAIL MESSAGE IS INTENDED ONLY FOR THE USE OF THE INDIVIDUAL OR ENTITY TO 
WHICH IT IS ADDRESSED AND MAY CONTAIN INFORMATION THAT IS PRIVILEGED, 
CONFIDENTIAL AND EXEMPT FROM DISCLOSURE. 
If the reader of this E-mail message is not the intended recipient, you are 
hereby notified that any dissemination, distribution or copying of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately at abl...@ablynx.com. Thank you for your 
co-operation. 
"NANOBODY" and "NANOCLONE" are registered trademarks of Ablynx N.V. 
________________________________________


___________________________________________________________
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/

Reply via email to