API for Ubuntu releases

Robie Basak robie.basak at ubuntu.com
Mon Apr 29 08:51:29 UTC 2019


On Mon, Apr 22, 2019 at 08:39:27PM +0200, Michal Stanke wrote:
> I wanted to ask if there is any API or machine friendly format with the
> list of Ubuntu releases, which would be updated when a new version is out
> too.

Fetch JSON from https://api.launchpad.net/devel/ubuntu/series

Then look at "Status".

Documentation:

https://launchpad.net/+apidoc/devel.html#distribution
https://launchpad.net/+apidoc/devel.html#distro_series

An alternative is to use the "distro-info" package, but that (actually
"distro-info-data" that it depends on) isn't usually updated straight
away. Come to think of it, I'm not sure exactly when the series status
is changed on Launchpad, either.

Another alternative is to watch the simplestreams data for cloud image
downloads:
http://cloud-images.ubuntu.com/releases/streams/v1/com.ubuntu.cloud:released:download.json

Note that in this API a bunch the product identifiers are arbitrary and
you shouldn't rely on them. Instead filter for "well-known" keys, such as
"arch", "release", "release_title" or "version". The presence of an
entry with keys that match tells you that such a thing is available, but
more entry types may become available in the future during the lifetime
of a release, such as new types or encodings of images, images with
different sorts of kernels, and so on.

HTH,

Robie
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-release/attachments/20190429/58d1bb5e/attachment.sig>


More information about the Ubuntu-release mailing list