I spent about an hour on what seems like a simple getting started exercise. Just connecting to the elastic stack with the python client. Leaving out all of the trial and error detail. The documentation shows that the api_key parameter should be a tuple consisting of the api_key_id and the api_key. However, the only way I was able to get this to work was to not include the api_key_id.
This does not work due to authentication error:
And if you use the Create API Kibana UI, you will get the encoded value only and need to manually select to see the id:key pair by choosing Beats or Logstash in the format drop down menu.
But it should work no matter if you are using the encoded value or the id:key pair.
Ok. Thank you for the clarification. I created the API key via the UI and then queried the api_key via curl (using the encoded value which worked) to get the api_key_id. When I set this up in python I was using the api_key_id for the api_key_id but using the encoded value (combination of the api_key_id and the api_key) as the api_key.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.