# Kibana Custom Visulaization Session Object

**URL:** <https://discuss.elastic.co/t/kibana-custom-visulaization-session-object/198532>\
**Category:** Kibana\
**Created:** [September 8, 2019, 3:08am UTC](https://discuss.elastic.co/t/kibana-custom-visulaization-session-object/198532 "2019-09-08T03:08:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![adityaPsl](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@adityaPsl](https://discuss.elastic.co/u/adityaPsl)\
**Post date:** [September 8, 2019, 3:08am UTC](https://discuss.elastic.co/t/kibana-custom-visulaization-session-object/198532/1 "2019-09-08T03:08:39Z")

</div>

Hello Team,

I am working on a use case wherei had to update the documents. i have created a custom plugin with EUIBasic Table , selection option.  
Now, i want to handle multiple users trying to update the same record. could you please help me understand is there any session object which i can use to identify records are already selected by some other user.

Here is an example of use case

User 1 -\> opens UI and selects records 1,2,3 for update  
at the same time user 2 opens UI  
User 2 -\> opens UI and selects records 1,2,3 for delete  
and before user1 click update user 2 deletes records and now user 1 updates the same records.  
so i want to achieve something like when user1 selects records and trying to work on them so noo other user should be able to select the same records as they are already selected, can we put those in some place which is common for all users.

Kibana Version : 6.7 and 7.2

Thank you for your help and support,  
Adity

---

<div class="post-metadata">

**Author:** ![adityaPsl](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@adityaPsl](https://discuss.elastic.co/u/adityaPsl)\
**Post date:** [September 11, 2019, 6:47am UTC](https://discuss.elastic.co/t/kibana-custom-visulaization-session-object/198532/2 "2019-09-11T06:47:00Z")

</div>

Hello Team,

I think I found a way to handle concurrency through locking mechanism provided by elastic.

Thank you,  
Aditya

---

<div class="post-metadata">

**Author:** ![rashmi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rashmi/32/16391_2.png) [@rashmi](https://discuss.elastic.co/u/rashmi)\
**Post date:** [September 11, 2019, 2:46pm UTC](https://discuss.elastic.co/t/kibana-custom-visulaization-session-object/198532/3 "2019-09-11T14:46:05Z")

</div>

Glad you found the solution. Plz post it so that other users can benefit as well.

Thanks  
Rashmi

---

<div class="post-metadata">

**Author:** ![adityaPsl](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@adityaPsl](https://discuss.elastic.co/u/adityaPsl)\
**Post date:** [September 11, 2019, 3:46pm UTC](https://discuss.elastic.co/t/kibana-custom-visulaization-session-object/198532/4 "2019-09-11T15:46:45Z")

</div>

Hello Team,

As explained in [Solving Concurrency Issues](https://www.elastic.co/guide/en/elasticsearch/guide/current/concurrency-solutions.html#document-locking) , i am thinking of creating a transaction

user 1 logs in opens UI -\> get lock using API  
`PUT /fs/lock/<index_name>/_create { "lock_type": "exclusive" }`

user1 will perform operations like update/delete etc

and releases lock using API  
`DELETE /fs/lock/<index_name>`

If any other user logs in and tries to access the UI the lock API will try to acquire the lock on the same index but will get error since other user has already acquired an exclusive lock(Checked this by executing APIs from Kibana Dev Tools).

To test the scenario i need to implement it Kibana custom visualization, to understand how can i execute lock APIs using CallWithRequest Client, I have opened a new topic [here]([How to call lock APIs using call with request](https://discuss.elastic.co/t/how-to-call-lock-apis-using-call-with-request/199026)

Thank you,  
Aditya

---

<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:** [October 9, 2019, 3:46pm UTC](https://discuss.elastic.co/t/kibana-custom-visulaization-session-object/198532/5 "2019-10-09T15:46:50Z")

</div>

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