Do the APIs produce the proper CORS headers?   Access-Control-Allow-Origin:
*,  and responding to OPTIONS requests would be enough.  Since this is an
API protected by a key, this doesn't have any real security implications to
just have hard-coded in.

Rob
On Oct 23, 2012 9:59 PM, "Brad Chapman" <chapm...@50mail.com> wrote:

>
> Erik and Jeremy;
>
> >> I am a JBrowse Dev hoping to add the ability to export data directly
> >> from JBrowse (JavaScript) to Galaxy
> >
> > The API could be used for this.
> >
> > Specifically, you could do an upload for the user from a URL via the
> > tools API. I know that Brad Chapman (cc'd) has done this successfully
> > recently. Brad, can you share the parameters used to do this?
>
> Definitely, you want to do a POST to:
>
> /api/tools?key=YOURAPIKEY
>
> with a JSON payload of:
>
> {"tool_id": "upload1",
>  "history_id": "identifier of history to use",
>  "params": {"file_type": "vcf",
>             "dbkey": "hg19",
>             "files_0|url_paste":
> http://jbrowse-server.org/path/to/file.vcf";,
>             "files_0|NAME": "file_name_for_history.vcf"}}
>
> This is all new since the last galaxy-dist release, so you'd need a
> recent galaxy-central server.
>
> Passing it back to Jeremy, there is also a Javascript wrapper around the
> tools API which might help:
>
>
> https://bitbucket.org/galaxy/galaxy-central/src/tip/static/scripts/mvc/tools.js
>
> but I haven't used it myself. Hope this helps,
> Brad
>
> ___________________________________________________________
> 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/
>
___________________________________________________________
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/

Reply via email to