Automatic Report in Postman

Hello,

how can I use this
image

in Postman for example? I have problems to understand what authentication informations are needed.

Cheers!

You can make a POST request to the URL it provides. Additionally, you also want to provide the kbn-xsrf header.

Here is an example with cURL:

Windows Terminal

curl -H 'kbn-xsrf: true' -u elastic -X POST ${URL}

This will present you with the password of your user, in the example provided that username was elastic. If you prefer not to provide your password, or are using it for automation, you can provide the Authorization header.

curl -H 'kbn-xsrf: true' -H 'Authorization: Basic ${TOKEN}' ${URL}

Here, the token is a base64 representation of your username and password separated by a colon. Most all languages support base64, but for demonstration purposes we can use https://www.base64encode.org/. Here we will provide elastic:changeme as an example, which will result in ZWxhc3RpYzpjaGFuZ2VtZQ==, and we can update our example to:

curl -H 'kbn-xsrf: true' -H 'Authorization: Basic ZWxhc3RpYzpjaGFuZ2VtZQ==' ${URL}

@tylersmalley Thank you for your reply.
Indeed it works!

Somehow it needs to be mentioned here: https://www.elastic.co/guide/en/kibana/current/automating-report-generation.html
right?

However, the result is not really satisfying..
In the response, I only get meta data of the report but not the actual result.

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