forked from opensearch-project/opensearch-api-specification
-
Notifications
You must be signed in to change notification settings - Fork 0
/
doc.yaml
91 lines (90 loc) · 1.9 KB
/
doc.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
$schema: ../../../json_schemas/test_story.schema.yaml
description: Test inserting and retrieving a doc.
epilogues:
- path: /movies
method: DELETE
status: [200, 404]
chapters:
- synopsis: Create a document.
path: /{index}/_doc
method: POST
parameters:
index: movies
request:
payload:
title: Beauty and the Beast
year: 1991
response:
status: 201
- synopsis: Create a document.
path: /{index}/_doc/{id}
method: POST
parameters:
index: movies
id: '1'
request:
payload:
title: Beauty and the Beast (Id)
year: 1991
response:
status: 201
- synopsis: Update a document.
path: /{index}/_doc/{id}
method: PUT
parameters:
index: movies
id: '1'
request:
payload:
title: Beauty and the Beast (Updated)
year: 1991
response:
status: 200
- synopsis: Retrieve a document.
path: /{index}/_doc/{id}
method: GET
parameters:
index: movies
id: '1'
response:
status: 200
- synopsis: Check whether a document exists.
path: /{index}/_doc/{id}
method: HEAD
parameters:
index: movies
id: '1'
response:
status: 200
- synopsis: Delete a document.
path: /{index}/_doc/{id}
method: DELETE
parameters:
index: movies
id: '1'
response:
status: 200
- synopsis: Retrieve a nonexistent document.
path: /{index}/_doc/{id}
method: GET
parameters:
index: movies
id: '1'
response:
status: 404
- synopsis: Check whether a nonexistent document exists.
path: /{index}/_doc/{id}
method: HEAD
parameters:
index: movies
id: '1'
response:
status: 404
- synopsis: Delete a nonexistent document.
path: /{index}/_doc/{id}
method: DELETE
parameters:
index: movies
id: '1'
response:
status: 404