Visit Azul.com Support

Using Azul Metadata API for Zulu

Table of Contents
Need help?
Schedule a consultation with an Azul performance expert.
Contact Us

This section explains how to use the Azul Metadata API.

Note
Please check out "Transition from Zulu OpenJDK Discovery API to Azul Metadata API" if you used the Zulu Discovery API (api.azul.com/zulu/download) in the past and want to migrate to this new Azul Metadata API (api.azul.com/metadata/v1).

About the API

The Azul Metadata API is a free utility for viewing metadata and downloading Azul Zulu Builds of OpenJDK. Documentation on API endpoints can be found on api.azul.com/metadata/v1/docs/swagger.

Azul Metadata API screenshot

Via the Swagger UI, the API can be called to try the various APIs and filtering options, and also presents you with the CURL command to get the same results through the terminal.

Searching a Zulu Version

Note
This is just an example at the time of the document being written. You may see a different output depending on the currently available Java versions.

For instance, to find the Zulu downloads with the following criteria:

  • java_version: 21

  • os: macos

  • arch: arm

  • javafx_bundled: `true

the following CURL command is returned:

 
curl -X GET \ "https://api.azul.com/metadata/v1/zulu/packages/?java_version=21&os=macos&arch=arm&java_package_type=jdk&javafx_bundled=true&release_status=ga&availability_types=CA&certifications=tck&page=1&page_size=100" \ -H "accept: application/json"

This returns the following result:

 
[ { "availability_type": "CA", "distro_version": [ 21, 36, 17, 0 ], "download_url": "https://cdn.azul.com/zulu/bin/zulu21.36.17-ca-fx-jdk21.0.4-macosx_aarch64.zip", "java_version": [ 21, 0, 4 ], "latest": true, "name": "zulu21.36.17-ca-fx-jdk21.0.4-macosx_aarch64.zip", "openjdk_build_number": 7, "package_uuid": "2385ab1d-b206-4797-8557-eb202e1042d1", "product": "zulu" }, ... ]

Download Zulu

The returned data contains the download_url field that contains a direct link to the download file of the Zulu version.

In case of the previous example:

 
"download_url": "https://cdn.azul.com/zulu/bin/zulu21.36.17-ca-fx-jdk21.0.4-macosx_aarch64.zip"
Note
Packages retrieved with the filter availability-type=sa can only be downloaded by authenticating with an API token. Customers with a support contract can contact Azul Support ([email protected]) to get such a token.

Data Model

The Swagger UI also provides more info about the JSON data model that is returned by the API and can be opened to learn more about all the fields.

Azul Metadata API - JSON data model screenshot