Kibana Plugins: Using _g and _a in URL to pass state

I noticed that Kibana is using the _g and _a parameters in the URL to let the user set a context for elements such as Time Picker and application specific controls. This seems to be the standard way to pass state through URI.

For instance, it is common for a URL such as the one below to set a time window as well as pick what columns are displayed in the discover mode.


My Question is : How does one do the same thing within the context of a Kibana plugin ? I have a plugin that works well but the user is required to change to a desired state every time, after they land on a default page. I want to provide a dynamic URL which stores session state and helps someone land directly at a desired state.

_g is global state, and it can be updated via the globalState angular service. Here is an example of how the timepicker updates the URL via the global service

_a is the application state. You can get the application state with the getAppState angular service. Then just call the save method once you have updated the state as needed.

We are in the process of removing angular from Kibana so these will be changing over future releases so be prepared for breaks between minor Kibana releases.


Thank you ! that helps.

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