Download API

API methods

The download API allows you to retrieve production or daily builds programmatically.

Warning

In order to be able to use the Download API the account associated must have accepted the EULA first, otherwise a EULA not accepted error will be returned. You can accept the license agreement at https://www.sidefx.com/services/eula/.

download.get_daily_builds_list(product, version=None, platform=None, only_production=False)

Returns a JSON list of all available daily builds based on the following filtering parameters:

product:

Product accepts the following values: houdini, houdini-py3, houdini-py37, houdini-py2, docker, sidefxlabs, houdini-launcher, houdini-launcher-py3, houdini-launcher-py37, launcher-iso, launcher-iso-py3, laucher-iso-py37, launcher-iso-py2

version: (optional)

The major version of Houdini. e.g. 16.5, 17.0. You can also request multiple versions by passing a list ['16.5', '17.0']

platform: (optional)

The operating system to install Houdini on: win64, macos, macosx_arm64, linux. Does not effect Docker and SideFXLabs builds.

It is also possible to specify the gcc version wanted with the platform filter: linux_x86_64_gcc9.3 or linux_x86_64_gcc11.2

only_production: (optional)

If True, will only return the production builds. Setting it to False or ignoring this parameter will return all builds (daily and production). Does not effect Docker and SideFXLabs builds.

Example return value (for product='houdini' and version='17.0'):

[
  {
    'build': '382',
    'date': '2018/10/26',
    'platform': 'linux_x86_64_gcc6.3',
    'product': 'houdini',
    'release': 'devel',
    'status': 'good',
    'version': '17.0'
  },
  {
    'build': '382',
    'date': '2018/10/26',
    'platform': 'macosx_x86_64_clang9.0_10.13',
    'product': 'houdini',
    'release': 'devel',
    'status': 'good',
    'version': '17.0'
  },
  {
    'build': '382',
    'date': '2018/10/26',
    'platform': 'win64-vc141',
    'product': 'houdini',
    'release': 'devel',
    'status': 'good',
    'version': '17.0'
  {
    'build': '381',
    'date': '2018/10/25',
    'platform': 'win64-vc141',
    'product': 'houdini',
    'release': 'gold',
    'status': 'good',
    'version': '17.0'
  },
  {
    'build': '381',
    'date': '2018/10/25',
    'platform': 'linux_x86_64_gcc6.3',
    'product': 'houdini',
    'release': 'gold',
    'status': 'good',
    'version': '17.0'
  },
  ...
]

The list is ordered from the most recent to oldest builds available. Your program should store the build value to identify which specific build you want to download. If the status value is bad you should avoid using this build as it had serious failures during testing.

download.get_daily_build_download(product, version, build, platform)

Returns a JSON object containing a valid temporary download link to the requested build as well as other information about the build.

Parameters:

product:

Product accepts the following values: houdini, houdini-py3, houdini-py37, houdini-py2, docker, sidefxlabs, houdini-launcher, houdini-launcher-py3, houdini-launcher-py37, launcher-iso, launcher-iso-py3, launcher-iso-py37, `launcher-iso-py2

version:

The major version of Houdini, e.g. 16.5, 17.0

build:

Either a specific build number, e.g. 382, or the string 'production' to get the latest production build

platform:

The operating system to install Houdini on: win64, macos, macosx_arm64, linux. Please note this parameter is ignored for Docker and SideFXLabs builds.

It is also possible to specify the gcc version wanted with the platform filter: linux_x86_64_gcc9.3 or linux_x86_64_gcc11.2

Example return value:

{
  'date': '2018/10/10',
  'download_url': 'https://d199n7he4uszw5.cloudfront.net/download/download-build/55048/cdn/?Expires=1540920374&Signature=OLs0p52B4SbvXQVgDSOvNDx1YyGV___&Key-Pair-Id=APK**WQ',
  'filename': 'houdini-17.0.352-win64-vc141.exe',
  'hash': '001e6e62aed5a3e5c10d3f2019bf41b5',
  'releases_list': 'gold',
  'status': 'good',
  'size': 1114902200
}

The object returned contains a temporary URL download_url that’s only valid for the time of the download. Do not store that link, request a new link for each download.

It is also possible to validate the downloaded file by comparing its hash to the one returned from the api.

API usage example

Here is a python example showing how to retrieve the latest linux daily build using our python library (see: Python Reference Implementation), you first need to download the sidefx.py file:

import sidefx
import requests
import hashlib
import shutil


if __name__ == '__main__':

    # This service object retrieve a token using your Application ID and secret
    service = sidefx.service(
        access_token_url="https://www.sidefx.com/oauth2/application_token",
        client_id='your OAuth application ID',
        client_secret_key='your OAuth application secret',
        endpoint_url="https://www.sidefx.com/api/",
    )

    # Retrieve the daily builds list, if you want the latest production
    # you can skip this step
    releases_list = service.download.get_daily_builds_list(
        product='houdini', version='17.0', platform='linux')

    # Retrieve the latest daily build available
    latest_release = service.download.get_daily_build_download(
        product='houdini', version='17.0', build=releases_list[0]['build'], platform='linux')

    # Download the file
    local_filename = latest_release['filename']
    r = requests.get(latest_release['download_url'], stream=True)
    if r.status_code == 200:
        with open(local_filename, 'wb') as f:
            r.raw.decode_content = True
            shutil.copyfileobj(r.raw, f)
    else:
        raise Exception('Error downloading file!')

    # Verify the file checksum is matching
    file_hash = hashlib.md5()
    with open(local_filename, 'rb') as f:
        for chunk in iter(lambda: f.read(4096), b''):
            file_hash.update(chunk)
    if file_hash.hexdigest() != latest_release['hash']:
        raise Exception('Checksum does not match!')