# Using Kibana dev tools CURL to generate CSV fails

**URL:** https://discuss.elastic.co/t/using-kibana-dev-tools-curl-to-generate-csv-fails/307111
**Category:** Kibana
**Tags:** elastic-stack-reporting
**Created:** [June 14, 2022, 8:18am UTC](https://discuss.elastic.co/t/using-kibana-dev-tools-curl-to-generate-csv-fails/307111 "2022-06-14T08:18:48Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![hrodriguez](https://avatars.discourse-cdn.com/v4/letter/h/e47774/32.png) [@hrodriguez](https://discuss.elastic.co/u/hrodriguez)
#### Post date: [June 14, 2022, 8:18am UTC](https://discuss.elastic.co/t/using-kibana-dev-tools-curl-to-generate-csv-fails/307111/1 "2022-06-14T08:18:48Z")

</div>

Hi,

Using Kibana 6.8.23

I am triying to obtain a url to download the csv data from a Discover query.  
First I tried download a CSV using **Share -\> CSV Reports -\> Copy POST URL** but I got the following error:

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

```

Searching the documentation I found the following page [Automatically generate reports | Kibana Guide [8.2] | Elastic](https://www.elastic.co/guide/en/kibana/current/automating-report-generation.html?baymax=rec&rogue=rec-1&elektra=guide), so I tried using curl:

```auto
curl \
-XPOST \
-u elastic \
-H 'kbn-xsrf: true' \
'http://0.0.0.0:5601/api/reporting/generate/csv?jobParams=...'

```

But I get:

```auto
{
  "statusCode": 400,
  "error": "Bad Request",
  "message": "child \"method\" fails because [\"method\" must be one of [HEAD, GET, POST, PUT, DELETE]]",
  "validation": {
    "source": "query",
    "keys": [
      "method"
    ]
  }
}

```

Maybe it is a version problem and can be solved by updating Kibana.

Thank you in advance for your help.  
Helena

---

<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: [July 12, 2022, 8:19am UTC](https://discuss.elastic.co/t/using-kibana-dev-tools-curl-to-generate-csv-fails/307111/2 "2022-07-12T08:19:25Z")

</div>

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