Spaces method and path for this operation:
Refer to Spaces for more information.
Create a new package policy and assign it to an agent policy.
Body
object
You should use inputs as an object and not use the deprecated inputs array.
-
Additional datastream permissions, that will be added to the agent policy.
Not more than
1000elements. -
ID of the cloud connector associated with this package policy.
-
Transient field for cloud connector name during creation.
Minimum length is
1, maximum length is255. -
Package policy description
-
Force package policy creation even if the package is not verified, or if the agent policy is managed.
-
Not more than
100elements.Hide global_data_tags attributes Show global_data_tags attributes object
-
Package policy unique identifier
-
Not more than
1000elements.Hide inputs attributes Show inputs attributes object
-
Package variable (see integration documentation for more information)
-
Additional properties are NOT allowed.
-
Not more than
1000elements.Hide streams attributes Show streams attributes object
-
Package variable (see integration documentation for more information)
-
Additional properties are NOT allowed.
Hide data_stream attributes Show data_stream attributes object
-
Additional properties are NOT allowed.
-
Additional properties are NOT allowed.
-
Values are
ga,beta, orexperimental. -
Variable group selections. Maps var_group name to the selected option name within that group.
-
Package variable (see integration documentation for more information)
-
Variable group selections. Maps var_group name to the selected option name within that group.
-
Package variable (see integration documentation for more information)
-
-
Unique name for the package policy.
-
The package policy namespace. Leave blank to inherit the agent policy's namespace.
-
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.
-
Additional properties are NOT allowed.
Hide package attributes Show package attributes object
-
Not more than
100elements.Hide experimental_data_stream_features attributes Show experimental_data_stream_features attributes object
-
Package name
-
Package version
-
-
ID of the agent policy which the package policy will be added to.
-
IDs of the agent policies which that package policy will be added to.
Not more than
1000elements. -
Not more than
100elements. -
Indicates whether the package policy belongs to an agentless agent policy. Deprecated in favor of the Fleet agentless policies API.
Default value is
false. -
Indicates whether the package policy supports cloud connectors.
Default value is
false. -
Variable group selections. Maps var_group name to the selected option name within that group.
-
Package variable (see integration documentation for more information)
-
Additional datastream permissions, that will be added to the agent policy.
Not more than
100elements. -
Policy description.
-
Force package policy creation even if the package is not verified, or if the agent policy is managed.
-
Policy unique identifier.
-
Package policy inputs. Refer to the integration documentation to know which inputs are available.
Hide inputs attribute Show inputs attribute object
-
Additional properties are NOT allowed.
Hide * attributes Show * attributes object
-
Additional properties are NOT allowed.
-
Enable or disable that input. Defaults to
true(enabled). -
Input streams. Refer to the integration documentation to know which streams are available.
Hide streams attribute Show streams attribute object
-
Additional properties are NOT allowed.
Hide * attributes Show * attributes object
-
Additional properties are NOT allowed.
-
Enable or disable that stream. Defaults to
true(enabled). -
Variable group selections. Maps var_group name to the selected option name within that group.
-
Input/stream level variable. Refer to the integration documentation for more information.
-
-
-
Input/stream level variable. Refer to the integration documentation for more information.
-
-
-
Unique name for the policy.
-
Policy namespace. When not specified, it inherits the agent policy namespace.
-
Additional properties are NOT allowed.
Hide package attributes Show package attributes object
-
Not more than
100elements.Hide experimental_data_stream_features attributes Show experimental_data_stream_features attributes object
-
Package name
-
Package version
-
-
Deprecated. Use policy_ids instead.
-
IDs of the agent policies which that package policy will be added to.
Not more than
1000elements. -
Indicates whether the package policy belongs to an agentless agent policy. Deprecated in favor of the Fleet agentless policies API.
Default value is
false. -
Variable group selections. Maps var_group name to the selected option name within that group.
-
Input/stream level variable. Refer to the integration documentation for more information.
Responses
-
Successful response
Hide response attribute Show response attribute object
-
Additional properties are NOT allowed.
Hide item attributes Show item attributes object
-
Additional datastream permissions, that will be added to the agent policy.
Not more than
1000elements. -
ID of the cloud connector associated with this package policy.
-
Transient field for cloud connector name during creation.
Minimum length is
1, maximum length is255. -
Package policy description
-
Additional properties are allowed.
-
Not more than
100elements.Hide global_data_tags attributes Show global_data_tags attributes object
-
Package policy unique identifier.
inputs
array[object] | object Required Package policy inputs.
Any of: Not more than
100elements.Hide attributes Show attributes object
-
Package variable (see integration documentation for more information)
-
Additional properties are NOT allowed.
-
Not more than
1000elements.Hide streams attributes Show streams attributes object
-
Package variable (see integration documentation for more information)
-
Additional properties are NOT allowed.
Hide data_stream attributes Show data_stream attributes object
-
Additional properties are NOT allowed.
-
Additional properties are NOT allowed.
-
Values are
ga,beta, orexperimental. -
Variable group selections. Maps var_group name to the selected option name within that group.
-
Package variable (see integration documentation for more information)
-
Variable group selections. Maps var_group name to the selected option name within that group.
-
Package variable (see integration documentation for more information)
Package policy inputs. Refer to the integration documentation to know which inputs are available.
Hide attribute Show attribute
-
Additional properties are NOT allowed.
Hide * attributes Show * attributes object
-
Additional properties are NOT allowed.
-
Enable or disable that input. Defaults to
true(enabled). -
Input streams. Refer to the integration documentation to know which streams are available.
Hide streams attribute Show streams attribute object
-
Additional properties are NOT allowed.
Hide * attributes Show * attributes object
-
Additional properties are NOT allowed.
-
Enable or disable that stream. Defaults to
true(enabled). -
Variable group selections. Maps var_group name to the selected option name within that group.
-
Input/stream level variable. Refer to the integration documentation for more information.
-
-
-
Input/stream level variable. Refer to the integration documentation for more information.
-
-
Unique name for the package policy.
-
The package policy namespace. Leave blank to inherit the agent policy's namespace.
-
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.
-
Additional properties are NOT allowed.
Hide package attributes Show package attributes object
-
Not more than
100elements.Hide experimental_data_stream_features attributes Show experimental_data_stream_features attributes object
-
Package name
-
Package version
-
-
ID of the agent policy which the package policy will be added to.
-
IDs of the agent policies which that package policy will be added to.
Not more than
1000elements. -
Package policy revision.
-
Not more than
1000elements. -
Not more than
100elements. -
Indicates whether the package policy belongs to an agentless agent policy.
Default value is
false. -
Indicates whether the package policy supports cloud connectors.
Default value is
false. -
Variable group selections. Maps var_group name to the selected option name within that group.
-
Package policy ES version.
-
-
-
Bad Request
-
Conflict
curl \
--request POST 'https://localhost:5601/api/fleet/package_policies' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--header "kbn-xsrf: true" \
--data '{"inputs":{},"name":"nginx-1","namespace":"default","package":{"name":"nginx","version":"1.20.0"},"policy_ids":["agent-policy-id-1"]}'
{
"inputs": {},
"name": "nginx-1",
"namespace": "default",
"package": {
"name": "nginx",
"version": "1.20.0"
},
"policy_ids": [
"agent-policy-id-1"
]
}
{
"item": {
"created_at": "2024-01-15T10:00:00.000Z",
"enabled": true,
"id": "package-policy-id-2",
"inputs": [],
"name": "nginx-1",
"namespace": "default",
"package": {
"name": "nginx",
"title": "Nginx",
"version": "1.20.0"
},
"policy_ids": [
"agent-policy-id-1"
],
"updated_at": "2024-01-15T10:00:00.000Z"
}
}
{
"error": "Bad Request",
"message": "An error message describing what went wrong",
"statusCode": 400
}
{
"error": "Conflict",
"message": "An error message describing what went wrong",
"statusCode": 409
}