Getting error "The requested resource could not be found" while trying to access /api/v1/stack/versions

I am trying to fetch the available Elastic Stack versions through the Elasticsearch Service API using the url "https://api.elastic-cloud.com/api/v1/stack/versions" but I am getting the error as "The requested resource could not be found". I have also tried by passing the API key with the request but getting the same error.
What is the correct way for getting the Elastic Stack version using the API?

Hi @shreyaa,

Welcome! Which version of Elasticsearch are you using? There is a request example using cURL here in the documentation. I would recommend using that as a template and check the API key permissions if you have restricted them at all.

If it's still not working do feel free to post the cURL request you're sending with the token replaced with a placeholder and we can take a look.

Hope that helps!

Hi @shreyaa,

I'm not sure why that call isn't working. But an alternative way to get the Elasticsearch version is with a cURL request to the root endpoint:

curl -X GET "https://api.elastic-cloud.com:9200"

Can you give the above command a try and see if it solves your problem?

Hope that helps!

Hi @carly.richmond, thanks for the reply.
I tried the above curl request but not getting any response.
Basically I need an API that returns the recent version of Elastic Stack which I can use for creating a new deployment.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.