Shortened url from painless

(Matt McGovern) #1

Is there any way to call the shortened url api from a painless script, preferably without making a post/put call?

I have a stored script that all our watchers use...and it returns back the link to one of our kibana dashboards. The link is very long and breaks for those who have to copy/paste the link. We're currently in 6.5 kibana.

Calling shorten URL api from watcher
(Joe Fleming) #2

Is there any way to call the shortened url api from a painless script, preferably without making a post/put call?

I don't think Painless can make API calls, can it? That's the only way you'd be able to use the API, unless I'm misunderstanding something.

The link is very long and breaks for those who have to copy/paste the link.

Yes, the link includes all of the state of the dashboard, so it does get quite long. I'm curious what doesn't work when using copy and paste though.

(Matt McGovern) #3

It doesn't happen consistently, but when it does happen it's a scenario where the user can't just click on a (much shorter) URL caption, but they have to copy the actual link manually and paste it into the browser of their choice, which was Chrome. I just asked for a screen shot of the error but don't have it yet. I will also get a character count of the URL when I can reproduce this.

(Joe Fleming) #4

the user can't just click on a (much shorter) URL caption, but they have to copy the actual link manually and paste it into the browser of their choice

I still don't understand why they can't just click on the very long link, but instead need to copy and paste it. Are users getting a string instead of a link? If so, why? Sounds like perhaps the painless script is producing that url, are you just showing the value in a table view or something? If you can share what your users see that they need to copy, that would be helpful. You can censor out the content if you need to, I'm just trying to understand what you're looking at.

(Matt McGovern) #5

I found that the issue is because of IE. For those users that have a company machine that forces them to use IE as the default browser. I haven't seen the problem outside of IE.

(system) closed #6

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