Community API
Chef community members can use Chef’s Community API to download Chef software packages and view software package metadata.
License
You must have a Free Tier License ID to download packages from the Chef Community API. To generate a new license ID or retrieve an existing license ID, submit a request.
See Chef’s licensing documentation for more information on the Chef license.
Endpoints
The Chef Community Download API has the following endpoints:
/architectures/platforms/products/packages/versions/all/versions/latest/metadata/download
See the parameters section below to understand the query strings used in the following endpoint descriptions.
architectures
The architectures endpoint returns a valid list of architecture that Chef products are built for.
Any of these architectures can be used in the m query string value in various endpoints below.
https://chefdownload-community.chef.io/architectures
platforms
The platforms endpoint returns a list of valid platform keys along with full product names. Any of these platform keys can be used in the p query string value in various endpoints below.
https://chefdownload-community.chef.io/platforms
products
The products endpoint returns a list of valid product keys. In the following endpoints, you can replace the <PRODUCT> string with a product key in the response of this endpoint.
https://chefdownload-community.chef.io/products
Use eol=true to return EOL products.
https://chefdownload-community.chef.io/products?eol=true
packages
Use packages to get a list of all packages for a particular product.
By default, it returns packages for the latest version.
https://chefdownload-community.chef.io/stable/<PRODUCT>/packages?license_id=<LICENSE_ID>
You can specify a version number with the v query string to get packages for a particular product version.
https://chefdownload-community.chef.io/stable/<PRODUCT>/packages?v=<VERSION_NUMBER>&license_id=<LICENSE_ID>
versions/all
Use versions/all to return a list of versions of a product.
https://chefdownload-community.chef.io/stable/<PRODUCT>/versions/all?license_id=<LICENSE_ID>
versions/latest
Use versions/latest to return the latest version of a product.
https://chefdownload-community.chef.io/stable/<PRODUCT>/versions/latest?license_id=<LICENSE_ID>
metadata
The metadata endpoint returns data about a particular package of a Chef product.
https://chefdownload-community.chef.io/stable/<PRODUCT>/metadata?p=<PLATFORM>&pv=<PLATFORM_VERSION>&m=<ARCHITECTURE>&v=<PRODUCT_VERSION>&license_id=<LICENSE_ID>
download
The download endpoint downloads a particular package of a Chef product.
https://chefdownload-community.chef.io/stable/<PRODUCT>/download?p=<PLATFORM>&pv=<PLATFORM_VERSION>&m=<ARCHITECTURE>&v=<PRODUCT_VERSION>&license_id=<LICENSE_ID>
Parameters
The API accepts the following parameters in a query string.
<PRODUCT>- The Chef Software product to install.
A list of valid product keys can be found in the Chef product matrix or by using the
productsendpoint. license_id- Your license ID.
A license is required to download packages and retrieve package metadata with this API. Only free licenses can be used for community downloads.
eol- Whether to include EOL versions of a product or EOL products in the response.
Possible values:
trueorfalse.Default value:
false. p- The platform.
Possible values:
debian,el(for RHEL derivatives),freebsd,mac_os_x,solaris2,sles,suse,ubuntuorwindows. pv- The platform version.
Possible values depend on the platform. For example, Ubuntu:
18.04, or20.04, or for macOS:10.15or11. m- The machine architecture for the machine on which the product will be installed.
Possible values depend on the platform. For example, for Ubuntu or Debian:
i386orx86_64, or for macOS:x86_64. v- The version of the product to be installed.
Versions typically take the form of
x.y.zwhere x, y, and z are decimal numbers that represent major (x), minor (y), and patch (z) versions. One-part (x) and two-part (x.y) versions are allowed.Default value:
latest.
Chef product names
See the Supported Versions documentation for information about the support status of individual products.
This is a list of currently supported products that you can install with this API.
| Product | Product Key |
|---|---|
| Chef Automate | automate |
| Chef Infra Client | chef |
| Chef Infra Server | chef-server |
| Chef Workstation | chef-workstation |
| Chef Habitat | habitat |
| Chef InSpec | inspec |
| Supermarket | supermarket |
Examples
Get the latest build
To get the latest supported build of Chef Infra Client for Ubuntu 20.04, enter the following:
https://chefdownload-community.chef.io/stable/chef/metadata?p=ubuntu&pv=20.04&m=x86_64&license_id=<LICENSE_ID>
which returns something like:
sha1 "3c8a265a36c2ce7e5594ae894fafb248789464a2"
sha256 "512c1eff0a4103e4a5c73b196d14393eddbf2b766a75e94ac9a9cb97d1fdd19c"
url "https://chefdownload-community.chef.io/stable/chef/download?eol=false&m=x86_64&p=ubuntu&pv=20.04&v=14.15.6"
version "14.15.6"
Download directly
To use cURL to download a package directly, enter the following:
curl -LOJ 'https://chefdownload-community.chef.io/stable/<PRODUCT>/download?p=<PLATFORM>&pv=<PLATFORM_VERSION>&m=<ARCHITECTURE>&license_id=<LICENSE_ID>'
To use GNU Wget to download a package directly, enter the following:
wget --content-disposition https://chefdownload-community.chef.io/stable/<PRODUCT>/download?p=<PLATFORM>&pv=<PLATFORM_VERSION>&m=<ARCHITECTURE>&license_id=<LICENSE_ID>