Automate Splunk AppDynamics Software Downloads with cURL

When you download files, always copy or transfer the files in binary mode. If you want to transfer a file that you have downloaded on Windows to a Linux machine, use binary mode in your transfer program when you move the file to the destination Linux environment.

Where applicable, Splunk AppDynamics also publishes software for distribution on package manager repositories such as RPM, npm, pip, NuGet, and more. For products that are available via a package manager, you can find relevant instructions to retrieve and install the software in Install the Machine Agent.

The following steps demonstrate how to use cURL to get the latest version of a Splunk AppDynamics software download.

  1. Retrieve an OAUTH token with the download scope:
    curl -X POST -d '{"username": "<username>","password": "<password>","scopes": ["download"]}' https://identity.msrv.saas.appdynamics.com/v2.0/oauth/token
  2. View the latest version of each available product from https://download.appdynamics.com/download/downloadfilelatest/. For example:
    curl https://download.appdynamics.com/download/downloadfilelatest/
  3. Inspect the response (or parse via script) to find the download_path of the latest product version.
  4. Download the binary by running the following command:Replace access_token url_to_file download_path
    curl -L -O -H "Authorization: Bearer
    <access_token>" <url_to_file>