Hi team,
I have a question that I’m having trouble finding the answer to elsewhere.
I would like to create dashboards that customize the data based on the specific user logged in.
The response of this api Post : http://xxxxxxxx:5601/internal/security/login includes a set-cookie
header that contains the session information.
I need to join the data in my dashboard to the current user logged in.
e.g something like - professionalId .user : $currentSessionUser
My index looks like
{
"_index" : "hotelsearch",
"_type" : "search",
"_id" : "1022427",
"_score" : 1.0,
"_source" : {
"professionalId" : 103,
"partnerId" : 25156,
"userAgent" : "Cold",
"checkOut" : "2021-09-08",
"clientNationality" : "TN",
"checkIn" : "2021-09-06",
"partner" : "user1",
"rating" : "",
"language" : "FRA",
"currency" : "TND",
"source" : "api",
"@version" : "1",
"channel" : "b2c",
"rooms" : [
{
"adults" : 2,
"children" : 0
}
],
"cityCode" : "104",
"cityId" : 3,
"dateTime" : "2021-09-04T10:10:17.973Z",
"id" : 1022427,
"@timestamp" : "2021-09-10T11:38:11.107Z",
"countryCode" : "TN",
"searchcode" : "5304191a-b60b-4356-86f2-980cfcc1a450"
}
},
{
"_index" : "hotelsearch",
"_type" : "search",
"_id" : "1022430",
"_score" : 1.0,
"_source" : {
"professionalId" : 10,
"partnerId" : 25156,
"userAgent" : "Cold",
"checkOut" : "2021-09-12",
"clientNationality" : "TN",
"checkIn" : "2021-09-10",
"partner" : "user2",
"rating" : "",
"language" : "FRA",
"currency" : "TND",
"source" : "api",
"@version" : "1",
"channel" : "b2c",
"rooms" : [
{
"children" : 2,
"adults" : 2,
"childrenAges" : [
"4",
"5"
]
}
],
"cityCode" : "104",
"cityId" : 3,
"dateTime" : "2021-09-04T10:10:27.629Z",
"id" : 1022430,
"@timestamp" : "2021-09-10T11:38:11.107Z",
"countryCode" : "TN",
"searchcode" : "a9eeb5b3-e5f5-426b-8d6b-6a100a993f44"
}
}
every user has login and password and a professionalId.
if the user 1 is logged, he will see only the data that refer to his professionalId
so haw can i pass this professionalId with the current session
any help please.
Best regards,
Hiba