2017-06-14 12:21:58 -04:00
|
|
|
[role="xpack"]
|
2017-04-06 21:04:39 -04:00
|
|
|
[[xpack-api]]
|
|
|
|
= {xpack} APIs
|
|
|
|
|
|
|
|
[partintro]
|
|
|
|
--
|
|
|
|
{xpack} exposes a wide range of REST APIs to manage and monitor its features.
|
|
|
|
|
|
|
|
* <<info-api, Info API>>
|
2017-06-14 12:21:58 -04:00
|
|
|
//* <<security-api, Security APIs>>
|
|
|
|
//* <<watcher-api, Watcher APIs>>
|
|
|
|
//* <<graph-api, Graph APIs>>
|
|
|
|
//* <<ml-apis, Machine Learning APIs>>
|
|
|
|
//* <<ml-api-definitions, Definitions>>
|
2017-04-06 21:04:39 -04:00
|
|
|
--
|
|
|
|
|
2017-06-14 12:21:58 -04:00
|
|
|
[role="xpack"]
|
2017-04-06 21:04:39 -04:00
|
|
|
[[info-api]]
|
|
|
|
== Info API
|
|
|
|
|
|
|
|
The info API provides general information on the installed {xpack}. This
|
|
|
|
information includes:
|
|
|
|
|
|
|
|
* Build Information - including the build number and timestamp.
|
|
|
|
* License Information - basic information about the currently installed license.
|
|
|
|
* Features Information - The features that are currently enabled and available
|
|
|
|
under the current license.
|
|
|
|
|
|
|
|
The following example queries the info API:
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
------------------------------------------------------------
|
|
|
|
GET /_xpack
|
|
|
|
------------------------------------------------------------
|
2017-04-21 11:23:27 -04:00
|
|
|
// CONSOLE
|
2017-04-06 21:04:39 -04:00
|
|
|
|
|
|
|
Example response:
|
|
|
|
[source,js]
|
|
|
|
------------------------------------------------------------
|
|
|
|
{
|
2017-04-21 11:23:27 -04:00
|
|
|
"build" : {
|
|
|
|
"hash" : "2798b1a3ce779b3611bb53a0082d4d741e4d3168",
|
|
|
|
"date" : "2015-04-07T13:34:42Z"
|
2017-04-06 21:04:39 -04:00
|
|
|
},
|
2017-04-21 11:23:27 -04:00
|
|
|
"license" : {
|
|
|
|
"uid" : "893361dc-9749-4997-93cb-802e3dofh7aa",
|
|
|
|
"type" : "trial",
|
|
|
|
"mode" : "trial",
|
|
|
|
"status" : "active",
|
|
|
|
"expiry_date_in_millis" : 1914278399999
|
2017-04-06 21:04:39 -04:00
|
|
|
},
|
2017-04-21 11:23:27 -04:00
|
|
|
"features" : {
|
|
|
|
"graph" : {
|
|
|
|
"description" : "Graph Data Exploration for the Elastic Stack",
|
|
|
|
"available" : true,
|
|
|
|
"enabled" : true
|
|
|
|
},
|
2017-06-13 13:30:30 -04:00
|
|
|
"logstash" : {
|
|
|
|
"description" : "Logstash management component for X-Pack",
|
|
|
|
"available" : true,
|
|
|
|
"enabled" : true
|
|
|
|
},
|
2017-04-21 11:23:27 -04:00
|
|
|
"ml" : {
|
|
|
|
"description" : "Machine Learning for the Elastic Stack",
|
|
|
|
"available" : true,
|
|
|
|
"enabled" : true,
|
|
|
|
"native_code_info" : {
|
|
|
|
"version" : "6.0.0-alpha1-SNAPSHOT",
|
|
|
|
"build_hash" : "d081461967d61a"
|
|
|
|
}
|
2017-04-06 21:04:39 -04:00
|
|
|
},
|
2017-04-21 11:23:27 -04:00
|
|
|
"monitoring" : {
|
|
|
|
"description" : "Monitoring for the Elastic Stack",
|
|
|
|
"available" : true,
|
|
|
|
"enabled" : true
|
2017-04-06 21:04:39 -04:00
|
|
|
},
|
2017-04-21 11:23:27 -04:00
|
|
|
"security" : {
|
|
|
|
"description" : "Security for the Elastic Stack",
|
|
|
|
"available" : true,
|
|
|
|
"enabled" : true
|
2017-04-06 21:04:39 -04:00
|
|
|
},
|
2017-04-21 11:23:27 -04:00
|
|
|
"watcher" : {
|
|
|
|
"description" : "Alerting, Notification and Automation for the Elastic Stack",
|
|
|
|
"available" : true,
|
|
|
|
"enabled" : true
|
2017-04-06 21:04:39 -04:00
|
|
|
}
|
|
|
|
},
|
2017-04-21 11:23:27 -04:00
|
|
|
"tagline" : "You know, for X"
|
2017-04-06 21:04:39 -04:00
|
|
|
}
|
|
|
|
------------------------------------------------------------
|
2017-04-21 11:23:27 -04:00
|
|
|
// TESTRESPONSE[s/"hash" : "2798b1a3ce779b3611bb53a0082d4d741e4d3168",/"hash" : "$body.build.hash",/]
|
|
|
|
// TESTRESPONSE[s/"date" : "2015-04-07T13:34:42Z"/"date" : "$body.build.date"/]
|
|
|
|
// TESTRESPONSE[s/"uid" : "893361dc-9749-4997-93cb-802e3dofh7aa",/"uid": "$body.license.uid",/]
|
|
|
|
// TESTRESPONSE[s/"expiry_date_in_millis" : 1914278399999/"expiry_date_in_millis" : "$body.license.expiry_date_in_millis"/]
|
|
|
|
// TESTRESPONSE[s/"version" : "6.0.0-alpha1-SNAPSHOT",/"version": "$body.features.ml.native_code_info.version",/]
|
|
|
|
// TESTRESPONSE[s/"build_hash" : "d081461967d61a"/"build_hash": "$body.features.ml.native_code_info.build_hash"/]
|
|
|
|
// So much s/// but at least we test that the layout is close to matching....
|
2017-04-06 21:04:39 -04:00
|
|
|
|
|
|
|
You can also control what information is returned using the `categories` and
|
|
|
|
`human` parameters.
|
|
|
|
|
|
|
|
The following example only returns the build and features information:
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
------------------------------------------------------------
|
|
|
|
GET /_xpack?categories=build,features
|
|
|
|
------------------------------------------------------------
|
2017-04-21 11:23:27 -04:00
|
|
|
// CONSOLE
|
2017-04-06 21:04:39 -04:00
|
|
|
|
|
|
|
The following example removes the descriptions from the response:
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
------------------------------------------------------------
|
|
|
|
GET /_xpack?human=false
|
|
|
|
------------------------------------------------------------
|
2017-04-21 11:23:27 -04:00
|
|
|
// CONSOLE
|
2017-04-06 21:04:39 -04:00
|
|
|
|
2017-06-14 12:21:58 -04:00
|
|
|
//include::security.asciidoc[]
|
2017-04-06 21:04:39 -04:00
|
|
|
|
2017-06-14 12:21:58 -04:00
|
|
|
//include::watcher.asciidoc[]
|
2017-04-06 21:04:39 -04:00
|
|
|
|
2017-06-14 12:21:58 -04:00
|
|
|
//include::graph.asciidoc[]
|
|
|
|
//include::ml-api.asciidoc[]
|
|
|
|
//include::defs.asciidoc[]
|