forked from opensearch-project/opensearch-api-specification
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.yaml
95 lines (86 loc) · 2.2 KB
/
index.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
$schema: ../../../json_schemas/test_story.schema.yaml
description: Test endpoints relevant the lifecycle of an index, from creation to deletion.
epilogues:
- path: /books
method: DELETE
status: [200, 404]
- path: /games
method: DELETE
status: [200, 404]
chapters:
- synopsis: Create an index named `books` with mappings and settings.
path: /{index}
method: PUT
parameters:
index: books
request:
payload:
mappings:
properties:
name:
type: keyword
age:
type: integer
settings:
number_of_shards: 5
number_of_replicas: 2
response:
status: 200
- synopsis: Create an index named `games` with default settings.
path: /{index}
method: PUT
parameters:
index: games
- synopsis: Check if the index `books` exists. It should.
path: /{index}
method: HEAD
parameters:
index: books
allow_no_indices: true
expand_wildcards: all
flat_settings: true
include_defaults: true
ignore_unavailable: true
local: true
- synopsis: Check if the index `movies` exists. It should not.
path: /{index}
method: HEAD
parameters:
index: movies
response:
status: 404
- synopsis: Check if the index `movies` exists (cluster_manager_timeout). It should not.
path: /{index}
method: HEAD
version: '>= 2.0'
parameters:
index: movies
cluster_manager_timeout: 10s
response:
status: 404
- synopsis: Retrieve the mappings and settings of the `books` and `games` indices.
path: /{index}
method: GET
parameters:
index: books,games
flat_settings: true
- synopsis: Delete the `books` and `games` indices.
path: /{index}
method: DELETE
version: < 2.0
parameters:
index: books,games
- synopsis: Delete the `books` index (cluster_manager_timeout).
path: /{index}
method: DELETE
version: '>= 2.0'
parameters:
index: books,games
cluster_manager_timeout: 10s
- synopsis: Delete a nonexistent index `movies`.
path: /{index}
method: DELETE
parameters:
index: movies
response:
status: 404