stephenb
(Stephen Brown)
April 26, 2023, 7:22pm
2
Hi @Venkatesh_Guruprasad
Perhaps take a look at this thread
I just did this
from elasticsearch import Elasticsearch
# you can use RFC-1738 to specify the url
# ... or specify common parameters as kwargs
es = Elasticsearch(
cloud_id="mycluster:sdfgsdfgdsfgdsfglvdsfgsdfgdsfgmNiM2JkNzRjNDY3JGIxZTUyOWEwNTBkNjRkODZhMzIxZTBhMjU3YjRlODhh",
http_auth=("elastic", "dsfgsdfgsdfgg"),
)
output = es.info(),
print(output, end=" ")
and it worked fine...
This also worked fine...
es = Elasticsearch(
cloud_id="mycluster:sdfgsdfgdsfgdsfgsdfgsdfgsdfgsdfg…
Perhaps you are using the wrong type of API Key as this user was
remember this is NOT and Elastic Cloud API key it is an Elasticsearch API key which can only be created via and API call see here
Actually API Keys can now be created via Kibana -> Stack Management -> API Keys as well now