Delete a record from a Tool Data Table via the Galaxy API

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Delete a record from a Tool Data Table via the Galaxy API

Dan Fornika
Hello,

I'm working on adding a feature to blend4j (java interface to the Galaxy API) to access Galaxy Tool Data Tables. My repository is here:


I'm working on a method that deletes entries from Galaxy Tool Data Tables, but I'm having some trouble with the API calls.

How can I construct a DELETE api call on an entry in a Tool Data Table? For example, how could I delete hg38 from the "igv_broad_genomes" tool data table (using Postman or curl or whatever HTTP client)? Specifically, how do I pass the extra argument(s) besides the table name (id) that goes in the URL?

In bioblend, we pass "a “|” separated list of column contents, there must be a value for all the columns of the data table"

I can see the "igv_broad_genomes" tool data table when I send a GET request:

GET /api/tool_data/igv_broad_genomes
{
    "model_class": "TabularToolDataTable",
    "name": "igv_broad_genomes",
    "columns": [
        "name",
        "url",
        "value"
    ],
    "fields": [
        [
            "A. baumannii str. ATCC",
            "ABaumannii_ATCC_17978"
        ],
        [
            "A. baumannii str. AYE",
            "ABaumannii_AYE_uid61637"
        ],
        ...(removed for brevity)...
        [
            "Human hg38",
            "hg38"
        ],
        ...(removed for brevity)...
    ]
}

The closest I've got is to send this:

DELETE /api/tool_data/igv_broad_genomes
Content-Type: application/json
{
"values": "Human hg38\thttp://<a href="http://s3.amazonaws.com/igv.broadinstitute.org/genomes/hg38.genome\thg38">s3.amazonaws.com/igv.broadinstitute.org/genomes/hg38.genome\thg38"
}

I get the same JSON description of the original Tool Data Table, including hg38:

{
    "model_class": "TabularToolDataTable",
    "name": "igv_broad_genomes",
    "columns": [
        "name",
        "url",
        "value"
    ],
    "fields": [
        [
            "A. baumannii str. ATCC",
            "ABaumannii_ATCC_17978"
        ],
        [
            "A. baumannii str. AYE",
            "ABaumannii_AYE_uid61637"
        ],
        ...(removed for brevity)...
        [
            "Human hg38",
            "hg38"
        ],
        ...(removed for brevity)...
    ]
}

___________________________________________________________
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:
  https://lists.galaxyproject.org/

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