This page describes how to deploy an agent using the Agent Installer API. See Agent Installer Platform Service API

Linux supports the Java and Machine Agents, and Windows only supports the Machine Agent. 

Find the Agent Versions

Obtain the latest version of available agents using the API: 

Format:

GET /install/agentVersions?latest={true|false}&osType={linux|windows}
CODE

Request Example:

curl --location --request GET 'https://demo.saas.appdynamics.com/zero/v1beta/install/agentVersions?latest=false&osType=linux --header 'Authorization: Bearer {AuthToken}'
CODE
curl --location --request GET 'https://demo.saas.appdynamics.com/zero/v1beta/install/agentVersions?latest=false&osType=windows --header 'Authorization: Bearer {AuthToken}'
CODE

Response Example: 

{
    "total":1,
    "items":[
        {
            "os":"linux",
            "agents":[
                {
                    "agentType":"jdk8_plus",
                    "descriptions":[
                        {
                            "version":"22.4.0.33722",
                            "md5Checksum":"a742e075d31d89d934ec1a571ded3004",
                            "s3Path":"download-file/java-jdk8/22.4.0.33722/AppServerAgent-1.8-22.4.0.33722.zip",
                            "supportsIbl":false
                        }
                    ]
                },
                {
                    "agentType":"sun_java",
                    "descriptions":[
                        {
                            "version":"21.8.0.32958",
                            "md5Checksum":"ca5472b4c6691d65f35399bc61a4c180",
                            "s3Path":"download-file/sun-jvm/21.8.0.32958/AppServerAgent-21.8.0.32958.zip",
                            "supportsIbl":false
                        }
                    ]
                },
                {
                    "agentType":"ibm_java",
                    "descriptions":[
                        {
                            "version":"21.8.0.32958",
                            "md5Checksum":"eb35b7dfb1166c7a20586e30d231f337",
                            "s3Path":"download-file/ibm-jvm/21.8.0.32958/AppServerAgent-ibm-21.8.0.32958.zip",
                            "supportsIbl":false
                        }
                    ]
                },
                {
                    "agentType":"machine",
                    "descriptions":[
                        {
                            "version":"21.7.0.3160",
                            "md5Checksum":"24cd76b6144c56c78063112f154b53bd",
                            "s3Path":"download-file/machine-bundle/21.7.0.3160/machineagent-bundle-64bit-linux-21.7.0.3160.zip",
                            "supportsIbl":true
                        }
                    ]
                },
                {
                    "agentType":"zero",
                    "descriptions":[
                        {
                            "version":"21.9.0.569",
                            "md5Checksum":"720597f2dc67ecf0b5f02b45b51d46ee",
                            "s3Path":"download-file/zero-agent/21.9.0.569/appdynamics-zero-agent-21.9.0.569.zip",
                            "supportsIbl":false
                        }
                    ]
                }
            ]
        }
    ]
}
CODE
{
    "total": 1,
    "items": [
        {
            "os": "windows",
            "agents": [
                {
                    "agentType": "machine_windows",
                    "descriptions": [
                        {
                            "version": "22.4.0.3344",
                            "md5Checksum": "f69885445288710284837d6e04e78754",
                            "s3Path": "download-file/machine-bundle/22.4.0.3344/machineagent-bundle-64bit-windows-22.4.0.3344.zip",
                            "supportsIbl": true
                        }
                    ]
                },
                {
                    "agentType": "zero_windows",
                    "descriptions": [
                        {
                            "version": "22.5.0.2139",
                            "md5Checksum": "e03ba2c83b646ebf53e0c2685ab2fce7",
                            "s3Path": "download-file/zero-agent-windows/22.5.0.2139/appdynamics-zero-agent-windows-64-22.5.0.2139.zip",
                            "supportsIbl": false
                        }
                    ]
                }
            ]
        }
    ]
}
CODE

Obtain the Download Command 

Use the version from the previous API to obtain the download command from the API: 

Format:

GET /install/downloadCommand?jdk8PlusVersion={jdk8PlusVersion}&javaVersion={javaVersion}&machineVersion={machineVersion}&zeroVersion={zeroVersion}&multiline={true|false}&osType={windows|linux}
CODE

Request Example:

Java Agent Legacy: 
curl --location --request GET 'https://demo.saas.appdynamics.com/zero/v1beta/install/downloadCommand?javaVersion=latest&machineVersion=21.10.0.3188&zeroVersion=latest&multiline=true&osType=linux' --header 'Authorization: Bearer {AuthToken}'

Java JDK8+: 
curl --location --request GET 'https://demo.saas.appdynamics.com/zero/v1beta/install/downloadCommand?jdk8PlusVersion=22.4.0.33722&machineVersion=latest&zeroVersion=latest&multiline=true&osType=linux' --header 'Authorization: Bearer {AuthToken}'
CODE
curl --location --request GET 'https://demo.saas.appdynamics.com/zero/v1beta/install/downloadCommand?machineVersion=21.10.0.3188&zeroVersion=latest&multiline=true&osType=windows' --header 'Authorization: Bearer {AuthToken}'
CODE

Response Example: 

