Using elasticsearch-sql to query elasticsearch on elastic cloud

I'm trying to query elasticsearch data using elasticsearch-sql.

I am using elastic cloud, so the first question is whether or not elasticsearch-sql is available on elastic cloud.

If it is (based on what i read it is) .... how can I query it? I'm trying the following and I get a 404 response:

https://user:pass@myelasticclouud:9243/_sql?sql=select * from filebeat-6.6.0-2019-02-20

The docs says to use another URL:

POST /_xpack/sql?format=txt
    "query": "SELECT * FROM library ORDER BY page_count DESC LIMIT 5"

@jerry.browne if you really want to search in ES-SQL using just the URL, you can do something like:

https://user:pass@myelasticclouud:9243/_xpack/sql?source={"query":"select * from filebeat-6.6.0-2019-02-20"}&source_content_type=application/json

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