Create an agent policy

Base URL
https://{kibana_url}
  • POST /api/fleet/agent_policies
  • POST /s/{space_id}/api/fleet/agent_policies
Auth

Create a new agent policy.

Required privileges

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.

Query parameters

sys_monitoring boolean

Whether to add the system integration to the new agent policy

Header parameters

kbn-xsrf string required

A required header to protect against CSRF attacks

Request body

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
fleet_server_host_id string nullable
force boolean
has_agent_version_conditions boolean
has_fleet_server boolean
id string
inactivity_timeout number · min: 0 · default: 1209600
is_default boolean
is_default_fleet_server boolean
is_managed boolean
is_protected boolean
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_enabled enum[] · max items: 3
Values: logs metrics traces
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.

space_ids string[] · max items: 100
supports_agentless boolean nullable deprecated

Indicates whether the agent policy supports agentless integrations. Deprecated in favor of the Fleet managed integrations API.

unenroll_timeout number · min: 0

Responses

Successful response

application/json
item object required
agents number
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
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_enabled enum[] · max items: 3
Values: logs metrics traces
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_policies union anyOf
Any of:
string[]
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
Base URL
https://{kibana_url}