Copy 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
-
description string
POST
/api/fleet/agent_policies/{agentPolicyId}/copy
curl \
-X POST https://localhost:5601/api/fleet/agent_policies/{agentPolicyId}/copy \
-H "Content-Type: application/json; Elastic-Api-Version=2023-10-31" \
-H "kbn-xsrf: string"
Request examples
# Headers
kbn-xsrf: string
# Payload
{
"description": "string",
"name": "string"
}
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
}