Create a package policy
- Base URL
-
https://{kibana_url}
- POST /api/fleet/package_policies
- POST /s/{space_id}/api/fleet/package_policies
Create a new package policy and assign it to an agent policy.
Path parameters
-
space_idstringoptional -
An identifier for the space. If
space_idis not provided in the URL, the default space is used. Refer to Spaces for more information.
Request body
-
acknowledge_agent_version_incompatibilityboolean -
When true, create or upgrade the package policy even though some active agents on its agent policies don't satisfy the package's agent version condition. Without it, the request is rejected, because those agents would stop collecting the integration's data. The
forceflag does not bypass this check. -
additional_datastreams_permissionsstring[] · max items: 1000nullable -
Additional data stream permissions that will be added to the agent policy.
-
cloud_connector_namestring · min length: 1 · max length: 255nullable -
Transient field for cloud connector name during creation.
-
conditionstring · max length: 10000nullable -
Agent condition expression to evaluate whether to apply this integration to its inputs.
-
create_dataset_templatesboolean -
When true, install dedicated index templates for streams with a custom data_stream.dataset. Defaults to true for input packages, false for integration packages.
-
forceboolean -
Force package policy creation even if the package is not verified, or if the agent policy is managed.
-
inputsobject[] · max items: 1000required -
namespacestring · max length: 100 -
The package policy namespace. Leave blank to inherit the agent policy's namespace.
-
overridesobjectnullable -
Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure.
-
policy_idstringnullable deprecated -
ID of the agent policy which the package policy will be added to.
-
supports_agentlessbooleannullable deprecated -
Indicates whether the package policy belongs to an agentless agent policy. Deprecated in favor of the Fleet managed integrations API.
-
supports_cloud_connectorbooleannullable -
Indicates whether the package policy supports cloud connectors.
-
acknowledge_agent_version_incompatibilityboolean -
When true, create or upgrade the package policy even though some active agents on its agent policies don't satisfy the package's agent version condition. Without it, the request is rejected, because those agents would stop collecting the integration's data. The
forceflag does not bypass this check. -
additional_datastreams_permissionsstring[] · max items: 100nullable -
Additional data stream permissions that will be added to the agent policy.
-
conditionstring · max length: 10000nullable -
Agent condition expression to evaluate whether to apply this integration to its inputs.
-
create_dataset_templatesboolean -
When true, install dedicated index templates for streams with a custom data_stream.dataset. Defaults to true for input packages, false for integration packages.
-
forceboolean -
Force package policy creation even if the package is not verified, or if the agent policy is managed.
-
inputsmap string to object -
Package policy inputs. Refer to the integration documentation to know which inputs are available.
-
property name*additional propertyobject -
conditionstring · max length: 10000nullable -
Agent condition expression to evaluate whether to apply this input.
-
streamsmap string to object -
Input streams. Refer to the integration documentation to know which streams are available.
-
namespacestring · max length: 100 -
Policy namespace. When not specified, it inherits the agent policy namespace.
-
packageobjectrequired -
Same fields as
packageincreate_package_policy_request -
policy_idsstring[] · max items: 1000 -
IDs of the agent policies that the package policy will be added to.
-
supports_agentlessbooleannullable deprecated -
Indicates whether the package policy belongs to an agentless agent policy. Deprecated in favor of the Fleet managed integrations API.
Responses
Successful response
-
itemobjectrequired -
additional_datastreams_permissionsstring[] · max items: 1000nullable -
Additional data stream permissions that will be added to the agent policy.
-
cloud_connector_namestring · min length: 1 · max length: 255nullable -
Transient field for cloud connector name during creation.
-
conditionstring · max length: 10000nullable -
Agent condition expression to evaluate whether to apply this integration to its inputs.
-
inputsunion anyOfrequired -
Package policy inputs.
- Any of:
-
property name*additional propertyobject -
conditionstring · max length: 10000nullable -
Agent condition expression to evaluate whether to apply this input.
-
streamsmap string to object -
Input streams. Refer to the integration documentation to know which streams are available.
-
namespacestring · max length: 100 -
The package policy namespace. Leave blank to inherit the agent policy's namespace.
-
overridesobjectnullable -
Override settings that are defined in the package policy. The override option should be used only in unusual circumstances and not as a routine procedure.
-
packageobject -
Same fields as
packageincreate_package_policy_request -
policy_idstringnullable deprecated -
ID of the agent policy which the package policy will be added to.
-
supports_agentlessbooleannullable -
Indicates whether the package policy belongs to an agentless agent policy.
-
supports_cloud_connectorbooleannullable -
Indicates whether the package policy supports cloud connectors.
-
var_group_selectionsmap string to string -
Variable group selections. Maps var_group name to the selected option name within that group.
-
property name*additional propertystring · max length: 1024
{ compiled_input, enabled, streams, … }[]
Package policy inputs. Refer to the integration documentation to know which inputs are available.
Bad Request