Hello all,
I have installed x-pack on both elasticsearch 5.6.2 and kibana 5.6.2. And I want to write a .json file to the elasticsearch with curl command from terminal. But it fails with following error messages.
curl -XPOST 'http://localhost:9200/flights/info' -H "Content-Type:application/json" -d @airports.json
{"error":{"root_cause":[{"type":"security_exception","reason":"missing authentication token for REST request [/flights/info]","header":{"WWW-Authenticate":"Basic realm="security" charset="UTF-8""}}],"type":"security_exception","reason":"missing authentication token for REST request [/flights/info]","header":{"WWW-Authenticate":"Basic realm="security" charset="UTF-8""}},"status":401}
Probably I think I did not write the command correctly, please help me.
Thanks,
Simon