KIbana Theme

Hello,

Is there a curl command to activate or deactivate the dark theme in kibana?

You can use our Saved Objects API for this. Here's an example request, make sure to replace the URL and the version number for your version of Elastic Stack.

curl -XPUT https://mykibanaurl:5601/api/saved_objects/config/7.2.0 -d'
{
  "attributes": {
    "theme:darkMode": true
  }
}'

Hey @joshdover,
Thank you for your quick update.
I used this one, and it also works :
curl -X POST "https://mykibanaurl:5601/api/kibana/settings" --header "Content-type: application/json" -H 'kbn-xsrf: true' -d '{"changes":{"theme:darkMode":true}}'

Yes that one will work too, but it is not a public API and may break in future minor versions. The Saved Objects API is not expected to break or change.

Thank you so much for the clarification and for your help.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.