Hi all,

This is a using-the-API question; not sure if it belongs in galaxy-dev or
galaxy-user !

There seem to be two ways to retrieve metadata for a dataset, one in the
Histories API and one in the Datasets API. They return different
information.

So for instance if I call
http://galaxy-vic.genome.edu.au/api/datasets/cb5d3b9eef2b9275?key=myapikey
I see

{
    "data_type": "fastqsanger",
    "deleted": false,
    "file_size": 16439610,
    "genome_build": "?",
    "id": 397,
    "metadata_data_lines": null,
    "metadata_dbkey": "?",
    "metadata_sequences": null,
    "misc_blurb": "15.7 MB",
    "misc_info": "uploaded fastqsanger file",
    "model_class": "HistoryDatasetAssociation",
    "name": "https://bioblend.s3.amazonaws.com/C1_R1_1.chr4.fq";,
    "purged": false,
    "state": "ok",
    "visible": true
}

But if I call 
http://galaxy-vic.genome.edu.au/api/histories/fb4122d2ca33443e/contents/cb5d3b9eef2b9275?key=myapikey

I see

{
    "accessible": true,
    "api_type": "file",
    "data_type": "fastqsanger",
    "deleted": false,
    "display_apps": [],
    "download_url": "/datasets/cb5d3b9eef2b9275/display?to_ext=fastqsanger",
    "file_ext": "fastqsanger",
    "file_name": "/mnt/all/cloudman/galaxy/clare/files/000/dataset_375.dat",
    "file_size": 16439610,
    "genome_build": "?",
    "hid": 1,
    "history_id": "fb4122d2ca33443e",
    "id": "cb5d3b9eef2b9275",
    "metadata_data_lines": null,
    "metadata_dbkey": "?",
    "metadata_sequences": null,
    "misc_blurb": "15.7 MB",
    "misc_info": "uploaded fastqsanger file",
    "model_class": "HistoryDatasetAssociation",
    "name": "https://bioblend.s3.amazonaws.com/C1_R1_1.chr4.fq";,
    "peek": "<table cellspacing=\"0\"
cellpadding=\"3\"><tr><td>@9453842/1</td></tr><tr><td>CAGATTATGGAATCACTTGAAACTGATATTAATTGCCGAAAGATGCATCTTTCACGAAAATTAGGAAATGTTGCT</td></tr><tr><td>+</td></tr><tr><td>IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII</td></tr><tr><td>@9454359/1</td></tr><tr><td>GGAAATGAGTACAGCTATGCAACAGCTATCAGTAAGGCAAAACGAAGAGTTTGATACTATTTCTGCATTAAAAGA</td></tr></table>",
    "purged": false,
    "state": "ok",
    "visible": true,
    "visualizations": []
}


The second version gives me much more information, including the History ID
(but ironically requires the History ID to make the call in the first
place). What I would ideally like is an API call which only requires
knowledge of the Dataset ID but provides all the information in the second
call.

I am also a bit confused by the existence of the two different methods in
the first place. Is it necessary for it to be this way, or are they just
there for historical reasons?

If it would be desirable to either only have one show-dataset REST method
or to make the behaviour of the two identical, should I add a Trello card
for this?

Thanks,
Clare


-- 

Clare Sloggett
Research Fellow / Bioinformatician
Life Sciences Computation Centre
Victorian Life Sciences Computation Initiative
University of Melbourne, Parkville Campus
187 Grattan Street, Carlton, Melbourne
Victoria 3010, Australia
Ph: 03 903 53357          M: 0414 854 759
___________________________________________________________
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