# Unable to parse URL using shorten url

**URL:** <https://discuss.elastic.co/t/unable-to-parse-url-using-shorten-url/218818>\
**Category:** Kibana\
**Created:** [February 11, 2020, 4:12pm UTC](https://discuss.elastic.co/t/unable-to-parse-url-using-shorten-url/218818 "2020-02-11T16:12:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zivklara](https://avatars.discourse-cdn.com/v4/letter/z/77aa72/32.png) [@zivklara](https://discuss.elastic.co/u/zivklara)\
**Post date:** [February 11, 2020, 4:12pm UTC](https://discuss.elastic.co/t/unable-to-parse-url-using-shorten-url/218818/1 "2020-02-11T16:12:56Z")

</div>

Hi,  
I'm trying to use kibana's shorten\_url feature (full url is not treated well when sending it in emails).  
I do get a urlId, but when I try to use it I get an error in kibana saying it was unable to parse url.

First I tried to 'inject' queries to the url (added one query for some field, and changed the dashboard time range), but then it failed, and it changed the dashboard time range to "last 15 mins" (and removed queries).

Then I copied the url without changing it (no queries nor time changes) and tried to shorten it  
as it is.  
It also got an error.

I think this might be a bug, I saw a similar issue that was automatically closed (that's too bad, someone could have found the root cause by now):

> [@Error : Shorten url giving error unable to parse url](https://discuss.elastic.co/t/error-shorten-url-giving-error-unable-to-parse-url/192219):
>
> Hi, To view one of the dashboard in full screen mode I try to use the Shorten url feature of Kibana Once I shorten the url I am getting error unable to parse url . Appreciate the help on issue !! Thanks, DG

**Version:** 6.5.2

**curl cmd:**  
curl -X POST "localhost:5601/api/shorten\_url" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d {"url": "kibana\_long\_url"}'

**URL of the current dashboard (used as "kibana\_long\_url" in curl cmd):**  
[http://localhost:5601/app/kibana#/dashboard/7132b970-5538-11e9-a914-ab56a05e50a1?\_a=(description:'',filters:!(('$state':(store:appState),exists:(field:hosts\_out),meta:(alias:'E2ETests%20with%20Crashed%20Devices',disabled:!t,index:db1b9bd0-538b-11e9-a914-ab56a05e50a1,key:hosts\_out,negate:!f,type:exists,value:exists)](http://localhost:5601/app/kibana#/dashboard/7132b970-5538-11e9-a914-ab56a05e50a1?_a=(description:'',filters:!(('$state':(store:appState),exists:(field:hosts_out),meta:(alias:'E2ETests%20with%20Crashed%20Devices',disabled:!t,index:db1b9bd0-538b-11e9-a914-ab56a05e50a1,key:hosts_out,negate:!f,type:exists,value:exists))),('$state':(store:appState),exists:(field:e2e\_test\_skipped\_str.keyword),meta:(alias:'E2ETests%20with%20skipped%20tests',disabled:!t,index:db1b9bd0-538b-11e9-a914-ab56a05e50a1,key:e2e\_test\_skipped\_str.keyword,negate:!f,type:exists,value:exists))),fullScreenMode:!f,options:(darkTheme:!f,hidePanelTitles:!f,useMargins:!t),panels:!((embeddableConfig:(vis:(params:(sort:(columnIndex:1,direction:asc)))),gridData:(h:40,i:'1',w:48,x:0,y:38),id:c7c6eff0-53cf-11e9-a914-ab56a05e50a1,panelIndex:'1',title:E2ETests,type:visualization,version:'6.5.2'),(embeddableConfig:(vis:(colors:(MiniRegression:%230A50A1,ZeusStorageSimulatorCluster:%23584477),legendOpen:!t)),gridData:(h:12,i:'3',w:14,x:0,y:20),id:a2460b50-5607-11e9-a914-ab56a05e50a1,panelIndex:'3',title:Clusters,type:visualization,version:'6.5.2'),(embeddableConfig:(vis:(colors:(Fail:%23E24D42,Fatal:%23967302,Killed:%230A437C,Skipped:%23F2C96D,Skipped\_reg\_bug:%23E0752D,Success:%239AC48A),legendOpen:!t)),gridData:(h:12,i:'4',w:15,x:14,y:20),id:d695d250-560c-11e9-a914-ab56a05e50a1,panelIndex:'4',title:'E2ETest%20Status',type:visualization,version:'6.5.2'),(embeddableConfig:(vis:(legendOpen:!t)),gridData:(h:12,i:'5',w:19,x:29,y:20),id:a2e8a530-560d-11e9-a914-ab56a05e50a1,panelIndex:'5',title:'E2ETest%20Failure%20Description',type:visualization,version:'6.5.2'),(embeddableConfig:(),gridData:(h:10,i:'10',w:14,x:12,y:156),id:'7378c3e0-561f-11e9-a914-ab56a05e50a1',panelIndex:'10',title:'E2ETest%20Tags',type:visualization,version:'6.5.2'),(embeddableConfig:(vis:(colors:('Regex%20forms':%233F2B5B))),gridData:(h:10,i:'11',w:12,x:0,y:156),id:fc5f4b50-5b6c-11e9-a914-ab56a05e50a1,panelIndex:'11',title:'Group%20Names',type:visualization,version:'6.5.2'),(embeddableConfig:(vis:(params:(sort:(columnIndex:0,direction:asc)))),gridData:(h:14,i:'13',w:48,x:0,y:78),id:add0ea40-61dc-11e9-a914-ab56a05e50a1,panelIndex:'13',title:'Crashed%20Devices',type:visualization,version:'6.5.2'),(embeddableConfig:(),gridData:(h:11,i:'15',w:15,x:33,y:145),id:fb576570-6fea-11e9-a914-ab56a05e50a1,panelIndex:'15',title:'Logs,%20Checkers,%20Counters%20-%20intersection',type:visualization,version:'6.5.2'),(embeddableConfig:(),gridData:(h:11,i:'16',w:11,x:22,y:145),id:'3d12ad70-6fec-11e9-a914-ab56a05e50a1',panelIndex:'16',title:'Failed%20by%20Log%20Checkers',type:visualization,version:'6.5.2'),(embeddableConfig:(),gridData:(h:11,i:'17',w:11,x:0,y:145),id:'5d45c7d0-6fec-11e9-a914-ab56a05e50a1',panelIndex:'17',title:'Failed%20by%20Counters',type:visualization,version:'6.5.2'),(embeddableConfig:(),gridData:(h:11,i:'18',w:11,x:11,y:145),id:'6cafdb20-6fec-11e9-a914-ab56a05e50a1',panelIndex:'18',title:'Failed%20by%20Checkers',type:visualization,version:'6.5.2'),(embeddableConfig:(),gridData:(h:12,i:'19',w:12,x:0,y:166),id:e95d8ab0-7bcb-11e9-a914-ab56a05e50a1,panelIndex:'19',title:Protocols,type:visualization,version:'6.5.2'),(embeddableConfig:(),gridData:(h:12,i:'21',w:14,x:12,y:166),id:'92dfb180-7c67-11e9-a914-ab56a05e50a1',panelIndex:'21',title:'RDMA%20Operations',type:visualization,version:'6.5.2'),(embeddableConfig:(vis:(colors:(Fail:%23E24D42,Fatal:%23967302,Killed:%230A437C,Skipped:%23F2C96D,Success:%239AC48A))),gridData:(h:12,i:'22',w:48,x:0,y:8),id:'501eb970-7d4f-11e9-a914-ab56a05e50a1',panelIndex:'22',title:'E2ETest%20Timeline',type:visualization,version:'6.5.2'),(embeddableConfig:(),gridData:(h:19,i:'25',w:24,x:0,y:178),id:'8842a270-8200-11e9-a914-ab56a05e50a1',panelIndex:'25',title:'Apps%20status%20percentage',type:visualization,version:'6.5.2'),(embeddableConfig:(),gridData:(h:8,i:'27',w:9,x:14,y:0),id:'6b6cab10-8227-11e9-a914-ab56a05e50a1',panelIndex:'27',title:'',type:visualization,version:'6.5.2'),(embeddableConfig:(),gridData:(h:8,i:'28',w:6,x:36,y:0),id:c7fca6f0-8227-11e9-a914-ab56a05e50a1,panelIndex:'28',title:'',type:visualization,version:'6.5.2'),(embeddableConfig:(),gridData:(h:8,i:'29',w:6,x:42,y:0),id:e8edba20-8227-11e9-a914-ab56a05e50a1,panelIndex:'29',title:'',type:visualization,version:'6.5.2'),(embeddableConfig:(),gridData:(h:8,i:'30',w:6,x:23,y:0),id:b4cac0c0-8228-11e9-a914-ab56a05e50a1,panelIndex:'30',title:'',type:visualization,version:'6.5.2'),(embeddableConfig:(),gridData:(h:10,i:'31',w:22,x:26,y:156),id:'4f526c70-85d9-11e9-a914-ab56a05e50a1',panelIndex:'31',type:visualization,version:'6.5.2'),(embeddableConfig:(),gridData:(h:12,i:'32',w:22,x:26,y:166),id:c3119e60-85d9-11e9-a914-ab56a05e50a1,panelIndex:'32',type:visualization,version:'6.5.2'),(embeddableConfig:(vis:(colors:('0':%239AC48A,'1':%23EA6460,'4':%23F2C96D))),gridData:(h:19,i:'33',w:24,x:24,y:178),id:'6b19c3d0-8dd2-11e9-a914-ab56a05e50a1',panelIndex:'33',type:visualization,version:'6.5.2'),(embeddableConfig:(vis:(colors:('0':%239AC48A,'1':%23EA6460,'4':%23F2C96D))),gridData:(h:15,i:'34',w:24,x:0,y:197),id:'43df3bf0-8dd3-11e9-a914-ab56a05e50a1',panelIndex:'34',type:visualization,version:'6.5.2'),(embeddableConfig:(),gridData:(h:16,i:'36',w:48,x:0,y:129),id:'809dab20-8de3-11e9-a914-ab56a05e50a1',panelIndex:'36',title:'New%20Failures',type:visualization,version:'6.5.2'),(embeddableConfig:(vis:(colors:('0':%239AC48A,'1':%23E24D42,'4':%23F2C96D))),gridData:(h:15,i:'37',w:24,x:24,y:197),id:affedfe0-9015-11e9-a914-ab56a05e50a1,panelIndex:'37',type:visualization,version:'6.5.2'),(embeddableConfig:(),gridData:(h:6,i:'38',w:48,x:0,y:32),id:'1a2b70f0-973b-11e9-a914-ab56a05e50a1',panelIndex:'38',title:'',type:visualization,version:'6.5.2'),(embeddableConfig:(),gridData:(h:15,i:'39',w:17,x:0,y:227),id:'546ef2c0-98c4-11e9-a914-ab56a05e50a1',panelIndex:'39',title:'Counters%20',type:visualization,version:'6.5.2'),(embeddableConfig:(),gridData:(h:17,i:'41',w:48,x:0,y:92),id:ed210000-9cb4-11e9-a914-ab56a05e50a1,panelIndex:'41',title:'Log%20Checkers',type:search,version:'6.5.2'),(embeddableConfig:(),gridData:(h:8,i:'42',w:14,x:0,y:0),id:'3301bd60-9e38-11e9-a914-ab56a05e50a1',panelIndex:'42',title:'',type:visualization,version:'6.5.2'),(embeddableConfig:(),gridData:(h:15,i:'44',w:24,x:0,y:212),id:'77ead250-9d60-11e9-a914-ab56a05e50a1',panelIndex:'44',type:visualization,version:'6.5.2'),(embeddableConfig:(),gridData:(h:8,i:'45',w:7,x:29,y:0),id:'5f9e7790-ac76-11e9-a914-ab56a05e50a1',panelIndex:'45',title:'',type:visualization,version:'6.5.2'),(embeddableConfig:(),gridData:(h:15,i:'46',w:24,x:24,y:212),id:'6c11ff70-c70a-11e9-ae39-e7f8b1121771',panelIndex:'46',type:visualization,version:'6.5.2'),(embeddableConfig:(),gridData:(h:15,i:'47',w:31,x:17,y:227),id:'307f83f0-c738-11e9-ae39-e7f8b1121771',panelIndex:'47',type:visualization,version:'6.5.2'),(embeddableConfig:(),gridData:(h:15,i:'48',w:24,x:0,y:242),id:adcbd2c0-ce5c-11e9-abc2-b1799395ea8e,panelIndex:'48',type:visualization,version:'6.5.2'),(embeddableConfig:(),gridData:(h:20,i:'49',w:48,x:0,y:109),id:'6cfb41e0-e8d3-11e9-a787-2b0492f8fbb0',panelIndex:'49',title:'Traffic%20Tests%20Parsed%20Outputs',type:visualization,version:'6.5.2'),(embeddableConfig:(),gridData:(h:15,i:'50',w:24,x:24,y:242),id:e46722a0-35f7-11ea-8aa5-6b07c37a0e08,panelIndex:'50',type:visualization,version:'6.5.2'),(embeddableConfig:(),gridData:(h:16,i:'51',w:48,x:0,y:257),id:'46906090-35f8-11ea-8aa5-6b07c37a0e08',panelIndex:'51',type:search,version:'6.5.2'),(embeddableConfig:(),gridData:(h:14,i:'52',w:48,x:0,y:273),id:e1861860-361b-11ea-8aa5-6b07c37a0e08,panelIndex:'52',type:visualization,version:'6.5.2')),query:(language:kuery,query:''),timeRestore:!f,title:'Regression%20Main%20Dashboard',viewMode:view)&\_g=()

**shorten url:**  
localhost:5601/goto/a68b79531623de604705b2de5e07b934

**error in kibana:**

 ![kibana unable to parse](https://us1.discourse-cdn.com/elastic/original/3X/1/5/157a90cfc169dca07dbe2a515e52e7317ad038e3.png)

**errors shown in Dev Tools console:**

 ![kibana dev tools console](https://us1.discourse-cdn.com/elastic/original/3X/f/c/fc8e4a638bdf194a1f3a70881cf01e274465948f.png)

---

<div class="post-metadata">

**Author:** ![jsanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsanz/32/53734_2.png) [@jsanz](https://discuss.elastic.co/u/jsanz)\
**Post date:** [February 12, 2020, 5:28pm UTC](https://discuss.elastic.co/t/unable-to-parse-url-using-shorten-url/218818/2 "2020-02-12T17:28:32Z")

</div>

hi @zivklara it's a bit hard to follow the issue, can you please:

- clarify the use case: I understand you are trying to programmatically generate short urls based on tweaking a shared url replacing in the state object inside the url some parameters to adjust to your users?
- could you try to reproduce the workflow using any of the sample datasets (flights, ecommerce, logs) so we can follow you?

Also, I guess you are doing this right, but since you didn't mention, are you removing the prefix of the url (anything before `/app/kibana/...`) when using the shorten API right?

Best regards

---

<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:** [March 11, 2020, 5:28pm UTC](https://discuss.elastic.co/t/unable-to-parse-url-using-shorten-url/218818/3 "2020-03-11T17:28:34Z")

</div>

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