IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
UI settings service
edit
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.
UI settings service
editThe UI settings service is available both server and client side.
Server side usage
editThe program interface to UI settings. It makes it possible for Kibana plugins to extend Kibana UI Settings Management with custom settings.
See:
import { schema } from '@kbn/config-schema'; import type { CoreSetup,Plugin } from 'kibana/server'; export class MyPlugin implements Plugin { public setup(core: CoreSetup) { core.uiSettings.register({ custom: { value: '42', schema: schema.string(), }, }); const router = core.http.createRouter(); router.get({ path: 'my_plugin/{id}', validate: …, }, async (context, request, response) => { const customSetting = await context.uiSettings.client.get('custom'); … }); } }