404 error when pasting Generation URL to browser

reporting

(android.kc) #1

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!


(android.kc) #2

found this

it's duplicated


(Joe Fleming) #3

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.

"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.


(system) #4

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