Using Kibana generated POST URL to generate CSV fails -

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

The "commands" (also called HTTP methods) refer to https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/GET and 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

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.

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