Query parameters
-
format
string Values are
simplified
orlegacy
.
Body
object
You should use inputs as an object and not use the deprecated inputs array.
-
additional_datastreams_permissions
array[string] | null Additional datastream permissions, that will be added to the agent policy.
-
description
string Package policy description
-
enabled
boolean -
force
boolean Force package policy creation even if package is not verified, or if the agent policy is managed.
-
id
string Package policy unique identifier
-
inputs
array[object] Required Hide inputs attributes Show inputs attributes object
-
config
object Package variable (see integration documentation for more information)
-
enabled
boolean Required -
id
string -
keep_enabled
boolean -
policy_template
string -
streams
array[object] Hide streams attributes Show streams attributes object
-
config
object Package variable (see integration documentation for more information)
-
data_stream
object Required Additional properties are NOT allowed.
Hide data_stream attributes Show data_stream attributes object
-
dataset
string Required -
elasticsearch
object Additional properties are NOT allowed.
Hide elasticsearch attributes Show elasticsearch attributes object
-
dynamic_dataset
boolean -
dynamic_namespace
boolean -
privileges
object Additional properties are NOT allowed.
Hide privileges attribute Show privileges attribute object
-
indices
array[string]
-
-
-
type
string Required
-
-
enabled
boolean Required -
id
string -
keep_enabled
boolean -
release
string Values are
ga
,beta
, orexperimental
. -
vars
object Package variable (see integration documentation for more information)
-
-
type
string Required -
vars
object Package variable (see integration documentation for more information)
-
-
is_managed
boolean -
name
string Required Package policy name (should be unique)
-
namespace
string The package policy namespace. Leave blank to inherit the agent policy's namespace.
-
output_id
string | null -
overrides
object | null 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.
Additional properties are NOT allowed.
Hide overrides attribute Show overrides attribute object | null
-
inputs
object Additional properties are allowed.
-
-
package
object Additional properties are NOT allowed.
Hide package attributes Show package attributes object
-
experimental_data_stream_features
array[object] Hide experimental_data_stream_features attributes Show experimental_data_stream_features attributes object
-
data_stream
string Required -
features
object Required Additional properties are NOT allowed.
Hide features attributes Show features attributes object
-
doc_value_only_numeric
boolean -
doc_value_only_other
boolean -
synthetic_source
boolean -
tsdb
boolean
-
-
-
name
string Required Package name
-
requires_root
boolean -
title
string -
version
string Required Package version
-
-
policy_id
string | null Deprecated Agent policy ID where that package policy will be added
-
policy_ids
array[string] Agent policy IDs where that package policy will be added
-
supports_agentless
boolean | null Indicates whether the package policy belongs to an agentless agent policy.
Default value is
false
. -
vars
object Package variable (see integration documentation for more information)
-
additional_datastreams_permissions
array[string] | null Additional datastream permissions, that will be added to the agent policy.
-
description
string -
force
boolean -
id
string -
inputs
object Package policy inputs (see integration documentation to know what inputs are available)
Hide inputs attribute Show inputs attribute object
-
*
object Additional properties Additional properties are NOT allowed.
Hide * attributes Show * attributes object
-
enabled
boolean enable or disable that input, (default to true)
-
streams
object Input streams (see integration documentation to know what streams are available)
Hide streams attribute Show streams attribute object
-
vars
object Input/stream level variable (see integration documentation for more information)
-
-
-
name
string Required -
namespace
string -
output_id
string | null -
package
object Required Additional properties are NOT allowed.
Hide package attributes Show package attributes object
-
experimental_data_stream_features
array[object] Hide experimental_data_stream_features attributes Show experimental_data_stream_features attributes object
-
data_stream
string Required -
features
object Required Additional properties are NOT allowed.
Hide features attributes Show features attributes object
-
doc_value_only_numeric
boolean -
doc_value_only_other
boolean -
synthetic_source
boolean -
tsdb
boolean
-
-
-
name
string Required Package name
-
requires_root
boolean -
title
string -
version
string Required Package version
-
-
policy_id
string | null -
policy_ids
array[string] -
supports_agentless
boolean | null Indicates whether the package policy belongs to an agentless agent policy.
Default value is
false
. -
vars
object Input/stream level variable (see integration documentation for more information)
Responses
-
200 application/json
Hide response attribute Show response attribute object
-
item
object Required Additional properties are NOT allowed.
Hide item attributes Show item attributes object
-
additional_datastreams_permissions
array[string] | null Additional datastream permissions, that will be added to the agent policy.
-
agents
number -
created_at
string Required -
created_by
string Required -
description
string Package policy description
-
elasticsearch
object Additional properties are allowed.
Hide elasticsearch attribute Show elasticsearch attribute object
-
privileges
object Additional properties are allowed.
Hide privileges attribute Show privileges attribute object
-
cluster
array[string]
-
-
-
enabled
boolean Required -
id
string Required inputs
array[object] | object Required Any of: Hide attributes Show attributes object
-
config
object Package variable (see integration documentation for more information)
-
enabled
boolean Required -
id
string -
keep_enabled
boolean -
policy_template
string -
streams
array[object] Required Hide streams attributes Show streams attributes object
-
config
object Package variable (see integration documentation for more information)
-
data_stream
object Required Additional properties are NOT allowed.
Hide data_stream attributes Show data_stream attributes object
-
dataset
string Required -
elasticsearch
object Additional properties are NOT allowed.
Hide elasticsearch attributes Show elasticsearch attributes object
-
dynamic_dataset
boolean -
dynamic_namespace
boolean -
privileges
object Additional properties are NOT allowed.
Hide privileges attribute Show privileges attribute object
-
indices
array[string]
-
-
-
type
string Required
-
-
enabled
boolean Required -
id
string -
keep_enabled
boolean -
release
string Values are
ga
,beta
, orexperimental
. -
vars
object Package variable (see integration documentation for more information)
-
-
type
string Required -
vars
object Package variable (see integration documentation for more information)
Package policy inputs (see integration documentation to know what inputs are available)
Hide attribute Show attribute
-
*
object Additional properties Additional properties are NOT allowed.
Hide * attributes Show * attributes object
-
enabled
boolean enable or disable that input, (default to true)
-
streams
object Input streams (see integration documentation to know what streams are available)
Hide streams attribute Show streams attribute object
-
vars
object Input/stream level variable (see integration documentation for more information)
-
-
-
is_managed
boolean -
name
string Required Package policy name (should be unique)
-
namespace
string The package policy namespace. Leave blank to inherit the agent policy's namespace.
-
output_id
string | null -
overrides
object | null 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.
Additional properties are NOT allowed.
Hide overrides attribute Show overrides attribute object | null
-
inputs
object Additional properties are allowed.
-
-
package
object Additional properties are NOT allowed.
Hide package attributes Show package attributes object
-
experimental_data_stream_features
array[object] Hide experimental_data_stream_features attributes Show experimental_data_stream_features attributes object
-
data_stream
string Required -
features
object Required Additional properties are NOT allowed.
Hide features attributes Show features attributes object
-
doc_value_only_numeric
boolean -
doc_value_only_other
boolean -
synthetic_source
boolean -
tsdb
boolean
-
-
-
name
string Required Package name
-
requires_root
boolean -
title
string -
version
string Required Package version
-
-
policy_id
string | null Deprecated Agent policy ID where that package policy will be added
-
policy_ids
array[string] Agent policy IDs where that package policy will be added
-
revision
number Required -
secret_references
array[object] Hide secret_references attribute Show secret_references attribute object
-
id
string Required
-
-
spaceIds
array[string] -
supports_agentless
boolean | null Indicates whether the package policy belongs to an agentless agent policy.
Default value is
false
. -
updated_at
string Required -
updated_by
string Required -
version
string
-
-
-
400 application/json
Hide response attributes Show response attributes object
-
error
string -
errorType
string -
message
string Required -
statusCode
number
-
-
409 application/json
Hide response attributes Show response attributes object
-
error
string -
errorType
string -
message
string Required -
statusCode
number
-
curl \
--request POST 'http://localhost:5622/api/fleet/package_policies' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--header "kbn-xsrf: true" \
--data '{"additional_datastreams_permissions":["string"],"description":"string","enabled":true,"force":true,"id":"string","inputs":[{"config":{"additionalProperty1":{"frozen":true,"type":"string"},"additionalProperty2":{"frozen":true,"type":"string"}},"enabled":true,"id":"string","keep_enabled":true,"policy_template":"string","streams":[{"config":{"additionalProperty1":{"frozen":true,"type":"string"},"additionalProperty2":{"frozen":true,"type":"string"}},"data_stream":{"dataset":"string","elasticsearch":{"dynamic_dataset":true,"dynamic_namespace":true,"privileges":{"indices":["string"]}},"type":"string"},"enabled":true,"id":"string","keep_enabled":true,"release":"ga","vars":{"additionalProperty1":{"frozen":true,"type":"string"},"additionalProperty2":{"frozen":true,"type":"string"}}}],"type":"string","vars":{"additionalProperty1":{"frozen":true,"type":"string"},"additionalProperty2":{"frozen":true,"type":"string"}}}],"is_managed":true,"name":"string","namespace":"string","output_id":"string","overrides":{"inputs":{}},"package":{"experimental_data_stream_features":[{"data_stream":"string","features":{"doc_value_only_numeric":true,"doc_value_only_other":true,"synthetic_source":true,"tsdb":true}}],"name":"string","requires_root":true,"title":"string","version":"string"},"policy_id":"string","policy_ids":["string"],"supports_agentless":false,"vars":{"additionalProperty1":{"frozen":true,"type":"string"},"additionalProperty2":{"frozen":true,"type":"string"}}}'