I cannot see any error in the vs console. Where can I see it? For that reason, I ask if there is a way to check that endpoint works well with the postman. Maybe do a post for that elastic URI and given index in order to check if the problem is about the Serilog and not credentials or the endpoint.
@stephenb Thanks for your answer. I've tried tested as you say but I always get a 401 with the following response. I've tested with all combinations "user:password" that I could. Just to know, I use the same credentials that I use to log in to the cloud.
{"error":{"root_cause":[{"type":"security_exception","reason":"unable to authenticate user [username@domain] for REST request [/my-index/_doc]","header":{"WWW-Authenticate":["Basic realm=\"security\" charset=\"UTF-8\"","Bearer realm=\"security\"","ApiKey"]}}],"type":"security_exception","reason":"unable to authenticate user [username@domain] for REST request [/my-index/_doc]","header":{"WWW-Authenticate":["Basic realm=\"security\" charset=\"UTF-8\"","Bearer realm=\"security\"","ApiKey"]}},"status":401}
Well that's your problem.. the cluster credentials are not the same as the Cloud Console credentials.
A 401 confirms that because that is the code for not authorized
When you created the cluster a dialog box popped up with the cluster credentials You should have copied that and that would be what you would use for interaction with Elasticsearch..
If you do not have that set of credentials which will be elastic and a password You can reset it using the instructions here
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.