Spaces method and path for this operation:
post /s/{space_id}/api/fleet/epm/packages/_bulk_namespace_customization
Refer to Spaces for more information.
Enable or disable namespace-level index template customization for a list of packages in one call. Use this for IaC-style declarative flows.
[Required authorization] Route required privileges: integrations-all AND fleet-agent-policies-all.
Body
-
Namespaces to disable namespace-level customization for on each package.
Not more than
100elements. -
Namespaces to enable namespace-level customization for on each package.
Not more than
100elements. -
Package names to apply the customization changes to.
At least
1but not more than1000elements.
POST
/api/fleet/epm/packages/_bulk_namespace_customization
curl \
--request POST 'https://localhost:5601/api/fleet/epm/packages/_bulk_namespace_customization' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--header "kbn-xsrf: true" \
--data '{"disable":["dev"],"enable":["production","staging"],"packages":["system","nginx"]}'
Request example
{
"disable": [
"dev"
],
"enable": [
"production",
"staging"
],
"packages": [
"system",
"nginx"
]
}
Response examples (200)
{
"items": [
{
"name": "system",
"namespace_customization_enabled_for": [
"production",
"staging"
],
"success": true
},
{
"error": "Package nginx is not installed",
"name": "nginx",
"success": false
}
]
}
Response examples (400)
{
"error": "Bad Request",
"message": "Namespaces must not appear in both enable and disable: production",
"statusCode": 400
}