Bintray exposes APIs with which users can automatically download package files, specified by their URLs, using different tools. These tools depend on the repository type, package type, and other criteria, and may be build tools (such as Maven and Gradle), package management tools (such as Debian and RPM) and others (such as the HTTP client cURL). To download a file using APIs you need to specify the precise URL that corresponds to the file’s location within Bintray.
Files are stored in Bintray in a well-defined structure according to the repository and package in which they reside— as well as in an additional Target Repository Path that the file’s owner can specify while performing the upload.
A file’s URL is constructed as follows:
For example, to use cURL to download a file called: “myfile.bin” ,
that was uploaded using a Target Repository Path of “com/acme/projectx/rel15”,
to a repository called “myrepo”,
by a user whose username is “john”,
you would use the following line of code:
curl -u <YOUR USER_NAME>:<YOUR API_KEY> https://dl.bintray.com/acme/releases/rel15/module-x/installer.bin -o /tmp/installer.bin
As a convenience, each repository and package offers a Set Me Up! button, which displays a window showing download instructions for each tool that is relevant to the specific repository or package.
The example below shows a Set Me Up! window for a Maven repository. It includes instructions for download using the Maven client as well as general instructions in a line of cURL script that other tools can use:
Clicking the different options in this window displays instructions for the relevant procedure, with GUI screenshots or lines of code where necessary.
There are two cases in which you must include authentication credentials, your Bintray Username and your API Key.
For more details on how to download files using REST, please refer to Download Content in the Bintray REST API documentation.