# 404 error when pasting Generation URL to browser

**URL:** https://discuss.elastic.co/t/404-error-when-pasting-generation-url-to-browser/67573
**Category:** Kibana
**Tags:** elastic-stack-reporting
**Created:** [November 30, 2016, 3:37am UTC](https://discuss.elastic.co/t/404-error-when-pasting-generation-url-to-browser/67573 "2016-11-30T03:37:41Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![android.kc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/android.kc/32/58806_2.png) [@android.kc](https://discuss.elastic.co/u/android.kc)
#### Post date: [November 30, 2016, 3:37am UTC](https://discuss.elastic.co/t/404-error-when-pasting-generation-url-to-browser/67573/1 "2016-11-30T03:37:41Z")

</div>

Im using ES 2.4.1, kibana 4.6.1 on Mac, everything is installed locally for development purpose. then I copied and pasted a Generation URL to browser. It gave me {"statusCode":404,"error":"Not Found"}. However, if I clicked the Printable PDF button, it could trigger a report processing under Settings -\> Reporting --\> Generated Reports, and could download afterward.

does anyone why I getting 404?

Thanks!

---

<div class="post-metadata">

### Author: ![android.kc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/android.kc/32/58806_2.png) [@android.kc](https://discuss.elastic.co/u/android.kc)
#### Post date: [November 30, 2016, 3:45am UTC](https://discuss.elastic.co/t/404-error-when-pasting-generation-url-to-browser/67573/2 "2016-11-30T03:45:55Z")

</div>

found this

> [@Generation URL not working](https://discuss.elastic.co/t/generation-url-not-working/61708):
>
> I have reporting setup in a shield environment. I am about to create a report via the "Document Generation" printable button. However, when I create a report via the Generation URL and try to access that URL I receive an error: {"statusCode":404,"error":"Not Found"} Any ideas?

it's duplicated

---

<div class="post-metadata">

### Author: ![Joe\_Fleming](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joe_fleming/32/3561_2.png) [@Joe\_Fleming](https://discuss.elastic.co/u/Joe_Fleming)
#### Post date: [December 9, 2016, 5:29pm UTC](https://discuss.elastic.co/t/404-error-when-pasting-generation-url-to-browser/67573/3 "2016-12-09T17:29:56Z")

</div>

That URL isn't meant to be used with GET. You'll need to use POST, and you'll need to include a `kbn-xsrf` header. If you're using Shield, also include Basic auth information. You can see this if you look at the [Watcher formula in the Getting Started guide](https://www.elastic.co/guide/en/reporting/current/getting-started.html#automating-report-generation).

```auto
"attachments" : {
  "error_report.pdf" : {
    "http" : {
      "content_type" : "application/pdf",
      "request" : {
        "method": "POST", 
        "headers": {
          "kbn-xsrf": "reporting"
        },
        "read_timeout": "300s", 
        "url": "http://0.0.0.0:5601/api/reporting/generate/dashboard/Error-Monitoring?_g=(time:(from:now-1d%2Fd,mode:quick,to:now))&sync" 
      }
    }
  }
}

```

The important part here is the `request` section. Note the use of the POST method and the `kbn-xsrf` header.

---

<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 6, 2017, 5:30pm UTC](https://discuss.elastic.co/t/404-error-when-pasting-generation-url-to-browser/67573/4 "2017-01-06T17:30:18Z")

</div>

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