Visualization Request/Response handler changes #24396
Labels
release_note:plugin_api_changes
Contains a Plugin API changes section for the breaking plugin API changes section.
Team:Visualizations
Visualization editors, elastic-charts and infrastructure
v6.5.0
v7.0.0
This issue is purely meant for documentation some developer changes, so it will be pulled into the automatically generated blog post.
Dev-Docs
Visualization Request/Response Handlers
Visualizations request and response handlers have been refactored and thus a couple of changes are required for plugins that provide custom visualizations, no matter if they used a custom request or response handler or not.
Related PRs: #19061, #22583
New tabify format
The default so called
tabify
format (tabular representation of data) has changed towards the following structure:The main difference is, that each row is no longer an array of values, but an object where the key is the column id and the value the value for that column.
Request handlers
The default (
courier
) request handler will now return this new tabify format, instead of a raw elasticsearch response.In case your plugin provides a custom request handler, we're recommending to return that tabified format too. This is not required at the moment, but makes it easier for your plugin to adjust to upcoming changes.
Response handlers
The old
tabify
response handler has been removed, since the default request handler now returns that tabified format. The default response handler is nownone
which just pass through the request handlers result.Also the response handler doesn't recieve a
vis
parameter anymore, but only a single parameter which holds the tabified data.Legacy response handler
For an easier conversion you can still use the old tabify format, by setting
responseHandler: 'legacy'
in your visualization type registration. This response handler converts the new tabify format to the old format.The
legacy
response handler is deprecated! You should only switch to this in case you can't (immediately) update your visualization easily to the newtabify
format. We will remove thelegacy
response handler in 7.0.Basic response handler
The
basic
response handler has been renamed tovislib
.You should NOT use this response handler outside of Kibana.
The text was updated successfully, but these errors were encountered: