two versions of show datasets API call?
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/cb5d... 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
This is a using-the-API question; not sure if it belongs in galaxy-dev or galaxy-user !
galaxy-dev is best because it's dealing with the development of Galaxy.
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. ... 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?
Historical reasons only; this should be fixed. Nuwan had a pull request along these lines that I've asked for modifications to before accepting: https://bitbucket.org/galaxy/galaxy-central/pull-request/70/modified-api-to-... Best, J.
Historical reasons only; this should be fixed.
And this is now fixed. Take a look at these changesets for details: https://bitbucket.org/galaxy/galaxy-central/commits/579c0b64e463918691bb38e7... https://bitbucket.org/galaxy/galaxy-central/commits/ef7f32032b55995657d15af8... Best, J.
participants (2)
-
Clare Sloggett
-
Jeremy Goecks