Create distributions

Cortex XDR REST API

post /public_api/v1/distributions/create

Create an installation package. This is an async call that returns the distribution ID; it does not mean that the creation succeeded. To confirm the package has been created, check the status of the distribution by running the Get Distribution Status API.

Required license: Cortex XDR Prevent or Cortex XDR Pro per Endpoint

CURL
curl -X POST \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ "https://api-yourfqdn/public_api/v1/distributions/create" \ -d '{ "request_data" : { "agent_version" : "windows_version", "name" : "name", "package_type" : "package_type", "platform" : "windows" } }'
Request
Body
optional
Example: {"request_data":{"name":"","platform":"windows","package_type":"standalone","agent_version":"windows_version"}}
request_data
required
name
required
String
The name of the installation package.
platform
optional
String (Enum)
Installation platform.
Allowed values:
windows
linux
macos
android
package_type
required
String

A string representing the type of package to create. Each JSON object must contain one of the following keywords:

  • standalone: Installation for a new agent. When using this, you must include the platform field with one of the following values: windows, linux, macos, android.
  • upgrade: Upgrade of an agent from ESM. When using this, you must include the agent_version field with one of the following values: windows_version, linux_version, or macos_version.
agent_version
optional
String (Enum)
(Not required for Android platform)
Allowed values:
windows_version
linux_version
macos_version
Responses

Successful response

Body
reply
optional
distribution_id
optional
String
Installation package ID.

Bad Request. Got an invalid JSON.

Body
The query result upon error.
err_code
optional
String
HTTP response code.
err_msg
optional
String
Error message.
Example: {"line": 1, "column": 19, "message": "no viable alternative at input '|alter2'"}
err_extra
optional
String
Additional information describing the error.

Unauthorized access. An issue occurred during authentication. This can indicate an incorrect key, id, or other invalid authentication parameters.

Body
The query result upon error.
err_code
optional
String
HTTP response code.
err_msg
optional
String
Error message.
Example: {"line": 1, "column": 19, "message": "no viable alternative at input '|alter2'"}
err_extra
optional
String
Additional information describing the error.

Unauthorized access. User does not have the required license type to run this API.

Body
The query result upon error.
err_code
optional
String
HTTP response code.
err_msg
optional
String
Error message.
Example: {"line": 1, "column": 19, "message": "no viable alternative at input '|alter2'"}
err_extra
optional
String
Additional information describing the error.

Forbidden access. The provided API Key does not have the required RBAC permissions to run this API.

Body
The query result upon error.
err_code
optional
String
HTTP response code.
err_msg
optional
String
Error message.
Example: {"line": 1, "column": 19, "message": "no viable alternative at input '|alter2'"}
err_extra
optional
String
Additional information describing the error.

Internal server error. A unified status for API communication type errors.

Body
The query result upon error.
err_code
optional
String
HTTP response code.
err_msg
optional
String
Error message.
Example: {"line": 1, "column": 19, "message": "no viable alternative at input '|alter2'"}
err_extra
optional
String
Additional information describing the error.