Spaces method and path for this operation:
Refer to Spaces for more information.
Install a package by uploading a .zip or .tar.gz archive (max 100MB).
Archives that contain Kibana assets requiring additional privileges are subject to a preflight authorization check before the package is installed. Privileges are checked in every space the package will be installed into.
The following asset types require the corresponding Kibana API privilege:
security_rule:rules-allsecurity_rulewith typemachine_learning:rules-allandml:canCreateJobsecurity_ai_prompt:elasticAssistant
If any required privilege is missing, the request returns 403 and no assets are written. To learn more, refer to Upload an integration to Kibana.
[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all.
Query parameters
-
When true, ignore mapping update errors during installation
Default value is
false. -
When true, skip data stream rollover after installation
Default value is
false.
curl \
--request POST 'https://localhost:5601/api/fleet/epm/packages' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/gzip" \
--header "kbn-xsrf: true"
curl \
--request POST 'https://localhost:5601/api/fleet/epm/packages' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/gzip; application/zip" \
--header "kbn-xsrf: true" \
--data-binary '<binary package archive>'
<binary package archive>
<binary package archive>
{"_meta" => {"install_source" => "upload"}, "items" => [{"id" => "my-custom-package-logs-default", "type" => "index_template"}]}
{
"_meta": {
"install_source": "upload"
},
"items": [
{
"id": "my-custom-package-logs-default",
"type": "index_template"
}
]
}
{"error" => "Bad Request", "message" => "An error message describing what went wrong", "statusCode" => 400}
{
"error": "Bad Request",
"message": "An error message describing what went wrong",
"statusCode": 400
}
{"error" => "Forbidden", "message" => "Insufficient privileges to upload this package", "statusCode" => 403}
{
"error": "Forbidden",
"message": "Insufficient privileges to upload this package",
"statusCode": 403
}