Skip to content

Commit 937e4b4

Browse files
committed
Add cat response examples
1 parent d9cefe4 commit 937e4b4

File tree

8 files changed

+133
-1
lines changed

8 files changed

+133
-1
lines changed

docs/overlays/elasticsearch-shared-overlays.yaml

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1360,6 +1360,57 @@ actions:
13601360
examples:
13611361
getBehavioralAnalyticsCollectionsResponseExample1:
13621362
$ref: "../../specification/search_application/get_behavioral_analytics/examples/200_response/BehavioralAnalyticsGetResponseExample1.yaml"
1363+
## Examples for cat
1364+
- target: "$.components['responses']['cat.aliases#200']"
1365+
description: "Add example for cat aliases response"
1366+
update:
1367+
content:
1368+
text/plain:
1369+
schema:
1370+
type: string
1371+
examples:
1372+
catAliasesResponseExample1:
1373+
$ref: "../../specification/cat/aliases/examples/response/CatAliasesResponseExample1.yaml"
1374+
- target: "$.components['responses']['cat.ml_datafeeds#200']"
1375+
description: "Add example for cat datafeeds response"
1376+
update:
1377+
content:
1378+
text/plain:
1379+
schema:
1380+
type: string
1381+
examples:
1382+
catDatafeedsResponseExample1:
1383+
$ref: "../../specification/cat/ml_datafeeds/examples/response/CatDatafeedsResponseExample1.yaml"
1384+
- target: "$.components['responses']['cat.ml_data_frame_analytics#200']"
1385+
description: "Add example for cat data frame analytics response"
1386+
update:
1387+
content:
1388+
text/plain:
1389+
schema:
1390+
type: string
1391+
examples:
1392+
catDataFrameAnalyticsResponseExample1:
1393+
$ref: "../../specification/cat/ml_data_frame_analytics/examples/response/CatDataFrameAnalyticsResponseExample1.yaml"
1394+
- target: "$.components['responses']['cat.ml_jobs#200']"
1395+
description: "Add example for cat anomaly detectors response"
1396+
update:
1397+
content:
1398+
text/plain:
1399+
schema:
1400+
type: string
1401+
examples:
1402+
catAnomalyDetectorsResponseExample1:
1403+
$ref: "../../specification/cat/ml_jobs/examples/response/CatJobsResponseExample1.yaml"
1404+
- target: "$.components['responses']['cat.ml_trained_models#200']"
1405+
description: "Add example for cat trained models response"
1406+
update:
1407+
content:
1408+
text/plain:
1409+
schema:
1410+
type: string
1411+
examples:
1412+
catTrainedModelsResponseExample1:
1413+
$ref: "../../specification/cat/ml_trained_models/examples/response/CatTrainedModelsResponseExample1.yaml"
13631414
## Examples for licensing
13641415
- target: "$.paths['/_license']['get']"
13651416
description: "Add example for get license response"
@@ -1408,4 +1459,4 @@ actions:
14081459
application/json:
14091460
examples:
14101461
searchApplicationSearchRequestExample1:
1411-
$ref: "../../specification/search_application/search/examples/request/SearchApplicationsSearchRequestExample1.yaml"
1462+
$ref: "../../specification/search_application/search/examples/request/SearchApplicationsSearchRequestExample1.yaml"
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# summary:
2+
description: >
3+
A successful response from `GET _cat/aliases?v=true`.
4+
This response shows that `alias2` has configured a filter and `alias3` and `alias4` have routing configurations.
5+
# type: response
6+
# response_code:
7+
value: |-
8+
alias index filter routing.index routing.search is_write_index
9+
alias1 test1 - - - -
10+
alias2 test1 * - - -
11+
alias3 test1 - 1 1 -
12+
alias4 test1 - 2 1,2 -
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# summary:
2+
description: A successful response from `GET _cat/ml/data_frame/analytics?v=true`.
3+
# type: response
4+
# response_code: ''
5+
value: |-
6+
id create_time type state
7+
classifier_job_1 2020-02-12T11:49:09.594Z classification stopped
8+
classifier_job_2 2020-02-12T11:49:14.479Z classification stopped
9+
classifier_job_3 2020-02-12T11:49:16.928Z classification stopped
10+
classifier_job_4 2020-02-12T11:49:19.127Z classification stopped
11+
classifier_job_5 2020-02-12T11:49:21.349Z classification stopped
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# summary:
2+
description: A successful response from `GET _cat/ml/datafeeds?v=true`.
3+
# type: response
4+
# response_code:
5+
value: |-
6+
id state buckets.count search.count
7+
datafeed-high_sum_total_sales stopped 743 7
8+
datafeed-low_request_rate stopped 1457 3
9+
datafeed-response_code_rates stopped 1460 18
10+
datafeed-url_scanning stopped 1460 18
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# summary:
2+
description: A succesful response from `GET _cat/ml/anomaly_detectors?h=id,s,dpr,mb&v=true`.
3+
# type: response
4+
# response_code: ''
5+
value: |-
6+
id s dpr mb
7+
high_sum_total_sales closed 14022 1.5mb
8+
low_request_rate closed 1216 40.5kb
9+
response_code_rates closed 28146 132.7kb
10+
url_scanning closed 28146 501.6kb
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# summary:
2+
description: A successful response from `GET _cat/ml/trained_models?h=c,o,l,ct,v&v=true`.
3+
# type: response
4+
# response_code: ''
5+
value: |-
6+
id created_by operations license create_time version
7+
8+
ddddd-1580216177138 _xpack 196 PLATINUM 2020-01-28T12:56:17.138Z
9+
8.0.0
10+
11+
flight-regress-1580215685537 _xpack 102 PLATINUM 2020-01-28T12:48:05.537Z
12+
8.0.0
13+
14+
lang_ident_model_1 _xpack 39629 BASIC 2019-12-05T12:28:34.594Z
15+
7.6.0
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# summary:
2+
description: A successful response from `GET _cat/tasks?v=true`.
3+
# type: response
4+
# response_code: ''
5+
value: |-
6+
action task_id parent_task_id type start_time timestamp running_time ip node
7+
cluster:monitor/tasks/lists[n] oTUltX4IQMOUUVeiohTt8A:124 oTUltX4IQMOUUVeiohTt8A:123 direct 1458585884904 01:48:24 44.1micros 127.0.0.1:9300 oTUltX4IQMOUUVeiohTt8A
8+
cluster:monitor/tasks/lists oTUltX4IQMOUUVeiohTt8A:123 - transport 1458585884904 01:48:24 186.2micros 127.0.0.1:9300 oTUltX4IQMOUUVeiohTt8A
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# summary:
2+
description: A successful response from `GET /_cat/transforms?v=true&format=json`.
3+
# type: response
4+
# response_code: ''
5+
value: |-
6+
[
7+
{
8+
"id" : "ecommerce_transform",
9+
"state" : "started",
10+
"checkpoint" : "1",
11+
"documents_processed" : "705",
12+
"checkpoint_progress" : "100.00",
13+
"changes_last_detection_time" : null
14+
}
15+
]

0 commit comments

Comments
 (0)