However when I post this command in the browser I get
{"ok":false,"message":"The supplied authentication is invalid"}
So I have been trying to use
POST /api/v1/users/auth/_refresh
- https://www.elastic.co/guide/en/cloud-enterprise/current/refresh-token.html
to get a token but this is giving me both
{'errors': [{'message': 'HTTP method not allowed, supported methods: [GET]', 'code': 'root.method_not_allowed'}]}
and
{'errors': [{'message': 'The requested resource could not be found', 'code': 'root.resource_not_found'}]}
When I use POST and GET respectively. Not sure if this is a bug in the API?
you are missing authorization header in the search request. It requires basic auth with ECE admin and password. Basically, you have to use Postman, curl or another tool to send these requests that allow you to specify headers.
The header you must include looks like this: Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsIm5iZiI6MTU0OTAyMjUwMCwiaXNzIjoiZm91bmQtYWRtaW5jb25zb2xlIiwiZXhwIjoxNTQ5MDI0MzAwLCJpYXQiOjE1NDkwMjI1MDB9.NLQ4Oe0gDfD_EuMbSAcFzHWPAgidISPzqB9JcrHcdlV
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.