api-call.asciidoc 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. // tag::cloud[]
  2. **Use {kib}**
  3. //tag::kibana-api-ex[]
  4. . Open {kib}'s main menu and go to **Dev Tools > Console**.
  5. +
  6. [role="screenshot"]
  7. image::images/kibana-console.png[{kib} Console,align="center"]
  8. . Run the following example API request in the console:
  9. +
  10. [source,console]
  11. ----
  12. GET /
  13. ----
  14. //end::kibana-api-ex[]
  15. **Use curl**
  16. To communicate with {es} using curl or another client, you need your cluster's
  17. endpoint.
  18. . Open {kib}'s main menu and click **Manage this deployment**.
  19. . From your deployment menu, go to the **Elasticsearch** page. Click **Copy
  20. endpoint**.
  21. . To submit an example API request, run the following curl command in a new
  22. terminal session. Replace `<password>` with the password for the `elastic` user.
  23. Replace `<elasticsearch_endpoint>` with your endpoint.
  24. +
  25. [source,sh]
  26. ----
  27. curl -u elastic:<password> <elasticsearch_endpoint>/
  28. ----
  29. // NOTCONSOLE
  30. // end::cloud[]
  31. // tag::self-managed[]
  32. **Use {kib}**
  33. include::api-call.asciidoc[tag=kibana-api-ex]
  34. **Use curl**
  35. To submit an example API request, run the following curl command in a new
  36. terminal session.
  37. [source,sh]
  38. ----
  39. curl -X GET http://localhost:9200/
  40. ----
  41. // NOTCONSOLE
  42. // end::self-managed[]