Copy an agent policy

Base URL
https://{kibana_url}
Auth

Copy an agent policy by ID.

Required authorization

Privileges fleet-agent-policies-all

Path parameters

space_id string optional

An identifier for the space. If space_id is not provided in the URL, the default space is used. Refer to Spaces for more information.

agentPolicyId string required

The ID of the agent policy

Query parameters

format enum

Format for the response: simplified or legacy

Values: simplified legacy

Header parameters

kbn-xsrf string required

A required header to protect against CSRF attacks

Request body

description string
name string · min length: 1 required

Responses

Successful response

application/json
item object required
advanced_settings object
agent_download_target_directory object
agent_download_timeout object
agent_features_disable_policy_change_acks_enabled object
agent_features_include_tags_in_events_enabled object
agent_internal object
agent_limits_go_max_procs object
agent_logging_files_interval object
agent_logging_files_keepfiles object
agent_logging_files_rotateeverybytes object
agent_logging_level object
agent_logging_metrics_period object
agent_logging_to_files object
agent_monitoring_runtime_experimental object
agent_features object[] · max items: 100
enabled boolean required
name string required
agentless object
cloud_connectors object
enabled boolean required
target_csp enum
Values: aws azure gcp
cluster_id string
resources object
requests object
cpu string
memory string
agents number
agents_per_version object[] · max items: 1000
count number required
version string required
created_at string
data_output_id string nullable
description string
download_source_id string nullable deprecated

Use download_source_ids instead

download_source_ids string[] · max items: 3
fips_agents number
fleet_server_host_id string nullable
global_data_tags object[] · max items: 100

User defined data tags that are added to all of the inputs. The values can be strings or numbers.

name string required
value number | string required
has_agent_version_conditions boolean
has_fleet_server boolean
id string required
inactivity_timeout number · min: 0 · default: 1209600
is_default boolean
is_default_fleet_server boolean
is_managed boolean
is_preconfigured boolean
is_protected boolean required

Indicates whether the agent policy has tamper protection enabled. Defaults to false.

is_verifier boolean
keep_monitoring_alive boolean nullable

When set to true, monitoring will be enabled but logs/metrics collection will be disabled

min_agent_version string nullable
monitoring_diagnostics object
limit object
burst number
interval string
uploader object
init_dur string
max_dur string
max_retries number
monitoring_enabled enum[] · max items: 3
Values: logs metrics traces
monitoring_http object
buffer object
enabled boolean · default: false
enabled boolean
host string
port number · min: 0 · max: 65353
monitoring_output_id string nullable
monitoring_pprof_enabled boolean
name string · min length: 1 required
namespace string · min length: 1 required
overrides map string to object nullable

Override settings that are defined in the agent policy. Input settings cannot be overridden. The override option should be used only in unusual circumstances and not as a routine procedure.

package_agent_version_conditions object[] · max items: 1000 nullable
name string required
title string required
version_condition string required
package_policies union anyOf
Any of:
string[]
required_versions object[] · max items: 100 nullable
percentage number · min: 0 · max: 100 required

Target percentage of agents to auto upgrade

version string required

Target version for automatic agent upgrade

revision number required
schema_version string
space_ids string[] · max items: 100
status enum required
Values: active inactive
supports_agentless boolean nullable

Indicates whether the agent policy supports agentless integrations.

unenroll_timeout number · min: 0
unprivileged_agents number
updated_at string required
updated_by string required
version string

Bad Request

application/json
attributes object required
error string
errorType string
message string required
statusCode number
Base URL
https://{kibana_url}