v1
latestOpenAPI 3.0.02026-07-141,4077,1665.2 MBFleet Automation
Upgrade hosts
Create and immediately start a new package upgrade on hosts matching the specified filter query.
This endpoint allows you to upgrade the Datadog Agent to a specific version on hosts matching the specified filter query.
The deployment is created and started automatically. The system will:
- Identify all hosts matching the filter query
- Validate that the specified version is available
- Begin rolling out the package upgrade to the target hosts
post/api/unstable/fleet/deployments/upgrade
Request body
Example request
{
"data": {
"attributes": {
"filter_query": "env:prod AND service:web",
"target_packages": [
{
"name": "datadog-agent",
"version": "7.52.0"
}
]
},
"type": "deployment"
}
}Response
CREATED
Example response
{
"data": {
"attributes": {
"config_operations": [
{
"file_op": "merge-patch",
"file_path": "/datadog.yaml",
"patch": {
"apm_config": {
"enabled": true
},
"log_level": "debug",
"logs_enabled": true
}
}
],
"estimated_end_time_unix": 1699999999,
"filter_query": "env:prod AND service:web",
"high_level_status": "pending",
"hosts": [
{
"hostname": "web-server-01.example.com",
"status": "succeeded",
"versions": [
{
"current_version": "7.51.0",
"initial_version": "7.51.0",
"package_name": "datadog-agent",
"target_version": "7.52.0"
}
]
}
],
"packages": [
{
"name": "datadog-agent",
"version": "7.52.0"
}
],
"total_hosts": 42
},
"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001",
"type": "deployment"
},
"meta": {
"hosts": {
"page_size": 50,
"total_hosts": 150,
"total_pages": 3
}
}
}