# Empty uiState in a custom request handler

**URL:** <https://discuss.elastic.co/t/empty-uistate-in-a-custom-request-handler/214645>\
**Category:** Kibana\
**Created:** [January 10, 2020, 5:33pm UTC](https://discuss.elastic.co/t/empty-uistate-in-a-custom-request-handler/214645 "2020-01-10T17:33:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pchakour](https://avatars.discourse-cdn.com/v4/letter/p/e36b37/32.png) [@pchakour](https://discuss.elastic.co/u/pchakour)\
**Post date:** [January 10, 2020, 5:33pm UTC](https://discuss.elastic.co/t/empty-uistate-in-a-custom-request-handler/214645/1 "2020-01-10T17:33:42Z")

</div>

Hello, It's me again 🙂

I'm migrating an old custom plugin from kibana 6.5 to kibana 7.5.  
The plugin is developed with AngularJS and has a custom request handler.

In this request handler, I use the _ **uiState** _ from the interface _ **RequestHandlerParameters** _ to request data based on this.

But, this object doesn't contain the data stored by the plugin using the _ **vis.uiStateVal** _ function from the scope of the controller.

I capture the object content from the request handler:

 ![uistate_request_handler](https://us1.discourse-cdn.com/elastic/original/3X/5/4/544b84e4bb8901fcaf05cf8b55fb9d2ddb68f5a4.png)

And from the angular controller:

 ![uistate_from_angular_controller](https://us1.discourse-cdn.com/elastic/original/3X/6/b/6bf8c5c788947c766854b04e3eca7c748512247a.png)

So, why the content is different ? Am I using the wrong uiState object in the request handler ?

---

<div class="post-metadata">

**Author:** ![joshdover](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joshdover/32/42020_2.png) [@joshdover](https://discuss.elastic.co/u/joshdover)\
**Post date:** [January 10, 2020, 5:45pm UTC](https://discuss.elastic.co/t/empty-uistate-in-a-custom-request-handler/214645/2 "2020-01-10T17:45:57Z")

</div>

@ppisljar do you have any advice on how to get uiState in the New Platform?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 7, 2020, 5:46pm UTC](https://discuss.elastic.co/t/empty-uistate-in-a-custom-request-handler/214645/3 "2020-02-07T17:46:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ppisljar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ppisljar/32/11588_2.png) [@ppisljar](https://discuss.elastic.co/u/ppisljar)\
**Post date:** [February 26, 2020, 4:15pm UTC](https://discuss.elastic.co/t/empty-uistate-in-a-custom-request-handler/214645/4 "2020-02-26T16:15:34Z")

</div>

uiState won't be available on the request handler, as the request handler and response handlers are part of the data fetching pipeline, where uiState is passed only to the rendering part.