Java Agent Legacy:
[
    "cd $(mktemp -d -t appd-zero-XXXXXXX)",
    "&& curl https://download-files.saas.appdynamics.com/download-file/zero-agent-bootstrap/22.2.0.1462/appdynamics-zero-agent-bootstrap-22.2.0.1462.sh -o zero-agent.sh",
    "&& chmod +x zero-agent.sh",
    "&& ./zero-agent.sh download sun-java -u https://download-files.saas.appdynamics.com -v 22.1.0.33445 -c ced8b1d5d8739753df9de6a5465a1431",
    "&& ./zero-agent.sh download ibm-java -u https://download-files.saas.appdynamics.com -v 22.1.0.33445 -c 70a2017fbc722844b7dc61efd516a962",
    "&& ./zero-agent.sh download machine -u https://download-files.saas.appdynamics.com -v 21.10.0.3188 -c 186b1fc26f8a2626269cd54cadf45e1e",
    "&& ./zero-agent.sh download zero -u https://download-files.saas.appdynamics.com -v 22.2.0.1462 -c 318aa43165c8279bbffacd1c4120d1cd"
]

Java JDK8+:
[
    "cd $(mktemp -d -t appd-zero-XXXXXXX)",
    "&& curl https://download-files.saas.appd-test.com/download-file/zero-agent-bootstrap/22.5.0.2139/appdynamics-zero-agent-bootstrap-22.5.0.2139.sh -o zero-agent.sh",
    "&& chmod +x zero-agent.sh",
    "&& ./zero-agent.sh download java -u https://download-files.saas.appd-test.com -v 22.4.0.33722 -c a742e075d31d89d934ec1a571ded3004",
    "&& ./zero-agent.sh download machine -u https://download-files.saas.appd-test.com -v 22.4.0.3344 -c 1192a1bfaf8100b7e4ef22769b9ced32",
    "&& ./zero-agent.sh download zero -u https://download-files.saas.appd-test.com -v 22.5.0.2139 -c 2b99ade1c22374c21578296412827128"
]
CODE
[
    "$ProgressPreference = 'SilentlyContinue';",
    "$tmpfolder = Join-Path ([System.IO.Path]::GetTempPath()) appd-zero-$([System.IO.Path]::GetRandomFileName());",
    "New-Item -ItemType Directory -Force -Path $tmpfolder | out-null;",
    "Set-Location -Path $tmpfolder;",
    "Invoke-WebRequest https://download-files.saas.appdynamics.com/download-file/zero-agent-bootstrap/22.2.0.1462/appdynamics-zero-agent-bootstrap-22.2.0.1462.ps1 -OutFile zero-agent.ps1;",
    "Set-ExecutionPolicy ByPass -Force -Scope CurrentUser;",
    ".\\zero-agent.ps1 download machine -u https://download-files.saas.appdynamics.com -v 21.10.0.3188 -c bd3d78a412b66f7d0a08cd6f856abb89;",
    ".\\zero-agent.ps1 download zero -u https://download-files.saas.appdynamics.com -v 22.2.0.1462 -c b9a6f11027f485468ba8224bf60586c6;"
]
CODE

Obtain the Install Command 

Application names cannot contain a single quotation mark ('). When you install Java JDK8+ with the Agent Installer, the OpenTelemetry resource attributes service.namespace and service.name are mapped to the AppDynamics application name and tier name. 

Running the command will take you to a new temporary directory. Obtain the command from the API below and then execute it from the same directory:

Format:

GET /install/installCommand?sudo={true|false}&application={appName}&accessKey={accessKey}&serviceUrl={serviceUrl}&osType={windows|linux}&otelEnabled={true|false}&tracesExporter={tracesExporter}&metricsExporter={metricsExporter}&otlpEndpoint={collectorEndpoint}&simEnabled={true|false}&dotnetCompatibility={true|false}
CODE

Request Example:

curl --location --request GET 'https://demo.saas.appdynamics.com/zero/v1beta/install/installCommand?sudo=true&application=helloWorld&accessKey=fb19d1d6-6858-5fea-b6ed-302480e5c580&serviceUrl=https://demo.saas.appdynamics.com&osType=linux&otelEnabled=true&tracesExporter=otlp,logging&metricsExporter=otlp,logging&otlpEndpoint=https://demo.saas.appdynamics.com/otlp-collector&simEnabled=true' --header 'Authorization: Bearer {AuthToken}'
CODE
curl --location --request GET 'https://demo.saas.appdynamics.com/zero/v1beta/install/installCommand?application=helloWorld&accessKey=fb19d1d6-6858-5fea-b6ed-302480e5c580&serviceUrl=https://demo.saas.appdynamics.com&osType=windows&simEnabled=true&dotnetCompatibility=true' --header 'Authorization: Bearer {AuthToken}'
CODE

Response Example: 

[
    "sudo ./zero-agent.sh install --application 'helloWorld' --account 'demo' --access-key 'fb19d1d6-6858-5fea-b6ed-302480e5c580' --service-url 'https://demo.saas.appdynamics.com' --enable-sim 'true' --enable-otel 'true' --traces-exporter 'otlp,logging' --metrics-exporter 'otlp,logging' --otlp-endpoint 'https://demo.saas.appdynamics.com/otlp-collector'"
]
CODE
[
    ".\\zero-agent.ps1 install --application 'helloWorld' --account 'demo' --access-key 'fb19d1d6-6858-5fea-b6ed-302480e5c580' --service-url 'https://demo.saas.appdynamics.com' --enable-sim 'true' --dotnet-compatibility 'true'"
]
CODE