foojayio / discoapi

The foojay discovery api (discoapi) is made to discover java packages (jre/jdk) from different distributions.
GNU General Public License v2.0
111 stars 13 forks source link

oracle distros < 17 disapperared #42

Closed marchof closed 2 years ago

marchof commented 2 years ago

Hi, it looks like the oracle distros disappeared. In particular the following queries only returns Java 17 packages:

https://api.foojay.io/disco/v2.0/packages?distro=oracle

These queries now return empty results:

https://api.foojay.io/disco/v2.0/packages?version=11&distro=oracle

marchof commented 2 years ago

Interestingly this endpoint still reports that the versions are available:

https://api.foojay.io/disco/v2.0/distributions

HanSolo commented 2 years ago

The problem is related to the fact that now Oracle also offers packages that are directly downloadable. As a workaround you might want to use:

Not directly downloadable: https://api.foojay.io/disco/v2.0/packages?distro=oracle&directly_downloadable=false

Directly downloadable: https://api.foojay.io/disco/v2.0/packages?distro=oracle&directly_downloadable=true

I will look into this asap, thx for the heads up.

marchof commented 2 years ago

Thanks!

BTW, same problem with redhat

HanSolo commented 2 years ago

ok...will check that too 👍🏻

HanSolo commented 2 years ago

With the latest deployment the following calls should work as expected: https://api.foojay.io/disco/v2.0/packages?distro=oracle https://api.foojay.io/disco/v2.0/packages?distro=redhat

When calling: https://api.foojay.io/disco/v2.0/packages?version=11&distro=oracle

You need to add ?latest=all_of_version as follows: https://api.foojay.io/disco/v2.0/packages?version=11&distro=oracle&latest=all_of_version

marchof commented 2 years ago

@HanSolo So you mean I should now use latest=all_of_version instead of latest=available? Does it then return the same results as before?

marchof commented 2 years ago

latest=all_of_version does something different: It lists all update versions, not just the current.

What is the new API to get the latest version of a specific feature release and distribution?

HanSolo commented 2 years ago

Ok, so I thought by asking just for 11 with https://api.foojay.io/v2.0/packages?version=11&distro=oracle you would like to see all available version of JDK 11 from Oracle and for this you need to add &latest=all_of_version. If you would like to see the latest version of a specific feature release and distribution it is &latest=available (which is 11.0.12 for Oracle JDKs).

marchof commented 2 years ago

I can confirm

https://api.foojay.io/disco/v2.0/packages?version=11&distro=oracle&latest=available

works again as expected. Thanks!