Update agent policy by ID
Headers
-
Kibana's anti Cross-Site Request Forgery token. Can be any string value.
Query parameters
-
format string
Simplified or legacy format for package inputs
Values are
simplified
orlegacy
.
Body
-
agent_features array[object]
-
data_output_id string | null
-
description string
-
download_source_id string | null
-
fleet_server_host_id string | null
-
force boolean
Force agent policy creation even if packages are not verified.
-
inactivity_timeout integer
-
is_protected boolean
-
monitoring_enabled array[string]
Values are
metrics
orlogs
. -
monitoring_output_id string | null
-
unenroll_timeout integer
PUT /api/fleet/agent_policies/{agentPolicyId}
curl \
-X PUT https://localhost:5601/api/fleet/agent_policies/{agentPolicyId} \
-H "Content-Type: application/json; Elastic-Api-Version=2023-10-31" \
-H "kbn-xsrf: string"
Request examples
# Headers
kbn-xsrf: string
# Payload
{
"agent_features": [
{
"enabled": true,
"name": "string"
}
],
"data_output_id": "string",
"description": "string",
"download_source_id": "string",
"fleet_server_host_id": "string",
"force": true,
"global_data_tags": [
{}
],
"inactivity_timeout": 42,
"is_protected": true,
"monitoring_enabled": [
"metrics"
],
"monitoring_output_id": "string",
"name": "string",
"namespace": "string",
"unenroll_timeout": 42
}
Response examples (200)
{
"item": {
"advanced_settings": {},
"agent_features": [
{
"enabled": true,
"name": "string"
}
],
"agents": 42.0,
"data_output_id": "string",
"description": "string",
"download_source_id": "string",
"fleet_server_host_id": "string",
"global_data_tags": [
{}
],
"id": "string",
"inactivity_timeout": 42,
"is_protected": true,
"keep_monitoring_alive": true,
"monitoring_diagnostics": {
"limit": {
"burst": 42.0,
"interval": "string"
},
"uploader": {
"init_dur": "string",
"max_dur": "string",
"max_retries": 42.0
}
},
"monitoring_enabled": [
"metrics"
],
"monitoring_http": {
"enabled": true,
"host": "string",
"port": 42.0
},
"monitoring_output_id": "string",
"monitoring_pprof_enabled": true,
"name": "string",
"namespace": "string",
"overrides": {},
"package_policies": [
{
"id": "string",
"inputs": [
{
"config": {},
"enabled": true,
"processors": [
"string"
],
"streams": [],
"type": "string",
"vars": {}
}
],
"revision": 42.0,
"description": "string",
"enabled": true,
"name": "string",
"namespace": "string",
"output_id": "string",
"overrides": {},
"package": {
"name": "string",
"requires_root": true,
"title": "string",
"version": "string"
},
"policy_id": "string",
"policy_ids": [
"string"
]
}
],
"revision": 42.0,
"supports_agentless": true,
"unenroll_timeout": 42,
"unprivileged_agents": 42.0,
"updated_by": "string",
"updated_on": "2024-05-04T09:42:00+00:00"
}
}
Response examples (400)
{
"error": "string",
"message": "string",
"statusCode": 42.0
}