forked from opensearch-project/opensearch-api-specification
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtasks.yaml
231 lines (231 loc) · 8.1 KB
/
tasks.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
openapi: 3.1.0
info:
title: OpenSearch Tasks API
description: OpenSearch Tasks API.
version: 1.0.0
paths:
/_tasks:
get:
operationId: tasks.list.0
x-operation-group: tasks.list
x-version-added: '1.0'
description: Returns a list of tasks.
externalDocs:
url: https://opensearch.org/docs/latest/api-reference/tasks/
parameters:
- $ref: '#/components/parameters/tasks.list::query.actions'
- $ref: '#/components/parameters/tasks.list::query.detailed'
- $ref: '#/components/parameters/tasks.list::query.group_by'
- $ref: '#/components/parameters/tasks.list::query.nodes'
- $ref: '#/components/parameters/tasks.list::query.parent_task_id'
- $ref: '#/components/parameters/tasks.list::query.timeout'
- $ref: '#/components/parameters/tasks.list::query.wait_for_completion'
responses:
'200':
$ref: '#/components/responses/tasks.list@200'
/_tasks/_cancel:
post:
operationId: tasks.cancel.0
x-operation-group: tasks.cancel
x-version-added: '1.0'
description: Cancels a task, if it can be cancelled through an API.
externalDocs:
url: https://opensearch.org/docs/latest/api-reference/tasks/#task-canceling
parameters:
- $ref: '#/components/parameters/tasks.cancel::query.actions'
- $ref: '#/components/parameters/tasks.cancel::query.nodes'
- $ref: '#/components/parameters/tasks.cancel::query.parent_task_id'
- $ref: '#/components/parameters/tasks.cancel::query.wait_for_completion'
responses:
'200':
$ref: '#/components/responses/tasks.cancel@200'
/_tasks/{task_id}:
get:
operationId: tasks.get.0
x-operation-group: tasks.get
x-version-added: '1.0'
description: Returns information about a task.
externalDocs:
url: https://opensearch.org/docs/latest/api-reference/tasks/
parameters:
- $ref: '#/components/parameters/tasks.get::path.task_id'
- $ref: '#/components/parameters/tasks.get::query.timeout'
- $ref: '#/components/parameters/tasks.get::query.wait_for_completion'
responses:
'200':
$ref: '#/components/responses/tasks.get@200'
/_tasks/{task_id}/_cancel:
post:
operationId: tasks.cancel.1
x-operation-group: tasks.cancel
x-version-added: '1.0'
description: Cancels a task, if it can be cancelled through an API.
externalDocs:
url: https://opensearch.org/docs/latest/api-reference/tasks/#task-canceling
parameters:
- $ref: '#/components/parameters/tasks.cancel::path.task_id'
- $ref: '#/components/parameters/tasks.cancel::query.actions'
- $ref: '#/components/parameters/tasks.cancel::query.nodes'
- $ref: '#/components/parameters/tasks.cancel::query.parent_task_id'
- $ref: '#/components/parameters/tasks.cancel::query.wait_for_completion'
responses:
'200':
$ref: '#/components/responses/tasks.cancel@200'
components:
requestBodies: {}
responses:
tasks.cancel@200:
content:
application/json:
schema:
$ref: '../schemas/tasks._common.yaml#/components/schemas/TaskListResponseBase'
tasks.get@200:
content:
application/json:
schema:
type: object
properties:
completed:
type: boolean
task:
$ref: '../schemas/tasks._common.yaml#/components/schemas/TaskInfo'
response:
type: object
error:
$ref: '../schemas/_common.yaml#/components/schemas/ErrorCause'
required:
- completed
- task
tasks.list@200:
content:
application/json:
schema:
$ref: '../schemas/tasks._common.yaml#/components/schemas/TaskListResponseBase'
parameters:
tasks.cancel::path.task_id:
in: path
name: task_id
description: ID of the task.
required: true
schema:
$ref: '../schemas/_common.yaml#/components/schemas/TaskId'
style: simple
tasks.cancel::query.actions:
in: query
name: actions
description: Comma-separated list or wildcard expression of actions used to limit the request.
schema:
oneOf:
- type: string
- type: array
items:
type: string
style: form
tasks.cancel::query.nodes:
in: query
name: nodes
description: Comma-separated list of node IDs or names used to limit the request.
schema:
type: array
items:
type: string
style: form
tasks.cancel::query.parent_task_id:
in: query
name: parent_task_id
description: Parent task ID used to limit the tasks.
schema:
type: string
style: form
tasks.cancel::query.wait_for_completion:
in: query
name: wait_for_completion
description: Should the request block until the cancellation of the task and its descendant tasks is completed. Defaults to false
schema:
type: boolean
default: false
style: form
tasks.get::path.task_id:
in: path
name: task_id
description: ID of the task.
required: true
schema:
$ref: '../schemas/_common.yaml#/components/schemas/Id'
style: simple
tasks.get::query.timeout:
in: query
name: timeout
description: |-
Period to wait for a response.
If no response is received before the timeout expires, the request fails and returns an error.
schema:
$ref: '../schemas/_common.yaml#/components/schemas/Duration'
style: form
tasks.get::query.wait_for_completion:
in: query
name: wait_for_completion
description: If `true`, the request blocks until the task has completed.
schema:
type: boolean
default: false
style: form
tasks.list::query.actions:
in: query
name: actions
description: Comma-separated list or wildcard expression of actions used to limit the request.
schema:
oneOf:
- type: string
- type: array
items:
type: string
style: form
tasks.list::query.detailed:
in: query
name: detailed
description: If `true`, the response includes detailed information about shard recoveries.
schema:
type: boolean
default: false
style: form
tasks.list::query.group_by:
in: query
name: group_by
description: Key used to group tasks in the response.
schema:
$ref: '../schemas/tasks._common.yaml#/components/schemas/GroupBy'
style: form
tasks.list::query.nodes:
name: nodes
in: query
description: Comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes.
style: form
schema:
type: array
items:
type: string
description: Comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes.
explode: true
tasks.list::query.parent_task_id:
in: query
name: parent_task_id
description: Parent task ID used to limit returned information. To return all tasks, omit this parameter or use a value of `-1`.
schema:
$ref: '../schemas/_common.yaml#/components/schemas/Id'
style: form
tasks.list::query.timeout:
in: query
name: timeout
description: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
schema:
$ref: '../schemas/_common.yaml#/components/schemas/Duration'
style: form
tasks.list::query.wait_for_completion:
in: query
name: wait_for_completion
description: If `true`, the request blocks until the operation is complete.
schema:
type: boolean
default: false
style: form