esql-getting-started-discover-console.asciidoc 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // tag::console[]
  2. To get started with {esql} in Console, open the main menu and select
  3. *Dev Tools*.
  4. The general structure of an <<esql-query-api,{esql} query API>> request is:
  5. [source,txt]
  6. ----
  7. POST /_query?format=txt
  8. {
  9. "query": """
  10. """
  11. }
  12. ----
  13. Enter the actual {esql} query between the two sets of triple quotes. For
  14. example:
  15. [source,txt]
  16. ----
  17. POST /_query?format=txt
  18. {
  19. "query": """
  20. FROM kibana_sample_data_logs
  21. """
  22. }
  23. ----
  24. Inside quotes, Console suggests possible commands and functions to autocomplete your query:
  25. image::images/esql/console-esql-autocomplete.png[align="center"]
  26. // end::console[]
  27. // tag::discover[]
  28. include::../../esql/esql-kibana.asciidoc[tag=esql-mode]
  29. Adjust the time filter so it includes the timestamps in the sample data (October
  30. 23rd, 2023).
  31. After switching to {esql} mode, the query bar shows a sample query. You can
  32. replace this query with the queries in this getting started guide.
  33. include::../../esql/esql-kibana.asciidoc[tag=autocomplete]
  34. include::../../esql/esql-kibana.asciidoc[tag=compact]
  35. // end::discover[]