Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove es _xpack endpoint usage #29465

Merged
merged 16 commits into from
Jan 29, 2019
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/kbn-test/src/functional_tests/lib/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ async function insertUser(port, auth, username, password, roles = [], retries =
auth,
hostname: 'localhost',
port,
pathname: `/_xpack/security/user/${username}`,
pathname: `/_security/user/${username}`,
}),
json: true,
body: { password, roles },
Expand Down
4 changes: 2 additions & 2 deletions src/legacy/core_plugins/elasticsearch/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ interface ElasticsearchClientLogging {
}

interface AssistantAPIClientParams extends GenericParams {
path: '/_xpack/migration/assistance';
path: '/_migration/assistance';
method: 'GET';
}

Expand All @@ -191,7 +191,7 @@ export interface AssistanceAPIResponse {
}

interface DeprecationAPIClientParams extends GenericParams {
path: '/_xpack/migration/deprecations';
path: '/_migration/deprecations';
method: 'GET';
}

Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/canvas/server/lib/query_es_sql.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { normalizeType } from './normalize_type';

export const queryEsSQL = (elasticsearchClient, { count, query, filter }) =>
elasticsearchClient('transport.request', {
path: '/_xpack/sql?format=json',
path: '/_sql?format=json',
method: 'POST',
body: {
fetch_size: count,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"PUT"
],
"patterns": [
"{index}/_ccr/follow"
"{indices}/_ccr/follow"
],
"documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"GET"
],
"patterns": [
"{index}/_ccr/stats"
"{indices}/_ccr/stats"
],
"documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"POST"
],
"patterns": [
"{index}/_ccr/pause_follow"
"{indices}/_ccr/pause_follow"
],
"documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"POST"
],
"patterns": [
"{index}/_ccr/resume_follow"
"{indices}/_ccr/resume_follow"
],
"documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"POST"
],
"patterns": [
"{index}/_ccr/unfollow"
"{indices}/_ccr/unfollow"
],
"documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-unfollow.html"
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/current"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"POST"
],
"patterns": [
"{indices}/_ilm/remove",
"_ilm/remove"
"{indices}/_ilm/remove"
],
"documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-remove-policy.html"
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"indices.freeze": {
"url_params": {
"timeout": "",
"master_timeout": "",
"ignore_unavailable": "__flag__",
"allow_no_indices": "__flag__",
"expand_wildcards": [
"open",
"closed",
"none",
"all"
],
"wait_for_active_shards": ""
},
"methods": [
"POST"
],
"patterns": [
"{indices}/_freeze"
],
"documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/frozen.html"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"indices.unfreeze": {
"url_params": {
"timeout": "",
"master_timeout": "",
"ignore_unavailable": "__flag__",
"allow_no_indices": "__flag__",
"expand_wildcards": [
"open",
"closed",
"none",
"all"
],
"wait_for_active_shards": ""
},
"methods": [
"POST"
],
"patterns": [
"{indices}/_unfreeze"
],
"documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/frozen.html"
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"xpack.ml.close_job": {
"ml.close_job": {
"url_params": {
"allow_no_jobs": "__flag__",
"force": "__flag__",
Expand All @@ -9,7 +9,7 @@
"POST"
],
"patterns": [
"_xpack/ml/anomaly_detectors/{job_id}/_close"
"_ml/anomaly_detectors/{job_id}/_close"
],
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-close-job.html"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"xpack.ml.delete_filter": {
"ml.delete_calendar": {
"methods": [
"DELETE"
],
"patterns": [
"_xpack/ml/filters/{filter_id}"
"_ml/calendars/{calendar_id}"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"ml.delete_calendar_event": {
"methods": [
"DELETE"
],
"patterns": [
"_ml/calendars/{calendar_id}/events/{event_id}"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"ml.delete_calendar_job": {
"methods": [
"DELETE"
],
"patterns": [
"_ml/calendars/{calendar_id}/jobs/{job_id}"
]
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"xpack.ml.delete_datafeed": {
"ml.delete_datafeed": {
"url_params": {
"force": "__flag__"
},
"methods": [
"DELETE"
],
"patterns": [
"_xpack/ml/datafeeds/{datafeed_id}"
"_ml/datafeeds/{datafeed_id}"
],
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-datafeed.html"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"ml.delete_expired_data": {
"methods": [
"DELETE"
],
"patterns": [
"_ml/_delete_expired_data"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"ml.delete_filter": {
"methods": [
"DELETE"
],
"patterns": [
"_ml/filters/{filter_id}"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"ml.delete_forecast": {
"url_params": {
"allow_no_forecasts": "__flag__",
"timeout": ""
},
"methods": [
"DELETE"
],
"patterns": [
"_ml/anomaly_detectors/{job_id}/_forecast",
"_ml/anomaly_detectors/{job_id}/_forecast/{forecast_id}"
],
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-forecast.html"
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"xpack.ml.delete_job": {
"ml.delete_job": {
"url_params": {
"force": "__flag__"
"force": "__flag__",
"wait_for_completion": "__flag__"
},
"methods": [
"DELETE"
],
"patterns": [
"_xpack/ml/anomaly_detectors/{job_id}"
"_ml/anomaly_detectors/{job_id}"
],
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-job.html"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"xpack.ml.delete_model_snapshot": {
"ml.delete_model_snapshot": {
"methods": [
"DELETE"
],
"patterns": [
"_xpack/ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}"
"_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}"
],
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-snapshot.html"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"ml.find_file_structure": {
"url_params": {
"lines_to_sample": "",
"timeout": "",
"charset": "",
"format": [
"ndjson",
"xml",
"delimited",
"semi_structured_text"
],
"has_header_row": "__flag__",
"column_names": [],
"delimiter": "",
"quote": "",
"should_trim_fields": "__flag__",
"grok_pattern": "",
"timestamp_field": "",
"timestamp_format": "",
"explain": "__flag__"
},
"methods": [
"POST"
],
"patterns": [
"_ml/find_file_structure"
],
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-file-structure.html"
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"xpack.ml.flush_job": {
"ml.flush_job": {
"url_params": {
"calc_interim": "__flag__",
"start": "",
Expand All @@ -11,7 +11,7 @@
"POST"
],
"patterns": [
"_xpack/ml/anomaly_detectors/{job_id}/_flush"
"_ml/anomaly_detectors/{job_id}/_flush"
],
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"xpack.ml.forecast": {
"ml.forecast": {
"url_params": {
"duration": "",
"expires_in": ""
Expand All @@ -8,7 +8,7 @@
"POST"
],
"patterns": [
"_xpack/ml/anomaly_detectors/{job_id}/_forecast"
"_ml/anomaly_detectors/{job_id}/_forecast"
]
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"xpack.ml.get_buckets": {
"ml.get_buckets": {
"url_params": {
"expand": "__flag__",
"exclude_interim": "__flag__",
"from": 0,
"size": 0,
"from": "",
"size": "",
"start": "",
"end": "",
"anomaly_score": 0,
"anomaly_score": "",
"sort": "",
"desc": "__flag__"
},
Expand All @@ -16,8 +16,8 @@
"POST"
],
"patterns": [
"_xpack/ml/anomaly_detectors/{job_id}/results/buckets/{timestamp}",
"_xpack/ml/anomaly_detectors/{job_id}/results/buckets"
"_ml/anomaly_detectors/{job_id}/results/buckets/{timestamp}",
"_ml/anomaly_detectors/{job_id}/results/buckets"
],
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html"
}
Expand Down
Loading