Spaces method and path for this operation:
Refer to Spaces for more information.
Body
You should use inputs as an object and not use the deprecated inputs array.
-
Package policy description
-
Force package policy creation even if package is not verified, or if the agent policy is managed.
-
Package policy unique identifier
-
Package policy inputs (see integration documentation to know what inputs are available)
-
Package policy name (should be unique)
-
The package policy namespace. Leave blank to inherit the agent policy's namespace.
-
Output ID to send package data to
-
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.
-
Agent policy ID where that package policy will be added
-
Agent policy IDs where that package policy will be added
-
Package root level variable (see integration documentation for more information)
curl \
--request POST 'https://localhost:5601/api/fleet/package_policies' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--header "kbn-xsrf: string" \
--data '{
"description": "my description",
"force": true,
"id": "string",
"inputs": {
"nginx-logfile": {
"enabled": true,
"streams": {
"nginx.access": {
"enabled": true,
"vars": {
"ignore_older": "72h",
"paths": [
"/var/log/nginx/access.log*"
],
"preserve_original_event": false,
"tags": [
"nginx-access"
]
}
}
}
}
},
"name": "nginx-123",
"namespace": "customnamespace",
"output_id": "output-id",
"overrides": {
"inputs": {}
},
"package": {
"name": "nginx",
"version": "1.6.0"
},
"policy_id": "agent-policy-id",
"policy_ids": [
"agent-policy-id"
],
"vars": {}
}'