Get package policies

Base URL
https://{kibana_url}
  • GET /api/fleet/package_policies
Auth

List all package policies.

Query parameters

page number

Page number

perPage number

Number of results per page

sortField string

Field to sort results by

sortOrder enum

Sort order, ascending or descending

Values: desc asc
showUpgradeable boolean

When true, only show policies with available upgrades

kuery string

A KQL query string to filter results

format enum

Format for the response: simplified or legacy

Values: simplified legacy
withAgentCount boolean

When true, include the agent count per package policy

Responses

Successful response

application/json
items object[] · max items: 10000 required
additional_datastreams_permissions string[] · max items: 1000 nullable

Additional data stream permissions that will be added to the agent policy.

agents number
cloud_connector_id string nullable

ID of the cloud connector associated with this package policy.

cloud_connector_name string · min length: 1 · max length: 255 nullable

Transient field for cloud connector name during creation.

condition string · max length: 10000 nullable

Agent condition expression to evaluate whether to apply this integration to its inputs.

created_at string required
created_by string required
description string

Package policy description

enabled boolean required
id string required

Package policy unique identifier.

inputs union anyOf required

Package policy inputs.

Any of:
{} { compiled_input, enabled, streams, … }[]
compiled_input object required
condition string · max length: 10000 nullable

Agent condition expression to evaluate whether to apply this input.

config map string to object

Package variable (see integration documentation for more information)

enabled boolean required
id string
keep_enabled boolean
migrate_from string
name string
policy_template string
streams object[] · max items: 1000 required
compiled_stream object required
condition string · max length: 10000 nullable

Agent condition expression to evaluate whether to apply this stream.

config map string to object

Package variable (see integration documentation for more information)

data_stream object required
dataset string required
type string
enabled boolean required
id string
keep_enabled boolean
migrate_from string
release enum
Values: ga beta experimental
var_group_selections map string to string

Variable group selections. Maps var_group name to the selected option name within that group.

<string> string · max length: 1024
vars map string to object

Package variable (see integration documentation for more information)

type string required
var_group_selections map string to string

Variable group selections. Maps var_group name to the selected option name within that group.

<string> string · max length: 1024
vars map string to object

Package variable (see integration documentation for more information)

is_managed boolean
name string required

Unique name for the package policy.

namespace string · max length: 100

The package policy namespace. Leave blank to inherit the agent policy's namespace.

output_id string nullable
package_agent_version_condition string
policy_id string nullable deprecated

ID of the agent policy which the package policy will be added to.

policy_ids string[] · max items: 1000
revision number required

Package policy revision.

spaceIds string[] · max items: 100
supports_agentless boolean nullable

Indicates whether the package policy belongs to an agentless agent policy.

supports_cloud_connector boolean nullable

Indicates whether the package policy supports cloud connectors.

updated_at string required
updated_by string required
var_group_selections map string to string

Variable group selections. Maps var_group name to the selected option name within that group.

<string> string · max length: 1024
vars union anyOf

Package level variable.

Any of:

Package variable (see integration documentation for more information)

version string

Package policy ES version.

page number required
perPage number required
total number required
Base URL
https://{kibana_url}