Copy an agent policy Beta
Copy an agent policy by ID.
Headers
-
elastic-api-version string
The version of the API to use
Value is
2023-10-31
. Default value is2023-10-31
. -
A required header to protect against CSRF attacks
Query parameters
-
format string
Values are
simplified
orlegacy
.
Body
-
description string
-
Minimum length is
1
.
POST /api/fleet/agent_policies/{agentPolicyId}/copy
curl \
-X POST https://<KIBANA_URL>/api/fleet/agent_policies/{agentPolicyId}/copy \
-H "Content-Type: application/json; Elastic-Api-Version=2023-10-31" \
-H "elastic-api-version: 2023-10-31" \
-H "kbn-xsrf: true"
Request examples
# Headers
elastic-api-version: 2023-10-31
kbn-xsrf: true
# 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": [
{
"name": "string",
"value": "string"
}
],
"has_fleet_server": true,
"id": "string",
"inactivity_timeout": 1209600,
"is_default": true,
"is_default_fleet_server": true,
"is_managed": true,
"is_preconfigured": true,
"is_protected": true,
"keep_monitoring_alive": false,
"monitoring_diagnostics": {
"limit": {
"burst": 42.0,
"interval": "string"
},
"uploader": {
"init_dur": "string",
"max_dur": "string",
"max_retries": 42.0
}
},
"monitoring_enabled": [
"logs"
],
"monitoring_http": {
"buffer": {
"enabled": false
},
"enabled": true,
"host": "string",
"port": 42.0
},
"monitoring_output_id": "string",
"monitoring_pprof_enabled": true,
"name": "string",
"namespace": "string",
"overrides": {},
"package_policies": [
"string"
],
"revision": 42.0,
"schema_version": "string",
"space_ids": [
"string"
],
"status": "active",
"supports_agentless": false,
"unenroll_timeout": 42.0,
"unprivileged_agents": 42.0,
"updated_at": "string",
"updated_by": "string",
"version": "string"
}
}
Response examples (400)
{
"error": "string",
"message": "string",
"statusCode": 42.0
}