# Anyway to add some flag for request from dashboard or visualize

**URL:** <https://discuss.elastic.co/t/anyway-to-add-some-flag-for-request-from-dashboard-or-visualize/88411>\
**Category:** Kibana\
**Created:** [June 6, 2017, 12:20pm UTC](https://discuss.elastic.co/t/anyway-to-add-some-flag-for-request-from-dashboard-or-visualize/88411 "2017-06-06T12:20:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![whoami](https://avatars.discourse-cdn.com/v4/letter/w/a9a28c/32.png) [@whoami](https://discuss.elastic.co/u/whoami)\
**Post date:** [June 6, 2017, 12:20pm UTC](https://discuss.elastic.co/t/anyway-to-add-some-flag-for-request-from-dashboard-or-visualize/88411/1 "2017-06-06T12:20:50Z")

</div>

anyway to add some flag for request from dashboard or visualize.  
then I can identify the request is from visualize or dashboard in my proxy layer.

I guess its something about searchSource or courier, i am not sure. anyone know that, and please show some core code for me, thanks

---

<div class="post-metadata">

**Author:** ![weltenwort](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weltenwort/32/53885_2.png) [@weltenwort](https://discuss.elastic.co/u/weltenwort)\
**Post date:** [June 6, 2017, 4:33pm UTC](https://discuss.elastic.co/t/anyway-to-add-some-flag-for-request-from-dashboard-or-visualize/88411/2 "2017-06-06T16:33:25Z")

</div>

All of Discover, Visualize and Dashboard use the same query mechanism underneath which makes them hard to distinguish. I would not consider what you ask to be an easy task, but you might be able to loop such a parameter through from the [`SearchSource`](https://github.com/elastic/kibana/blob/master/src/ui/public/courier/data_source/search_source.js) through the [`Request`](https://github.com/elastic/kibana/blob/master/src/ui/public/courier/fetch/request/request.js) to [`callClient`](https://github.com/elastic/kibana/blob/master/src/ui/public/courier/fetch/call_client.js).

---

<div class="post-metadata">

**Author:** ![whoami](https://avatars.discourse-cdn.com/v4/letter/w/a9a28c/32.png) [@whoami](https://discuss.elastic.co/u/whoami)\
**Post date:** [June 7, 2017, 1:36am UTC](https://discuss.elastic.co/t/anyway-to-add-some-flag-for-request-from-dashboard-or-visualize/88411/3 "2017-06-07T01:36:19Z")

</div>

could you tell me, how or where visualize or dashboard use the searchsource in the source code?

---

<div class="post-metadata">

**Author:** ![weltenwort](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weltenwort/32/53885_2.png) [@weltenwort](https://discuss.elastic.co/u/weltenwort)\
**Post date:** [June 7, 2017, 11:27am UTC](https://discuss.elastic.co/t/anyway-to-add-some-flag-for-request-from-dashboard-or-visualize/88411/4 "2017-06-07T11:27:36Z")

</div>

They use it via the `SavedObject` the the respective visualization or dashboard is based on: [https://github.com/elastic/kibana/blob/290840509d75c8d0ac165c8029fbdb419336b8d3/src/ui/public/courier/saved\_object/saved\_object.js#L92](https://github.com/elastic/kibana/blob/290840509d75c8d0ac165c8029fbdb419336b8d3/src/ui/public/courier/saved_object/saved_object.js#L92)

---

<div class="post-metadata">

**Author:** ![whoami](https://avatars.discourse-cdn.com/v4/letter/w/a9a28c/32.png) [@whoami](https://discuss.elastic.co/u/whoami)\
**Post date:** [June 9, 2017, 8:30am UTC](https://discuss.elastic.co/t/anyway-to-add-some-flag-for-request-from-dashboard-or-visualize/88411/5 "2017-06-09T08:30:37Z")

</div>

visualize or dashboard can mget or msearch some data in es, you mean it also use saved\_object?

---

<div class="post-metadata">

**Author:** ![weltenwort](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weltenwort/32/53885_2.png) [@weltenwort](https://discuss.elastic.co/u/weltenwort)\
**Post date:** [June 9, 2017, 9:32am UTC](https://discuss.elastic.co/t/anyway-to-add-some-flag-for-request-from-dashboard-or-visualize/88411/6 "2017-06-09T09:32:59Z")

</div>

I just tried to point out where the `SearchSource` is created so you can find a suitable place to make your changes. The `SavedObject` class is used to load the visualization or dashboard definition.

---

<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:** [July 7, 2017, 9:33am UTC](https://discuss.elastic.co/t/anyway-to-add-some-flag-for-request-from-dashboard-or-visualize/88411/7 "2017-07-07T09:33:07Z")

</div>

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