# Using Kibana generated POST URL to generate CSV fails -

**URL:** https://discuss.elastic.co/t/using-kibana-generated-post-url-to-generate-csv-fails/213353
**Category:** Kibana
**Created:** [December 30, 2019, 12:49pm UTC](https://discuss.elastic.co/t/using-kibana-generated-post-url-to-generate-csv-fails/213353 "2019-12-30T12:49:30Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Mike\_Donohue](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mike_donohue/32/45665_2.png) [@Mike\_Donohue](https://discuss.elastic.co/u/Mike_Donohue)
#### Post date: [December 30, 2019, 12:49pm UTC](https://discuss.elastic.co/t/using-kibana-generated-post-url-to-generate-csv-fails/213353/1 "2019-12-30T12:49:30Z")

</div>

Hi

We are using Kibana 7.3.0

Trying to download CSV from a Discover query. After running and Saving the query, I go to Share -\> CSV Reports -\> Copy POST URL and get the following URL:

https://\<our\_kibana\_instance\>/api/reporting/generate/csv?jobParams=(conflictedTypesFields:!(),fields:!(%27@timestamp%27,vendor,message),indexPatternId:b4005ee0-6089-11e9-8fcb-012a1dd4a58a,metaFields:!(\_source,\_id,\_type,\_index,\_score),searchRequest:(body:(\_source:(excludes:!(),includes:!(%27@timestamp%27,vendor,message)),docvalue\_fields:!(),query:(bool:(filter:!((multi\_match:(lenient:!t,query:dhcp,type:best\_fields))),must:!((range:(%27@timestamp%27:(format:strict\_date\_optional\_time,gte:%272019-12-30T11:00:00.000Z%27,lte:%272019-12-30T11:30:00.000Z%27)))),must\_not:!(),should:!())),script\_fields:(),sort:!((%27@timestamp%27:(order:desc,unmapped\_type:boolean))),stored\_fields:!(%27@timestamp%27,vendor,message),version:!t),index:%27prod-metrics-\*%27),title:dhcp,type:search)

When I put this in a browser, I get the following error:

{"statusCode":405,"error":"Method Not Allowed","message":"GET is not allowed"}

and do not get the CSV downloaded.

Oddly there is no GET nor POST command in the URL either

I am trying to use this URL method b/c the Generate CSV choice is not working either and have logged a separate topic for that.

Any help will be greatly appreciated.

Thanks - Mike

---

<div class="post-metadata">

### Author: ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)
#### Post date: [December 30, 2019, 1:46pm UTC](https://discuss.elastic.co/t/using-kibana-generated-post-url-to-generate-csv-fails/213353/2 "2019-12-30T13:46:53Z")

</div>

The "commands" (also called HTTP methods) refer to [https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/GET](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/GET) and [https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST) They are not part of the URL. If you paste a URL in a browser address bar, it will always issue a GET request. To create a post request, you could for example use the `curl` command line tool as explained here: [https://www.elastic.co/guide/en/kibana/current/automating-report-generation.html#\_use\_a\_script](https://www.elastic.co/guide/en/kibana/current/automating-report-generation.html#_use_a_script)

However if `Generate CSV` isn't working for you then it's very unlikely that this will change something because it is triggering the same process behind the scenes - issuing this POST request is basically another way of clicking the "Generate CSV" button.

---

<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: [January 27, 2020, 1:46pm UTC](https://discuss.elastic.co/t/using-kibana-generated-post-url-to-generate-csv-fails/213353/3 "2020-01-27T13:46:54Z")

</div>

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