elasticsearch/docs/reference/tab-widgets/api-call.asciidoc
James Rodewig b2130249b0
[DOCS] Refactor quick start guide and README (#71331)
Changes:

* Refactors the "Getting Started" content down to one page.
* Refactors the README to reduce duplicated content and better mirror
Kibana's.
* Focuses the quick start on time series data, including data streams
and runtime fields.
* Streamlines self-managed install instructions to Docker.

Co-authored-by: debadair <debadair@elastic.co>
2021-04-20 09:32:21 -04:00

53 lines
1.1 KiB
Text

// tag::cloud[]
**Use curl**
. To communicate with {es} using curl or another client, you need your
cluster's endpoint. Go to the **Elasticsearch** page and click **Copy
endpoint**.
. To submit an example API request, run the following curl command in a new
terminal session. Replace `<password>` with the password for the `elastic` user.
Replace `<elasticsearch_endpoint>` with your endpoint.
+
[source,sh]
----
curl -u elastic:<password> <elasticsearch_endpoint>/
----
// NOTCONSOLE
**Use {kib}**
. Go to the *{kib}* page and click **Launch**.
//tag::kibana-api-ex[]
. Open {kib}'s main menu and go to **Dev Tools > Console**.
+
[role="screenshot"]
image::images/kibana-console.png[{kib} Console,align="center"]
. Run the following example API request in the console:
+
[source,console]
----
GET /
----
//end::kibana-api-ex[]
// end::cloud[]
// tag::self-managed[]
**Use curl**
To submit an example API request, run the following curl command in a new
terminal session.
[source,sh]
----
curl -X GET http://localhost:9200/
----
// NOTCONSOLE
**Use {kib}**
include::api-call.asciidoc[tag=kibana-api-ex]
// end::self-managed[]