GenSpectrum / LAPIS

An API, a query engine, and a database schema for genomic sequences; currently with a focus on SARS-CoV-2
https://lapis-three.vercel.app
GNU Affero General Public License v3.0
21 stars 5 forks source link

Improve docs on data formats #925

Open corneliusroemer opened 2 weeks ago

corneliusroemer commented 2 weeks ago

If I understand the docs correctly, I must send a POST to get metadata.tsv as opposed to JSON. Is that correct? Docs link: https://lapis-three.vercel.app/references/additional-request-properties/#data-format

If so, it would be nice to allow specifying the format via URL param, at least for common case of tsv, otherwise one can't request it quickly in the browser, and it's more complicated to do via curl as well.

Update, I missed the Note at the bottom - it's not very easy to find, rather than being a Note, this should be in the main text and also it should not refer to swagger (swagger is good but it's tedious, also chatgpt doesn't read swagger ;) )

Brave Browser 2024-08-31 21 17 01
chaoran-chen commented 2 weeks ago

You can also use the dataFormat parameter which is mentioned here but I agree that it is not mentioned clearly enough in the main text. Thanks for pointing this out!

Example: https://lapis.pathoplexus.org/ebola-sudan/sample/details?dataFormat=tsv&downloadAsFile=true

chaoran-chen commented 2 weeks ago

(You can also set the accept header in a GET request. I first misread your message/didn't read the note and thought that this is what you found out.)

fengelniederhammer commented 1 week ago

chatgpt doesn't read swagger

But it does read the OpenAPI spec (Swagger is also just a UI on top of that).

corneliusroemer commented 1 week ago

By reading I meant it reads it if Bing has indexed it - I'm not very sure that swagger gets indexed well by Bing.