Downloads REST API

This document describes the API exposed under https://downloads.mariadb.org/rest-api/. The API aims to facilitate the following operations:

  • Get a list of products available for download. (MariaDB Server, different connectors, other miscellaneous files)
  • Get a list of major releases – per product.
  • Get a list of point releases – per major release of a product.
  • Get a list of files available for each point release.
  • Download files using a unique id or the file name.
  • Get a list of available mirrors to download files from.

All products

URL Endpoint: https://downloads.mariadb.org/rest-api/products/
Sample URL: https://downloads.mariadb.org/rest-api/products/
HTTP Request Type: GET
URL GET Parameters: N/A
Response type: application/json
Response format:

{
  products_list: [
    {
      "product_id": <str:product-id>
      "name": <str:product-name>
      "description": <str:product-description>
      "license": <str:product-license>
    },
  ...
  ]
}

List of major & minor releases

URL Endpoint: https://downloads.mariadb.org/rest-api/<str:product-id>/
Sample URL: https://downloads.mariadb.org/rest-api/mariadb/
HTTP Request TypeGET
URL GET Parameters: N/A
Response type: application/json
Response format:

{
  "major_releases": [
    {
      "release_id": <str:release-id>,
      "release_name": <str:release-id>,
      "release_status": <str:release-status>
    },
    ...
  ]
}

List of point releases

URL Endpoint: https://downloads.mariadb.org/rest-api/<str:product-id>/<str:release_id>
Sample URL: https://downloads.mariadb.org/rest-api/mariadb/10.5/
HTTP Request TypeGET
URL GET Parameters: N/A
Response type: application/json
Response format:

{
  "releases": [
    {
      "release_id": "<str:point-release-id>",
      "release_name": "<str:point-release-name>",
      "date_of_release": <str:point-release-date>, // Format: YYYY-MM-DD,
      "release_status": <str:point-release-status>
    },
    ...
  ]
}

List of files for a release

URL Endpoint: https://downloads.mariadb.org/rest-api/<str:product-id>/<str:point-release_id>
Sample URL: https://downloads.mariadb.org/rest-api/mariadb/10.5.4/
HTTP Request TypeGET
URL GET Parameters: N/A
Response type: application/json
Response format:

{
  "release_data": {
    "release_id": <str:point-release-id>,
    "release_name": <str:point-release-name>,
    "date_of_release": <str:point-release-date> // Format: YYYY-MM-DD
    "release_notes_url": <str:release-notes-url>,
    "change_log": <str:change-log-url>,
    "files": [
      {
        "file_id": <str:file-id>,
        "file_name": <str:file-name>,
        "package_type": <str:package-type>,
        "os": <str:os>,
        "cpu": <str:cpu>,    // may be null
        "checksum": {
          "md5sum": <str:md5sum>,        // may be null
          "sha1sum": <str:sha1sum>,      // may be null
          "sha256sum": <str:sha256sum>,  // may be null
          "sha512sum": <str:sha512sum>   // may be null
        },
        "signature": <str:gpg-signature>
      },
      ...
    ]
  }
}

Download a file

Downloading by ID

There are two options available to download a specific file by ID, a shorter URL and a longer URL, both with the same outcome. By default, the file download will use a mirror that is closest geographically based on the IP the request comes from. In case there is a broken mirror, one can force a specific mirror based on a mirror-id which can be retrieved via the REST API provided to list all mirrors.

The long URL:

URL Endpoint: https://downloads.mariadb.org/rest-api/<str:product-id>/<str:point-release_id>/<int:file-id>
Sample URL: https://downloads.mariadb.org/rest-api/mariadb/10.5.4/10488
HTTP Request TypeGET
URL GET Parameters: mirror=<str:mirror-id> (optional, choose specific mirror to download from)

The short URL:

URL Endpoint: https://downloads.mariadb.org/rest-api/<int:file-id>
Sample URL: https://downloads.mariadb.org/rest-api/10488
HTTP Request TypeGET
URL GET Parameters: mirror=<str:mirror-id> (optional, choose specific mirror to download from)

Downloading by file name

Instead of using the file id, one can use the file name. This feature is provided to allow for human readability of HTTP requests. Instead of a number, it is very clear which file is downloaded, just by reading the URL. The optional GET parameter functions the same as for the download by ID case.

URL Endpoint: https://downloads.mariadb.org/rest-api/<str:product-id>/<str:point-release_id>/<str:file-name>
Sample URL: https://downloads.mariadb.org/rest-api/mariadb/10.5.4/mariadb-10.5.4-linux-systemd-x86_64.tar.gz
HTTP Request TypeGET
URL GET Parameters: mirror=<str:mirror-id> (optional, choose specific mirror to download from)

List available mirrors

There are download mirrors available all across the globe, for faster and easier downloads. The MariaDB Foundation seeks to maintain the list up-to-date. The list is provided grouped by country.

URL Endpoint: https://downloads.mariadb.org/rest-api/mirrors
Sample URL: https://downloads.mariadb.org/rest-api/mirrors
HTTP Request TypeGET
URL GET Parameters: N/A
Response format:

{
   "mirror_list":{
     <str:short-country-code>: [
       {
         "mirror_id": <str:mirror-id>,
         "mirror_name": <str:mirror-name>,
         "country": <str:long-country-name>
       },
       ...
     ],
     <str:short-country-code>: [
       {
         "mirror_id": <str:mirror-id>,
         "mirror_name": <str:mirror-name>,
         "country": <str:long-country-name>
       },
     ]
     ...
 }