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>.c-app.cmd.com/download/ccf?architecture=amd64&format=deb&version=" > ccf.deb
How to configure the command
Select the Cmd Audit or Cmd Control agent:
- Leave
ccf
in the URL to download the Cmd Control agent, or replace it withcmd
to download the Cmd Audit agent instead (e.g.:.../download/ccf...
versus.../download/cmd...
).
Replace the following parts of the URL:
- Replace
<PROJECT_KEY>
with your Cmd project key. - Replace
<SUB>
with your Cmd instance's subdomain. For example if your Cmd web app is atsub1.app.cmd.com
, replace it with "sub1". If it's atsub2.app.cmd.com
, replace it with "sub2".
For example:https://sub1.c-app.cmd.com/download/
.
Set the following values before execution:
architecture
— Currently, the only valid value isamd64
(which includes x86-64).format
— Eitherdeb
orrpm
, depending on the target OS.version
— 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.)
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: