To programmatically download specific versions of an agent, you can use a customizable curl command to request them from a Cmd-maintained endpoint. This page explains how to use the download endpoint to get a given agent version, then shows the endpoint's full API specification.

The generic curl command

You can configure this curl example to download a specific agent version:

curl -L -H "project-key: <PROJECT_KEY>" "https://<SUB><AGENT_TYPE>?architecture=amd64&format=<FORMAT>&version=<VERSION>" > <TARGET_FILE>

How to configure the command

Select whether to download the Cmd Audit or Cmd Control agent:

  • Replace <AGENT_TYPE> with ccf to download the Cmd Control agent, or replace it with cmd to download the Cmd Audit agent instead (e.g.: .../download/ccf... versus .../download/cmd... ).

Set the version and format:

  • Replace <FORMAT> with either deb , rpm , or tgz . Note: Tarball (.tgz) installation is only supported by the Cmd Audit agent.

  • Replace <VERSION> with the version number of the agent you wish to download. Use a supported version number, or leave it blank for the latest version. (To see a full list of supported versions, go to 'Agent settings' and turn automatic updates off.)

Configure the agent for your project:

  • Replace <PROJECT_KEY> with your Cmd project key.

  • Replace <SUB> with your Cmd instance's subdomain. For example if your Cmd web app is at , replace it with "sub1". If it's at , replace it with "sub2".
    For example: .

  • Replace <TARGET_FILE> with <AGENT_TYPE>.<FORMAT>, e.g. cmd.deb.

API specification

Path: /download/<product>

Available products: [cmd, ccf]

Supported method: GET

Response codes:

  • 200 - success

  • 401 - no auth header provided

  • 403 - bad auth header provided

  • 404 - package not found

  • 500 - internal server error

Request headers:

  • project-key

URL query parameters:

Related resources

Did this answer your question?