How do I update advanced settings via Kibana API?

Hi,

I want to know if there is a supported way to update Kibana Advanced Settings (specifically the defaultRoute attribute) using an API.

I’m trying to automate this through Jenkins so that each Kibana space gets a custom landing dashboard without manually changing it in:

Stack Management → Advanced Settings → defaultRoute

Hello @Dhruv_Naik

Welcome to the community!!

via devtools i see below request works :

=================
via DevTools
=================


PUT kbn:/api/saved_objects/config/9.0.2
{
  "attributes": {
    "defaultRoute": "/app/dashboards"
  }
}

=================
via CURL
=================

curl -X PUT "http://localhost:5601/api/saved_objects/config/9.0.2" \
  -H "Content-Type: application/json" \
  -H "kbn-xsrf: true" \
  -H "Authorization: ApiKey keydetail" \
  -d '{
    "attributes": {
      "defaultRoute": "/app/dashboards"
    }
  }'

Thanks!!

Hey @Tortoise thanks a lot, this helped me get it working

1 Like