Graph - reinstate correct Graph REST endpoint implementationof the form `_xpack/graph/_explore`. (elastic/x-pack-elasticsearch#1589)

Previous versions accidentally introduced an unconventional format for x-pack plugins.

relates elastic/x-pack-elasticsearch#1570

Original commit: elastic/x-pack-elasticsearch@38c42ae150
This commit is contained in:
markharwood 2017-05-31 14:17:34 +01:00 committed by GitHub
parent 1759f70ceb
commit 518f8a9120
3 changed files with 16 additions and 17 deletions

View File

@ -1,7 +1,7 @@
[[graph-api-explore]]
=== Explore API
The Graph "explore" API is accessible via the /_xpack/_graph/_explore endpoint.
The Graph "explore" API is accessible via the /_xpack/graph/_explore endpoint.
One of the best ways to understand the behaviour of this API is to use the Kibana
Graph UI to visually click around connected data and then view the "Last request"
panel (accessible from the button with the cog icon). This panel shows the JSON request/response
@ -23,7 +23,7 @@ An initial search typically begins with a query to identify strongly related ter
[source,js]
--------------------------------------------------
POST clicklogs/_xpack/_graph/_explore
POST clicklogs/_xpack/graph/_explore
{
"query": { <1>
"match": {
@ -122,7 +122,7 @@ The previous basic example omitted several parameters that have default values.
[source,js]
--------------------------------------------------
POST clicklogs/_xpack/_graph/_explore
POST clicklogs/_xpack/graph/_explore
{
"query": {<1>
"bool": {
@ -218,7 +218,7 @@ An example request is as follows:
[source,js]
--------------------------------------------------
POST clicklogs/_xpack/_graph/_explore
POST clicklogs/_xpack/graph/_explore
{
"vertices": [
{

View File

@ -58,16 +58,15 @@ public class RestGraphAction extends XPackRestHandler {
public RestGraphAction(Settings settings, RestController controller) {
super(settings);
// @deprecated Remove in 6.0
// NOTE: Old versions did not end with "/_explore"; they were just "/explore"
controller.registerWithDeprecatedHandler(GET, "/{index}" + URI_BASE + "/_graph/_explore", this,
GET, "/{index}/_graph/explore", deprecationLogger);
controller.registerWithDeprecatedHandler(POST, "/{index}" + URI_BASE + "/_graph/_explore", this,
POST, "/{index}/_graph/explore", deprecationLogger);
controller.registerWithDeprecatedHandler(GET, "/{index}/{type}" + URI_BASE + "/_graph/_explore", this,
GET, "/{index}/{type}/_graph/explore", deprecationLogger);
controller.registerWithDeprecatedHandler(POST, "/{index}/{type}" + URI_BASE + "/_graph/_explore", this,
POST, "/{index}/{type}/_graph/explore", deprecationLogger);
// @deprecated Remove in 7.0
controller.registerWithDeprecatedHandler(GET, "/{index}" + URI_BASE + "/graph/_explore", this,
GET, "/{index}" + URI_BASE + "/_graph/_explore", deprecationLogger);
controller.registerWithDeprecatedHandler(POST, "/{index}" + URI_BASE + "/graph/_explore", this,
POST, "/{index}" + URI_BASE + "/_graph/_explore", deprecationLogger);
controller.registerWithDeprecatedHandler(GET, "/{index}/{type}" + URI_BASE + "/graph/_explore", this,
GET, "/{index}/{type}" + URI_BASE + "/_graph/_explore", deprecationLogger);
controller.registerWithDeprecatedHandler(POST, "/{index}/{type}" + URI_BASE + "/graph/_explore", this,
POST, "/{index}/{type}" + URI_BASE + "/_graph/_explore", deprecationLogger);
}
@Override

View File

@ -1,10 +1,10 @@
{
"xpack.graph.explore": {
"documentation": "https://www.elastic.co/guide/en/graph/current/explore.html",
"documentation": "https://www.elastic.co/guide/en/x-pack/current/graph-api-explore.html",
"methods": ["GET", "POST"],
"url": {
"path": "/{index}/_xpack/_graph/_explore",
"paths": ["/{index}/_xpack/_graph/_explore", "/{index}/{type}/_xpack/_graph/_explore"],
"path": "/{index}/_xpack/graph/_explore",
"paths": ["/{index}/_xpack/graph/_explore", "/{index}/{type}/_xpack/graph/_explore"],
"parts" : {
"index": {
"type" : "list",