mirror of
https://github.com/elastic/kibana.git
synced 2025-04-25 10:23:14 -04:00
* [DOCS] API intro * Logstash configuration management * Reformatting * Comments from Josh * Commets from Gail * Fixed broken things
46 lines
1.8 KiB
Text
46 lines
1.8 KiB
Text
[[using-api]]
|
|
== Using the APIs
|
|
|
|
Interact with the {kib} APIs through the `curl` command and HTTP and HTTPs protocols.
|
|
|
|
It is recommended that you use HTTPs on port 5601 because it is more secure.
|
|
|
|
NOTE: The {kib} Console supports only Elasticsearch APIs. You are unable to interact with the {kib} APIs with the Console and must use `curl` or another HTTP tool instead. For more information, refer to <<console-kibana,Console>>.
|
|
|
|
[float]
|
|
[[api-authentication]]
|
|
=== Authentication
|
|
{kib} supports token-based authentication with the same username and password that you use to log into the {kib} Console.
|
|
|
|
[float]
|
|
[[api-calls]]
|
|
=== API calls
|
|
API calls are stateless. Each request that you make happens in isolation from other calls and must include all of the necessary information for {kib} to fulfill the request. API requests return JSON output, which is a format that is machine-readable and works well for automation.
|
|
|
|
Calls to the API endpoints require different operations. To interact with the {kib} APIs, use the following operations:
|
|
|
|
* *GET* - Fetches the information.
|
|
|
|
* *POST* - Adds new information.
|
|
|
|
* *PUT* - Updates the existing information.
|
|
|
|
* *DELETE* - Removes the information.
|
|
|
|
For example, the following `curl` command exports a dashboard:
|
|
|
|
[source,sh]
|
|
--
|
|
curl -X POST -u $USER:$PASSWORD "localhost:5601/api/kibana/dashboards/export?dashboard=942dcef0-b2cd-11e8-ad8e-85441f0c2e5c"
|
|
--
|
|
|
|
The following {kib} APIs are available:
|
|
|
|
* <<features-api-get, Get features API>>
|
|
* <<spaces-api, Kibana spaces API>>
|
|
* <<role-management-api, Kibana role management APIs>>
|
|
* <<saved-objects-api, Saved objects APIs>>
|
|
* <<dashboard-api, Import and export dashboards APIs>>
|
|
* <<logstash-configuration-management-api, Logstash configuration mangaement APIs>>
|
|
* <<url-shortening-api, Shorten URL API>>
|
|
* <<upgrade-assistant-api, Upgrade assistant APIs>>
|