gbif / gbif-api

GBIF API
Apache License 2.0
27 stars 5 forks source link

Access most recent backbone version programatically #111

Closed davidorme closed 7 months ago

davidorme commented 7 months ago

We want to be able to access different backbone taxonomy versions by date. If a user provides a date, we can check to see if a directory exists at https://hosted-datasets.gbif.org/datasets/backbone/YYYY-MM-DD/. If a user doesn't provide a date, we want to use the most current version - we can access that data at https://hosted-datasets.gbif.org/datasets/backbone/current/ but we also want to retrieve the date to identify the version.

In the past, we used the JSON data from https://api.gbif.org/v1/dataset/d7dddbf4-2cf0-4f39-9b2a-bb099caae36c, which provided the date under the pubDate key, but that key has disappeared. We could parse the HTML from the table on the hosted-datasets page but that seems a little clunky! Is there a canonical API for of the current backbone version date? It looks like taking the date the modified key from the dataset JSON data might work, but I don't know if that is guaranteed.

mdoering commented 7 months ago

It is an oversight from our side that pubDate is not set in this version. I have fixed this manually for now and we'll make sure it exists in any follow up releases!