influxdb-client-apis 2.9.0.pre.6293 → 2.9.0.pre.6399
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/influxdb-client-apis.rb +12 -0
- data/lib/influxdb2/apis/api.rb +7 -0
- data/lib/influxdb2/apis/generated/api/tasks_api.rb +1419 -0
- data/lib/influxdb2/apis/generated/models/log_event.rb +231 -0
- data/lib/influxdb2/apis/generated/models/logs.rb +212 -0
- data/lib/influxdb2/apis/generated/models/run.rb +333 -0
- data/lib/influxdb2/apis/generated/models/run_links.rb +228 -0
- data/lib/influxdb2/apis/generated/models/runs.rb +221 -0
- data/lib/influxdb2/apis/generated/models/task.rb +440 -0
- data/lib/influxdb2/apis/generated/models/task_create_request.rb +265 -0
- data/lib/influxdb2/apis/generated/models/task_links.rb +261 -0
- data/lib/influxdb2/apis/generated/models/task_status_type.rb +37 -0
- data/lib/influxdb2/apis/generated/models/task_update_request.rb +270 -0
- data/lib/influxdb2/apis/generated/models/tasks.rb +221 -0
- data/test/influxdb2/tasks_api_test.rb +104 -0
- data/test/test_helper.rb +1 -1
- metadata +18 -4
@@ -0,0 +1,1419 @@
|
|
1
|
+
=begin
|
2
|
+
#InfluxDB OSS API Service
|
3
|
+
|
4
|
+
#The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
|
10
|
+
=end
|
11
|
+
|
12
|
+
require 'cgi'
|
13
|
+
|
14
|
+
module InfluxDB2::API
|
15
|
+
class TasksApi
|
16
|
+
attr_accessor :api_client
|
17
|
+
|
18
|
+
def initialize(api_client = ApiClient.default)
|
19
|
+
@api_client = api_client
|
20
|
+
end
|
21
|
+
# Delete a task
|
22
|
+
# Deletes the specified [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) and all associated records (task runs, logs, and labels). Once the task is deleted, InfluxDB cancels all scheduled runs of the task. To disable a task instead of delete it, use [`PATCH /api/v2/tasks/TASK_ID`](#operation/PatchTasksID) to set the task status to `inactive`.
|
23
|
+
# @param task_id [String] A task ID. Specifies the [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) to delete.
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
26
|
+
# @return [nil]
|
27
|
+
def delete_tasks_id(task_id, opts = {})
|
28
|
+
delete_tasks_id_with_http_info(task_id, opts)
|
29
|
+
nil
|
30
|
+
end
|
31
|
+
|
32
|
+
# Delete a task
|
33
|
+
# Deletes the specified [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) and all associated records (task runs, logs, and labels). Once the task is deleted, InfluxDB cancels all scheduled runs of the task. To disable a task instead of delete it, use [`PATCH /api/v2/tasks/TASK_ID`](#operation/PatchTasksID) to set the task status to `inactive`.
|
34
|
+
# @param task_id [String] A task ID. Specifies the [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) to delete.
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
37
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
38
|
+
def delete_tasks_id_with_http_info(task_id, opts = {})
|
39
|
+
# verify the required parameter 'task_id' is set
|
40
|
+
if @api_client.config.client_side_validation && task_id.nil?
|
41
|
+
fail ArgumentError, "Missing the required parameter 'task_id' when calling TasksApi.delete_tasks_id"
|
42
|
+
end
|
43
|
+
# resource path
|
44
|
+
local_var_path = '/tasks/{taskID}'.sub('{' + 'taskID' + '}', CGI.escape(task_id.to_s))
|
45
|
+
|
46
|
+
# query parameters
|
47
|
+
query_params = opts[:query_params] || {}
|
48
|
+
|
49
|
+
# header parameters
|
50
|
+
header_params = opts[:header_params] || {}
|
51
|
+
# HTTP header 'Accept' (if needed)
|
52
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
53
|
+
header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
|
54
|
+
|
55
|
+
# form parameters
|
56
|
+
form_params = opts[:form_params] || {}
|
57
|
+
|
58
|
+
# http body (model)
|
59
|
+
post_body = opts[:debug_body]
|
60
|
+
|
61
|
+
# return_type
|
62
|
+
return_type = opts[:debug_return_type]
|
63
|
+
|
64
|
+
# auth_names
|
65
|
+
auth_names = opts[:debug_auth_names] || ['header']
|
66
|
+
|
67
|
+
new_options = opts.merge(
|
68
|
+
:operation => :"TasksApi.delete_tasks_id",
|
69
|
+
:header_params => header_params,
|
70
|
+
:query_params => query_params,
|
71
|
+
:form_params => form_params,
|
72
|
+
:body => post_body,
|
73
|
+
:auth_names => auth_names,
|
74
|
+
:return_type => return_type
|
75
|
+
)
|
76
|
+
|
77
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
78
|
+
return data, status_code, headers
|
79
|
+
end
|
80
|
+
|
81
|
+
# Delete a label from a task
|
82
|
+
# Deletes a label from a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task).
|
83
|
+
# @param task_id [String] A task ID. Specifies the [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) to delete the label from.
|
84
|
+
# @param label_id [String] A label ID. Specifies the label to delete.
|
85
|
+
# @param [Hash] opts the optional parameters
|
86
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
87
|
+
# @return [nil]
|
88
|
+
def delete_tasks_id_labels_id(task_id, label_id, opts = {})
|
89
|
+
delete_tasks_id_labels_id_with_http_info(task_id, label_id, opts)
|
90
|
+
nil
|
91
|
+
end
|
92
|
+
|
93
|
+
# Delete a label from a task
|
94
|
+
# Deletes a label from a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task).
|
95
|
+
# @param task_id [String] A task ID. Specifies the [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) to delete the label from.
|
96
|
+
# @param label_id [String] A label ID. Specifies the label to delete.
|
97
|
+
# @param [Hash] opts the optional parameters
|
98
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
99
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
100
|
+
def delete_tasks_id_labels_id_with_http_info(task_id, label_id, opts = {})
|
101
|
+
# verify the required parameter 'task_id' is set
|
102
|
+
if @api_client.config.client_side_validation && task_id.nil?
|
103
|
+
fail ArgumentError, "Missing the required parameter 'task_id' when calling TasksApi.delete_tasks_id_labels_id"
|
104
|
+
end
|
105
|
+
# verify the required parameter 'label_id' is set
|
106
|
+
if @api_client.config.client_side_validation && label_id.nil?
|
107
|
+
fail ArgumentError, "Missing the required parameter 'label_id' when calling TasksApi.delete_tasks_id_labels_id"
|
108
|
+
end
|
109
|
+
# resource path
|
110
|
+
local_var_path = '/tasks/{taskID}/labels/{labelID}'.sub('{' + 'taskID' + '}', CGI.escape(task_id.to_s)).sub('{' + 'labelID' + '}', CGI.escape(label_id.to_s))
|
111
|
+
|
112
|
+
# query parameters
|
113
|
+
query_params = opts[:query_params] || {}
|
114
|
+
|
115
|
+
# header parameters
|
116
|
+
header_params = opts[:header_params] || {}
|
117
|
+
# HTTP header 'Accept' (if needed)
|
118
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
119
|
+
header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
|
120
|
+
|
121
|
+
# form parameters
|
122
|
+
form_params = opts[:form_params] || {}
|
123
|
+
|
124
|
+
# http body (model)
|
125
|
+
post_body = opts[:debug_body]
|
126
|
+
|
127
|
+
# return_type
|
128
|
+
return_type = opts[:debug_return_type]
|
129
|
+
|
130
|
+
# auth_names
|
131
|
+
auth_names = opts[:debug_auth_names] || ['header']
|
132
|
+
|
133
|
+
new_options = opts.merge(
|
134
|
+
:operation => :"TasksApi.delete_tasks_id_labels_id",
|
135
|
+
:header_params => header_params,
|
136
|
+
:query_params => query_params,
|
137
|
+
:form_params => form_params,
|
138
|
+
:body => post_body,
|
139
|
+
:auth_names => auth_names,
|
140
|
+
:return_type => return_type
|
141
|
+
)
|
142
|
+
|
143
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
144
|
+
return data, status_code, headers
|
145
|
+
end
|
146
|
+
|
147
|
+
# Remove a member from a task
|
148
|
+
# **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Removes a member from a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task).
|
149
|
+
# @param user_id [String] A user ID. Specifies the member to remove.
|
150
|
+
# @param task_id [String] A task ID. Specifies the [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) to remove the member from.
|
151
|
+
# @param [Hash] opts the optional parameters
|
152
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
153
|
+
# @return [nil]
|
154
|
+
def delete_tasks_id_members_id(user_id, task_id, opts = {})
|
155
|
+
delete_tasks_id_members_id_with_http_info(user_id, task_id, opts)
|
156
|
+
nil
|
157
|
+
end
|
158
|
+
|
159
|
+
# Remove a member from a task
|
160
|
+
# **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Removes a member from a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task).
|
161
|
+
# @param user_id [String] A user ID. Specifies the member to remove.
|
162
|
+
# @param task_id [String] A task ID. Specifies the [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) to remove the member from.
|
163
|
+
# @param [Hash] opts the optional parameters
|
164
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
165
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
166
|
+
def delete_tasks_id_members_id_with_http_info(user_id, task_id, opts = {})
|
167
|
+
# verify the required parameter 'user_id' is set
|
168
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
169
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling TasksApi.delete_tasks_id_members_id"
|
170
|
+
end
|
171
|
+
# verify the required parameter 'task_id' is set
|
172
|
+
if @api_client.config.client_side_validation && task_id.nil?
|
173
|
+
fail ArgumentError, "Missing the required parameter 'task_id' when calling TasksApi.delete_tasks_id_members_id"
|
174
|
+
end
|
175
|
+
# resource path
|
176
|
+
local_var_path = '/tasks/{taskID}/members/{userID}'.sub('{' + 'userID' + '}', CGI.escape(user_id.to_s)).sub('{' + 'taskID' + '}', CGI.escape(task_id.to_s))
|
177
|
+
|
178
|
+
# query parameters
|
179
|
+
query_params = opts[:query_params] || {}
|
180
|
+
|
181
|
+
# header parameters
|
182
|
+
header_params = opts[:header_params] || {}
|
183
|
+
# HTTP header 'Accept' (if needed)
|
184
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
185
|
+
header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
|
186
|
+
|
187
|
+
# form parameters
|
188
|
+
form_params = opts[:form_params] || {}
|
189
|
+
|
190
|
+
# http body (model)
|
191
|
+
post_body = opts[:debug_body]
|
192
|
+
|
193
|
+
# return_type
|
194
|
+
return_type = opts[:debug_return_type]
|
195
|
+
|
196
|
+
# auth_names
|
197
|
+
auth_names = opts[:debug_auth_names] || ['header']
|
198
|
+
|
199
|
+
new_options = opts.merge(
|
200
|
+
:operation => :"TasksApi.delete_tasks_id_members_id",
|
201
|
+
:header_params => header_params,
|
202
|
+
:query_params => query_params,
|
203
|
+
:form_params => form_params,
|
204
|
+
:body => post_body,
|
205
|
+
:auth_names => auth_names,
|
206
|
+
:return_type => return_type
|
207
|
+
)
|
208
|
+
|
209
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
210
|
+
return data, status_code, headers
|
211
|
+
end
|
212
|
+
|
213
|
+
# Remove an owner from a task
|
214
|
+
# **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Removes an owner from a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task).
|
215
|
+
# @param user_id [String] A user ID. Specifies the owner to remove from the [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task).
|
216
|
+
# @param task_id [String] A task ID. Specifies the [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) to remove the owner from.
|
217
|
+
# @param [Hash] opts the optional parameters
|
218
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
219
|
+
# @return [nil]
|
220
|
+
def delete_tasks_id_owners_id(user_id, task_id, opts = {})
|
221
|
+
delete_tasks_id_owners_id_with_http_info(user_id, task_id, opts)
|
222
|
+
nil
|
223
|
+
end
|
224
|
+
|
225
|
+
# Remove an owner from a task
|
226
|
+
# **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Removes an owner from a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task).
|
227
|
+
# @param user_id [String] A user ID. Specifies the owner to remove from the [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task).
|
228
|
+
# @param task_id [String] A task ID. Specifies the [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) to remove the owner from.
|
229
|
+
# @param [Hash] opts the optional parameters
|
230
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
231
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
232
|
+
def delete_tasks_id_owners_id_with_http_info(user_id, task_id, opts = {})
|
233
|
+
# verify the required parameter 'user_id' is set
|
234
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
235
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling TasksApi.delete_tasks_id_owners_id"
|
236
|
+
end
|
237
|
+
# verify the required parameter 'task_id' is set
|
238
|
+
if @api_client.config.client_side_validation && task_id.nil?
|
239
|
+
fail ArgumentError, "Missing the required parameter 'task_id' when calling TasksApi.delete_tasks_id_owners_id"
|
240
|
+
end
|
241
|
+
# resource path
|
242
|
+
local_var_path = '/tasks/{taskID}/owners/{userID}'.sub('{' + 'userID' + '}', CGI.escape(user_id.to_s)).sub('{' + 'taskID' + '}', CGI.escape(task_id.to_s))
|
243
|
+
|
244
|
+
# query parameters
|
245
|
+
query_params = opts[:query_params] || {}
|
246
|
+
|
247
|
+
# header parameters
|
248
|
+
header_params = opts[:header_params] || {}
|
249
|
+
# HTTP header 'Accept' (if needed)
|
250
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
251
|
+
header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
|
252
|
+
|
253
|
+
# form parameters
|
254
|
+
form_params = opts[:form_params] || {}
|
255
|
+
|
256
|
+
# http body (model)
|
257
|
+
post_body = opts[:debug_body]
|
258
|
+
|
259
|
+
# return_type
|
260
|
+
return_type = opts[:debug_return_type]
|
261
|
+
|
262
|
+
# auth_names
|
263
|
+
auth_names = opts[:debug_auth_names] || ['header']
|
264
|
+
|
265
|
+
new_options = opts.merge(
|
266
|
+
:operation => :"TasksApi.delete_tasks_id_owners_id",
|
267
|
+
:header_params => header_params,
|
268
|
+
:query_params => query_params,
|
269
|
+
:form_params => form_params,
|
270
|
+
:body => post_body,
|
271
|
+
:auth_names => auth_names,
|
272
|
+
:return_type => return_type
|
273
|
+
)
|
274
|
+
|
275
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
276
|
+
return data, status_code, headers
|
277
|
+
end
|
278
|
+
|
279
|
+
# Cancel a running task
|
280
|
+
# Cancels a running [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). Use this endpoint to cancel a running task. #### InfluxDB Cloud - Doesn't support this operation.
|
281
|
+
# @param task_id [String] A task ID. Specifies the [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) to to cancel.
|
282
|
+
# @param run_id [String] A task run ID. Specifies the task run to cancel.
|
283
|
+
# @param [Hash] opts the optional parameters
|
284
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
285
|
+
# @return [nil]
|
286
|
+
def delete_tasks_id_runs_id(task_id, run_id, opts = {})
|
287
|
+
delete_tasks_id_runs_id_with_http_info(task_id, run_id, opts)
|
288
|
+
nil
|
289
|
+
end
|
290
|
+
|
291
|
+
# Cancel a running task
|
292
|
+
# Cancels a running [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). Use this endpoint to cancel a running task. #### InfluxDB Cloud - Doesn't support this operation.
|
293
|
+
# @param task_id [String] A task ID. Specifies the [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) to to cancel.
|
294
|
+
# @param run_id [String] A task run ID. Specifies the task run to cancel.
|
295
|
+
# @param [Hash] opts the optional parameters
|
296
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
297
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
298
|
+
def delete_tasks_id_runs_id_with_http_info(task_id, run_id, opts = {})
|
299
|
+
# verify the required parameter 'task_id' is set
|
300
|
+
if @api_client.config.client_side_validation && task_id.nil?
|
301
|
+
fail ArgumentError, "Missing the required parameter 'task_id' when calling TasksApi.delete_tasks_id_runs_id"
|
302
|
+
end
|
303
|
+
# verify the required parameter 'run_id' is set
|
304
|
+
if @api_client.config.client_side_validation && run_id.nil?
|
305
|
+
fail ArgumentError, "Missing the required parameter 'run_id' when calling TasksApi.delete_tasks_id_runs_id"
|
306
|
+
end
|
307
|
+
# resource path
|
308
|
+
local_var_path = '/tasks/{taskID}/runs/{runID}'.sub('{' + 'taskID' + '}', CGI.escape(task_id.to_s)).sub('{' + 'runID' + '}', CGI.escape(run_id.to_s))
|
309
|
+
|
310
|
+
# query parameters
|
311
|
+
query_params = opts[:query_params] || {}
|
312
|
+
|
313
|
+
# header parameters
|
314
|
+
header_params = opts[:header_params] || {}
|
315
|
+
# HTTP header 'Accept' (if needed)
|
316
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
317
|
+
header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
|
318
|
+
|
319
|
+
# form parameters
|
320
|
+
form_params = opts[:form_params] || {}
|
321
|
+
|
322
|
+
# http body (model)
|
323
|
+
post_body = opts[:debug_body]
|
324
|
+
|
325
|
+
# return_type
|
326
|
+
return_type = opts[:debug_return_type]
|
327
|
+
|
328
|
+
# auth_names
|
329
|
+
auth_names = opts[:debug_auth_names] || ['header']
|
330
|
+
|
331
|
+
new_options = opts.merge(
|
332
|
+
:operation => :"TasksApi.delete_tasks_id_runs_id",
|
333
|
+
:header_params => header_params,
|
334
|
+
:query_params => query_params,
|
335
|
+
:form_params => form_params,
|
336
|
+
:body => post_body,
|
337
|
+
:auth_names => auth_names,
|
338
|
+
:return_type => return_type
|
339
|
+
)
|
340
|
+
|
341
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
342
|
+
return data, status_code, headers
|
343
|
+
end
|
344
|
+
|
345
|
+
# List tasks
|
346
|
+
# Lists [tasks](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). To limit which tasks are returned, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all tasks up to the default `limit`. #### Related guide - [Process data with InfluxDB tasks](https://docs.influxdata.com/influxdb/latest/process-data/)
|
347
|
+
# @param [Hash] opts the optional parameters
|
348
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
349
|
+
# @option opts [String] :name A task name. Only returns [tasks](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) that have the specified name. Different tasks may have the same name.
|
350
|
+
# @option opts [String] :after A task ID. Only returns [tasks](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) created after the specified task.
|
351
|
+
# @option opts [String] :user A user ID. Only returns [tasks](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) owned by the specified [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user).
|
352
|
+
# @option opts [String] :org An organization name. Only returns tasks owned by the specified [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization).
|
353
|
+
# @option opts [String] :org_id An organization ID. Only returns [tasks](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) owned by the specified [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization).
|
354
|
+
# @option opts [String] :status A task status. Only returns [tasks](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) that have the specified status.
|
355
|
+
# @option opts [Integer] :limit The maximum number of [tasks](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) to return. Default is `100`. The minimum is `1` and the maximum is `500`. To reduce the payload size, combine _`type=basic`_ and _`limit`_ (see _Request samples_). For more information about the `basic` response, see the _`type`_ parameter. (default to 100)
|
356
|
+
# @option opts [String] :type A task type. Specifies the level of detail for [tasks](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) in the response. Default is `system`. The default (`system`) response contains all the metadata properties for tasks. To reduce the response size, pass `basic` to omit some task properties (`flux`, `createdAt`, `updatedAt`). (default to '')
|
357
|
+
# @return [Tasks]
|
358
|
+
def get_tasks(opts = {})
|
359
|
+
data, _status_code, _headers = get_tasks_with_http_info(opts)
|
360
|
+
data
|
361
|
+
end
|
362
|
+
|
363
|
+
# List tasks
|
364
|
+
# Lists [tasks](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). To limit which tasks are returned, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all tasks up to the default `limit`. #### Related guide - [Process data with InfluxDB tasks](https://docs.influxdata.com/influxdb/latest/process-data/)
|
365
|
+
# @param [Hash] opts the optional parameters
|
366
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
367
|
+
# @option opts [String] :name A task name. Only returns [tasks](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) that have the specified name. Different tasks may have the same name.
|
368
|
+
# @option opts [String] :after A task ID. Only returns [tasks](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) created after the specified task.
|
369
|
+
# @option opts [String] :user A user ID. Only returns [tasks](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) owned by the specified [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user).
|
370
|
+
# @option opts [String] :org An organization name. Only returns tasks owned by the specified [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization).
|
371
|
+
# @option opts [String] :org_id An organization ID. Only returns [tasks](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) owned by the specified [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization).
|
372
|
+
# @option opts [String] :status A task status. Only returns [tasks](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) that have the specified status.
|
373
|
+
# @option opts [Integer] :limit The maximum number of [tasks](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) to return. Default is `100`. The minimum is `1` and the maximum is `500`. To reduce the payload size, combine _`type=basic`_ and _`limit`_ (see _Request samples_). For more information about the `basic` response, see the _`type`_ parameter.
|
374
|
+
# @option opts [String] :type A task type. Specifies the level of detail for [tasks](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) in the response. Default is `system`. The default (`system`) response contains all the metadata properties for tasks. To reduce the response size, pass `basic` to omit some task properties (`flux`, `createdAt`, `updatedAt`).
|
375
|
+
# @return [Array<(Tasks, Integer, Hash)>] Tasks data, response status code and response headers
|
376
|
+
def get_tasks_with_http_info(opts = {})
|
377
|
+
allowable_values = ["active", "inactive"]
|
378
|
+
if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
|
379
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
|
380
|
+
end
|
381
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500
|
382
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TasksApi.get_tasks, must be smaller than or equal to 500.'
|
383
|
+
end
|
384
|
+
|
385
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
386
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TasksApi.get_tasks, must be greater than or equal to 1.'
|
387
|
+
end
|
388
|
+
|
389
|
+
allowable_values = ["basic", "system"]
|
390
|
+
if @api_client.config.client_side_validation && opts[:'type'] && !allowable_values.include?(opts[:'type'])
|
391
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}"
|
392
|
+
end
|
393
|
+
# resource path
|
394
|
+
local_var_path = '/tasks'
|
395
|
+
|
396
|
+
# query parameters
|
397
|
+
query_params = opts[:query_params] || {}
|
398
|
+
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
399
|
+
query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
|
400
|
+
query_params[:'user'] = opts[:'user'] if !opts[:'user'].nil?
|
401
|
+
query_params[:'org'] = opts[:'org'] if !opts[:'org'].nil?
|
402
|
+
query_params[:'orgID'] = opts[:'org_id'] if !opts[:'org_id'].nil?
|
403
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
404
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
405
|
+
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
406
|
+
|
407
|
+
# header parameters
|
408
|
+
header_params = opts[:header_params] || {}
|
409
|
+
# HTTP header 'Accept' (if needed)
|
410
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
411
|
+
header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
|
412
|
+
|
413
|
+
# form parameters
|
414
|
+
form_params = opts[:form_params] || {}
|
415
|
+
|
416
|
+
# http body (model)
|
417
|
+
post_body = opts[:debug_body]
|
418
|
+
|
419
|
+
# return_type
|
420
|
+
return_type = opts[:debug_return_type] || 'Tasks'
|
421
|
+
|
422
|
+
# auth_names
|
423
|
+
auth_names = opts[:debug_auth_names] || ['header']
|
424
|
+
|
425
|
+
new_options = opts.merge(
|
426
|
+
:operation => :"TasksApi.get_tasks",
|
427
|
+
:header_params => header_params,
|
428
|
+
:query_params => query_params,
|
429
|
+
:form_params => form_params,
|
430
|
+
:body => post_body,
|
431
|
+
:auth_names => auth_names,
|
432
|
+
:return_type => return_type
|
433
|
+
)
|
434
|
+
|
435
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
436
|
+
return data, status_code, headers
|
437
|
+
end
|
438
|
+
|
439
|
+
# Retrieve a task
|
440
|
+
# Retrieves the specified [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task).
|
441
|
+
# @param task_id [String] A task ID. Specifies the [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) to retrieve.
|
442
|
+
# @param [Hash] opts the optional parameters
|
443
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
444
|
+
# @return [Task]
|
445
|
+
def get_tasks_id(task_id, opts = {})
|
446
|
+
data, _status_code, _headers = get_tasks_id_with_http_info(task_id, opts)
|
447
|
+
data
|
448
|
+
end
|
449
|
+
|
450
|
+
# Retrieve a task
|
451
|
+
# Retrieves the specified [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task).
|
452
|
+
# @param task_id [String] A task ID. Specifies the [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) to retrieve.
|
453
|
+
# @param [Hash] opts the optional parameters
|
454
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
455
|
+
# @return [Array<(Task, Integer, Hash)>] Task data, response status code and response headers
|
456
|
+
def get_tasks_id_with_http_info(task_id, opts = {})
|
457
|
+
# verify the required parameter 'task_id' is set
|
458
|
+
if @api_client.config.client_side_validation && task_id.nil?
|
459
|
+
fail ArgumentError, "Missing the required parameter 'task_id' when calling TasksApi.get_tasks_id"
|
460
|
+
end
|
461
|
+
# resource path
|
462
|
+
local_var_path = '/tasks/{taskID}'.sub('{' + 'taskID' + '}', CGI.escape(task_id.to_s))
|
463
|
+
|
464
|
+
# query parameters
|
465
|
+
query_params = opts[:query_params] || {}
|
466
|
+
|
467
|
+
# header parameters
|
468
|
+
header_params = opts[:header_params] || {}
|
469
|
+
# HTTP header 'Accept' (if needed)
|
470
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
471
|
+
header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
|
472
|
+
|
473
|
+
# form parameters
|
474
|
+
form_params = opts[:form_params] || {}
|
475
|
+
|
476
|
+
# http body (model)
|
477
|
+
post_body = opts[:debug_body]
|
478
|
+
|
479
|
+
# return_type
|
480
|
+
return_type = opts[:debug_return_type] || 'Task'
|
481
|
+
|
482
|
+
# auth_names
|
483
|
+
auth_names = opts[:debug_auth_names] || ['header']
|
484
|
+
|
485
|
+
new_options = opts.merge(
|
486
|
+
:operation => :"TasksApi.get_tasks_id",
|
487
|
+
:header_params => header_params,
|
488
|
+
:query_params => query_params,
|
489
|
+
:form_params => form_params,
|
490
|
+
:body => post_body,
|
491
|
+
:auth_names => auth_names,
|
492
|
+
:return_type => return_type
|
493
|
+
)
|
494
|
+
|
495
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
496
|
+
return data, status_code, headers
|
497
|
+
end
|
498
|
+
|
499
|
+
# List labels for a task
|
500
|
+
# Lists all labels for a task. Use this endpoint to list labels applied to a task. Labels are a way to add metadata to InfluxDB resources. You can use labels for grouping and filtering resources in the InfluxDB UI, `influx` CLI, and InfluxDB API.
|
501
|
+
# @param task_id [String] A task ID. Specifies the task to retrieve labels for.
|
502
|
+
# @param [Hash] opts the optional parameters
|
503
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
504
|
+
# @return [LabelsResponse]
|
505
|
+
def get_tasks_id_labels(task_id, opts = {})
|
506
|
+
data, _status_code, _headers = get_tasks_id_labels_with_http_info(task_id, opts)
|
507
|
+
data
|
508
|
+
end
|
509
|
+
|
510
|
+
# List labels for a task
|
511
|
+
# Lists all labels for a task. Use this endpoint to list labels applied to a task. Labels are a way to add metadata to InfluxDB resources. You can use labels for grouping and filtering resources in the InfluxDB UI, `influx` CLI, and InfluxDB API.
|
512
|
+
# @param task_id [String] A task ID. Specifies the task to retrieve labels for.
|
513
|
+
# @param [Hash] opts the optional parameters
|
514
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
515
|
+
# @return [Array<(LabelsResponse, Integer, Hash)>] LabelsResponse data, response status code and response headers
|
516
|
+
def get_tasks_id_labels_with_http_info(task_id, opts = {})
|
517
|
+
# verify the required parameter 'task_id' is set
|
518
|
+
if @api_client.config.client_side_validation && task_id.nil?
|
519
|
+
fail ArgumentError, "Missing the required parameter 'task_id' when calling TasksApi.get_tasks_id_labels"
|
520
|
+
end
|
521
|
+
# resource path
|
522
|
+
local_var_path = '/tasks/{taskID}/labels'.sub('{' + 'taskID' + '}', CGI.escape(task_id.to_s))
|
523
|
+
|
524
|
+
# query parameters
|
525
|
+
query_params = opts[:query_params] || {}
|
526
|
+
|
527
|
+
# header parameters
|
528
|
+
header_params = opts[:header_params] || {}
|
529
|
+
# HTTP header 'Accept' (if needed)
|
530
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
531
|
+
header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
|
532
|
+
|
533
|
+
# form parameters
|
534
|
+
form_params = opts[:form_params] || {}
|
535
|
+
|
536
|
+
# http body (model)
|
537
|
+
post_body = opts[:debug_body]
|
538
|
+
|
539
|
+
# return_type
|
540
|
+
return_type = opts[:debug_return_type] || 'LabelsResponse'
|
541
|
+
|
542
|
+
# auth_names
|
543
|
+
auth_names = opts[:debug_auth_names] || ['header']
|
544
|
+
|
545
|
+
new_options = opts.merge(
|
546
|
+
:operation => :"TasksApi.get_tasks_id_labels",
|
547
|
+
:header_params => header_params,
|
548
|
+
:query_params => query_params,
|
549
|
+
:form_params => form_params,
|
550
|
+
:body => post_body,
|
551
|
+
:auth_names => auth_names,
|
552
|
+
:return_type => return_type
|
553
|
+
)
|
554
|
+
|
555
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
556
|
+
return data, status_code, headers
|
557
|
+
end
|
558
|
+
|
559
|
+
# List logs for a task
|
560
|
+
# Lists all log events for a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). When a task runs, InfluxDB creates a `run` record in the task’s history. Logs associated with each run provide relevant log messages, timestamps, and the exit status of the `run` attempt. Use this endpoint to retrieve only the log events for a task, without additional task metadata.
|
561
|
+
# @param task_id [String] A task ID. Specifies the [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) to retrieve logs for.
|
562
|
+
# @param [Hash] opts the optional parameters
|
563
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
564
|
+
# @return [Logs]
|
565
|
+
def get_tasks_id_logs(task_id, opts = {})
|
566
|
+
data, _status_code, _headers = get_tasks_id_logs_with_http_info(task_id, opts)
|
567
|
+
data
|
568
|
+
end
|
569
|
+
|
570
|
+
# List logs for a task
|
571
|
+
# Lists all log events for a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). When a task runs, InfluxDB creates a `run` record in the task’s history. Logs associated with each run provide relevant log messages, timestamps, and the exit status of the `run` attempt. Use this endpoint to retrieve only the log events for a task, without additional task metadata.
|
572
|
+
# @param task_id [String] A task ID. Specifies the [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) to retrieve logs for.
|
573
|
+
# @param [Hash] opts the optional parameters
|
574
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
575
|
+
# @return [Array<(Logs, Integer, Hash)>] Logs data, response status code and response headers
|
576
|
+
def get_tasks_id_logs_with_http_info(task_id, opts = {})
|
577
|
+
# verify the required parameter 'task_id' is set
|
578
|
+
if @api_client.config.client_side_validation && task_id.nil?
|
579
|
+
fail ArgumentError, "Missing the required parameter 'task_id' when calling TasksApi.get_tasks_id_logs"
|
580
|
+
end
|
581
|
+
# resource path
|
582
|
+
local_var_path = '/tasks/{taskID}/logs'.sub('{' + 'taskID' + '}', CGI.escape(task_id.to_s))
|
583
|
+
|
584
|
+
# query parameters
|
585
|
+
query_params = opts[:query_params] || {}
|
586
|
+
|
587
|
+
# header parameters
|
588
|
+
header_params = opts[:header_params] || {}
|
589
|
+
# HTTP header 'Accept' (if needed)
|
590
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
591
|
+
header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
|
592
|
+
|
593
|
+
# form parameters
|
594
|
+
form_params = opts[:form_params] || {}
|
595
|
+
|
596
|
+
# http body (model)
|
597
|
+
post_body = opts[:debug_body]
|
598
|
+
|
599
|
+
# return_type
|
600
|
+
return_type = opts[:debug_return_type] || 'Logs'
|
601
|
+
|
602
|
+
# auth_names
|
603
|
+
auth_names = opts[:debug_auth_names] || ['header']
|
604
|
+
|
605
|
+
new_options = opts.merge(
|
606
|
+
:operation => :"TasksApi.get_tasks_id_logs",
|
607
|
+
:header_params => header_params,
|
608
|
+
:query_params => query_params,
|
609
|
+
:form_params => form_params,
|
610
|
+
:body => post_body,
|
611
|
+
:auth_names => auth_names,
|
612
|
+
:return_type => return_type
|
613
|
+
)
|
614
|
+
|
615
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
616
|
+
return data, status_code, headers
|
617
|
+
end
|
618
|
+
|
619
|
+
# List all task members
|
620
|
+
# **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Lists all users that have the `member` role for the specified [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task).
|
621
|
+
# @param task_id [String] A task ID. Specifies the [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) to retrieve members for.
|
622
|
+
# @param [Hash] opts the optional parameters
|
623
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
624
|
+
# @return [ResourceMembers]
|
625
|
+
def get_tasks_id_members(task_id, opts = {})
|
626
|
+
data, _status_code, _headers = get_tasks_id_members_with_http_info(task_id, opts)
|
627
|
+
data
|
628
|
+
end
|
629
|
+
|
630
|
+
# List all task members
|
631
|
+
# **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Lists all users that have the `member` role for the specified [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task).
|
632
|
+
# @param task_id [String] A task ID. Specifies the [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) to retrieve members for.
|
633
|
+
# @param [Hash] opts the optional parameters
|
634
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
635
|
+
# @return [Array<(ResourceMembers, Integer, Hash)>] ResourceMembers data, response status code and response headers
|
636
|
+
def get_tasks_id_members_with_http_info(task_id, opts = {})
|
637
|
+
# verify the required parameter 'task_id' is set
|
638
|
+
if @api_client.config.client_side_validation && task_id.nil?
|
639
|
+
fail ArgumentError, "Missing the required parameter 'task_id' when calling TasksApi.get_tasks_id_members"
|
640
|
+
end
|
641
|
+
# resource path
|
642
|
+
local_var_path = '/tasks/{taskID}/members'.sub('{' + 'taskID' + '}', CGI.escape(task_id.to_s))
|
643
|
+
|
644
|
+
# query parameters
|
645
|
+
query_params = opts[:query_params] || {}
|
646
|
+
|
647
|
+
# header parameters
|
648
|
+
header_params = opts[:header_params] || {}
|
649
|
+
# HTTP header 'Accept' (if needed)
|
650
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
651
|
+
header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
|
652
|
+
|
653
|
+
# form parameters
|
654
|
+
form_params = opts[:form_params] || {}
|
655
|
+
|
656
|
+
# http body (model)
|
657
|
+
post_body = opts[:debug_body]
|
658
|
+
|
659
|
+
# return_type
|
660
|
+
return_type = opts[:debug_return_type] || 'ResourceMembers'
|
661
|
+
|
662
|
+
# auth_names
|
663
|
+
auth_names = opts[:debug_auth_names] || ['header']
|
664
|
+
|
665
|
+
new_options = opts.merge(
|
666
|
+
:operation => :"TasksApi.get_tasks_id_members",
|
667
|
+
:header_params => header_params,
|
668
|
+
:query_params => query_params,
|
669
|
+
:form_params => form_params,
|
670
|
+
:body => post_body,
|
671
|
+
:auth_names => auth_names,
|
672
|
+
:return_type => return_type
|
673
|
+
)
|
674
|
+
|
675
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
676
|
+
return data, status_code, headers
|
677
|
+
end
|
678
|
+
|
679
|
+
# List all owners of a task
|
680
|
+
# **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Lists all users that have the `owner` role for the specified task.
|
681
|
+
# @param task_id [String] A task ID. Specifies the task to retrieve owners for.
|
682
|
+
# @param [Hash] opts the optional parameters
|
683
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
684
|
+
# @return [ResourceOwners]
|
685
|
+
def get_tasks_id_owners(task_id, opts = {})
|
686
|
+
data, _status_code, _headers = get_tasks_id_owners_with_http_info(task_id, opts)
|
687
|
+
data
|
688
|
+
end
|
689
|
+
|
690
|
+
# List all owners of a task
|
691
|
+
# **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Lists all users that have the `owner` role for the specified task.
|
692
|
+
# @param task_id [String] A task ID. Specifies the task to retrieve owners for.
|
693
|
+
# @param [Hash] opts the optional parameters
|
694
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
695
|
+
# @return [Array<(ResourceOwners, Integer, Hash)>] ResourceOwners data, response status code and response headers
|
696
|
+
def get_tasks_id_owners_with_http_info(task_id, opts = {})
|
697
|
+
# verify the required parameter 'task_id' is set
|
698
|
+
if @api_client.config.client_side_validation && task_id.nil?
|
699
|
+
fail ArgumentError, "Missing the required parameter 'task_id' when calling TasksApi.get_tasks_id_owners"
|
700
|
+
end
|
701
|
+
# resource path
|
702
|
+
local_var_path = '/tasks/{taskID}/owners'.sub('{' + 'taskID' + '}', CGI.escape(task_id.to_s))
|
703
|
+
|
704
|
+
# query parameters
|
705
|
+
query_params = opts[:query_params] || {}
|
706
|
+
|
707
|
+
# header parameters
|
708
|
+
header_params = opts[:header_params] || {}
|
709
|
+
# HTTP header 'Accept' (if needed)
|
710
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
711
|
+
header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
|
712
|
+
|
713
|
+
# form parameters
|
714
|
+
form_params = opts[:form_params] || {}
|
715
|
+
|
716
|
+
# http body (model)
|
717
|
+
post_body = opts[:debug_body]
|
718
|
+
|
719
|
+
# return_type
|
720
|
+
return_type = opts[:debug_return_type] || 'ResourceOwners'
|
721
|
+
|
722
|
+
# auth_names
|
723
|
+
auth_names = opts[:debug_auth_names] || ['header']
|
724
|
+
|
725
|
+
new_options = opts.merge(
|
726
|
+
:operation => :"TasksApi.get_tasks_id_owners",
|
727
|
+
:header_params => header_params,
|
728
|
+
:query_params => query_params,
|
729
|
+
:form_params => form_params,
|
730
|
+
:body => post_body,
|
731
|
+
:auth_names => auth_names,
|
732
|
+
:return_type => return_type
|
733
|
+
)
|
734
|
+
|
735
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
736
|
+
return data, status_code, headers
|
737
|
+
end
|
738
|
+
|
739
|
+
# List runs for a task
|
740
|
+
# Lists runs for the specified [task](https://docs.influxdata.com/influxdb/latest/process-data/). To limit which task runs are returned, pass query parameters in your request. If you don't pass query parameters, InfluxDB returns all runs for the task up to the default `limit`.
|
741
|
+
# @param task_id [String] A task ID. Specifies the [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) to to list runs for.
|
742
|
+
# @param [Hash] opts the optional parameters
|
743
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
744
|
+
# @option opts [String] :after A task run ID. Only returns runs created after the specified run.
|
745
|
+
# @option opts [Integer] :limit Limits the number of task runs returned. Default is `100`. (default to 100)
|
746
|
+
# @option opts [Time] :after_time A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)). Only returns runs scheduled after the specified time.
|
747
|
+
# @option opts [Time] :before_time A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)). Only returns runs scheduled before the specified time.
|
748
|
+
# @return [Runs]
|
749
|
+
def get_tasks_id_runs(task_id, opts = {})
|
750
|
+
data, _status_code, _headers = get_tasks_id_runs_with_http_info(task_id, opts)
|
751
|
+
data
|
752
|
+
end
|
753
|
+
|
754
|
+
# List runs for a task
|
755
|
+
# Lists runs for the specified [task](https://docs.influxdata.com/influxdb/latest/process-data/). To limit which task runs are returned, pass query parameters in your request. If you don't pass query parameters, InfluxDB returns all runs for the task up to the default `limit`.
|
756
|
+
# @param task_id [String] A task ID. Specifies the [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) to to list runs for.
|
757
|
+
# @param [Hash] opts the optional parameters
|
758
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
759
|
+
# @option opts [String] :after A task run ID. Only returns runs created after the specified run.
|
760
|
+
# @option opts [Integer] :limit Limits the number of task runs returned. Default is `100`.
|
761
|
+
# @option opts [Time] :after_time A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)). Only returns runs scheduled after the specified time.
|
762
|
+
# @option opts [Time] :before_time A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)). Only returns runs scheduled before the specified time.
|
763
|
+
# @return [Array<(Runs, Integer, Hash)>] Runs data, response status code and response headers
|
764
|
+
def get_tasks_id_runs_with_http_info(task_id, opts = {})
|
765
|
+
# verify the required parameter 'task_id' is set
|
766
|
+
if @api_client.config.client_side_validation && task_id.nil?
|
767
|
+
fail ArgumentError, "Missing the required parameter 'task_id' when calling TasksApi.get_tasks_id_runs"
|
768
|
+
end
|
769
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500
|
770
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TasksApi.get_tasks_id_runs, must be smaller than or equal to 500.'
|
771
|
+
end
|
772
|
+
|
773
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
774
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TasksApi.get_tasks_id_runs, must be greater than or equal to 1.'
|
775
|
+
end
|
776
|
+
|
777
|
+
# resource path
|
778
|
+
local_var_path = '/tasks/{taskID}/runs'.sub('{' + 'taskID' + '}', CGI.escape(task_id.to_s))
|
779
|
+
|
780
|
+
# query parameters
|
781
|
+
query_params = opts[:query_params] || {}
|
782
|
+
query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
|
783
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
784
|
+
query_params[:'afterTime'] = opts[:'after_time'] if !opts[:'after_time'].nil?
|
785
|
+
query_params[:'beforeTime'] = opts[:'before_time'] if !opts[:'before_time'].nil?
|
786
|
+
|
787
|
+
# header parameters
|
788
|
+
header_params = opts[:header_params] || {}
|
789
|
+
# HTTP header 'Accept' (if needed)
|
790
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
791
|
+
header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
|
792
|
+
|
793
|
+
# form parameters
|
794
|
+
form_params = opts[:form_params] || {}
|
795
|
+
|
796
|
+
# http body (model)
|
797
|
+
post_body = opts[:debug_body]
|
798
|
+
|
799
|
+
# return_type
|
800
|
+
return_type = opts[:debug_return_type] || 'Runs'
|
801
|
+
|
802
|
+
# auth_names
|
803
|
+
auth_names = opts[:debug_auth_names] || ['header']
|
804
|
+
|
805
|
+
new_options = opts.merge(
|
806
|
+
:operation => :"TasksApi.get_tasks_id_runs",
|
807
|
+
:header_params => header_params,
|
808
|
+
:query_params => query_params,
|
809
|
+
:form_params => form_params,
|
810
|
+
:body => post_body,
|
811
|
+
:auth_names => auth_names,
|
812
|
+
:return_type => return_type
|
813
|
+
)
|
814
|
+
|
815
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
816
|
+
return data, status_code, headers
|
817
|
+
end
|
818
|
+
|
819
|
+
# Retrieve a run for a task.
|
820
|
+
# Retrieves the specified run for the specified [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). Use this endpoint to retrieve detail and logs for a specific task run.
|
821
|
+
# @param task_id [String] A task ID. Specifies the [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) that the task run belongs to.
|
822
|
+
# @param run_id [String] A task run ID. Specifies the run to retrieve.
|
823
|
+
# @param [Hash] opts the optional parameters
|
824
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
825
|
+
# @return [Run]
|
826
|
+
def get_tasks_id_runs_id(task_id, run_id, opts = {})
|
827
|
+
data, _status_code, _headers = get_tasks_id_runs_id_with_http_info(task_id, run_id, opts)
|
828
|
+
data
|
829
|
+
end
|
830
|
+
|
831
|
+
# Retrieve a run for a task.
|
832
|
+
# Retrieves the specified run for the specified [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). Use this endpoint to retrieve detail and logs for a specific task run.
|
833
|
+
# @param task_id [String] A task ID. Specifies the [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) that the task run belongs to.
|
834
|
+
# @param run_id [String] A task run ID. Specifies the run to retrieve.
|
835
|
+
# @param [Hash] opts the optional parameters
|
836
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
837
|
+
# @return [Array<(Run, Integer, Hash)>] Run data, response status code and response headers
|
838
|
+
def get_tasks_id_runs_id_with_http_info(task_id, run_id, opts = {})
|
839
|
+
# verify the required parameter 'task_id' is set
|
840
|
+
if @api_client.config.client_side_validation && task_id.nil?
|
841
|
+
fail ArgumentError, "Missing the required parameter 'task_id' when calling TasksApi.get_tasks_id_runs_id"
|
842
|
+
end
|
843
|
+
# verify the required parameter 'run_id' is set
|
844
|
+
if @api_client.config.client_side_validation && run_id.nil?
|
845
|
+
fail ArgumentError, "Missing the required parameter 'run_id' when calling TasksApi.get_tasks_id_runs_id"
|
846
|
+
end
|
847
|
+
# resource path
|
848
|
+
local_var_path = '/tasks/{taskID}/runs/{runID}'.sub('{' + 'taskID' + '}', CGI.escape(task_id.to_s)).sub('{' + 'runID' + '}', CGI.escape(run_id.to_s))
|
849
|
+
|
850
|
+
# query parameters
|
851
|
+
query_params = opts[:query_params] || {}
|
852
|
+
|
853
|
+
# header parameters
|
854
|
+
header_params = opts[:header_params] || {}
|
855
|
+
# HTTP header 'Accept' (if needed)
|
856
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
857
|
+
header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
|
858
|
+
|
859
|
+
# form parameters
|
860
|
+
form_params = opts[:form_params] || {}
|
861
|
+
|
862
|
+
# http body (model)
|
863
|
+
post_body = opts[:debug_body]
|
864
|
+
|
865
|
+
# return_type
|
866
|
+
return_type = opts[:debug_return_type] || 'Run'
|
867
|
+
|
868
|
+
# auth_names
|
869
|
+
auth_names = opts[:debug_auth_names] || ['header']
|
870
|
+
|
871
|
+
new_options = opts.merge(
|
872
|
+
:operation => :"TasksApi.get_tasks_id_runs_id",
|
873
|
+
:header_params => header_params,
|
874
|
+
:query_params => query_params,
|
875
|
+
:form_params => form_params,
|
876
|
+
:body => post_body,
|
877
|
+
:auth_names => auth_names,
|
878
|
+
:return_type => return_type
|
879
|
+
)
|
880
|
+
|
881
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
882
|
+
return data, status_code, headers
|
883
|
+
end
|
884
|
+
|
885
|
+
# List logs for a run
|
886
|
+
# Lists all logs for a task run. A log is a list of run events with `runID`, `time`, and `message` properties. Use this endpoint to help analyze [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) performance and troubleshoot failed task runs.
|
887
|
+
# @param task_id [String] A task ID. Specifies the [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) that the run belongs to.
|
888
|
+
# @param run_id [String] A run ID. Specifies the task run to list logs for.
|
889
|
+
# @param [Hash] opts the optional parameters
|
890
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
891
|
+
# @return [Logs]
|
892
|
+
def get_tasks_id_runs_id_logs(task_id, run_id, opts = {})
|
893
|
+
data, _status_code, _headers = get_tasks_id_runs_id_logs_with_http_info(task_id, run_id, opts)
|
894
|
+
data
|
895
|
+
end
|
896
|
+
|
897
|
+
# List logs for a run
|
898
|
+
# Lists all logs for a task run. A log is a list of run events with `runID`, `time`, and `message` properties. Use this endpoint to help analyze [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) performance and troubleshoot failed task runs.
|
899
|
+
# @param task_id [String] A task ID. Specifies the [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) that the run belongs to.
|
900
|
+
# @param run_id [String] A run ID. Specifies the task run to list logs for.
|
901
|
+
# @param [Hash] opts the optional parameters
|
902
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
903
|
+
# @return [Array<(Logs, Integer, Hash)>] Logs data, response status code and response headers
|
904
|
+
def get_tasks_id_runs_id_logs_with_http_info(task_id, run_id, opts = {})
|
905
|
+
# verify the required parameter 'task_id' is set
|
906
|
+
if @api_client.config.client_side_validation && task_id.nil?
|
907
|
+
fail ArgumentError, "Missing the required parameter 'task_id' when calling TasksApi.get_tasks_id_runs_id_logs"
|
908
|
+
end
|
909
|
+
# verify the required parameter 'run_id' is set
|
910
|
+
if @api_client.config.client_side_validation && run_id.nil?
|
911
|
+
fail ArgumentError, "Missing the required parameter 'run_id' when calling TasksApi.get_tasks_id_runs_id_logs"
|
912
|
+
end
|
913
|
+
# resource path
|
914
|
+
local_var_path = '/tasks/{taskID}/runs/{runID}/logs'.sub('{' + 'taskID' + '}', CGI.escape(task_id.to_s)).sub('{' + 'runID' + '}', CGI.escape(run_id.to_s))
|
915
|
+
|
916
|
+
# query parameters
|
917
|
+
query_params = opts[:query_params] || {}
|
918
|
+
|
919
|
+
# header parameters
|
920
|
+
header_params = opts[:header_params] || {}
|
921
|
+
# HTTP header 'Accept' (if needed)
|
922
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
923
|
+
header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
|
924
|
+
|
925
|
+
# form parameters
|
926
|
+
form_params = opts[:form_params] || {}
|
927
|
+
|
928
|
+
# http body (model)
|
929
|
+
post_body = opts[:debug_body]
|
930
|
+
|
931
|
+
# return_type
|
932
|
+
return_type = opts[:debug_return_type] || 'Logs'
|
933
|
+
|
934
|
+
# auth_names
|
935
|
+
auth_names = opts[:debug_auth_names] || ['header']
|
936
|
+
|
937
|
+
new_options = opts.merge(
|
938
|
+
:operation => :"TasksApi.get_tasks_id_runs_id_logs",
|
939
|
+
:header_params => header_params,
|
940
|
+
:query_params => query_params,
|
941
|
+
:form_params => form_params,
|
942
|
+
:body => post_body,
|
943
|
+
:auth_names => auth_names,
|
944
|
+
:return_type => return_type
|
945
|
+
)
|
946
|
+
|
947
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
948
|
+
return data, status_code, headers
|
949
|
+
end
|
950
|
+
|
951
|
+
# Update a task
|
952
|
+
# Updates the specified [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task), and then cancels all scheduled runs of the task. Use this endpoint to set, modify, or clear task properties--for example: `cron`, `name`, `flux`, `status`. Once InfluxDB applies the update, it cancels all previously scheduled runs of the task. #### Related guides - [Update a task](https://docs.influxdata.com/influxdb/latest/process-data/manage-tasks/update-task/) - [Task configuration options](https://docs.influxdata.com/influxdb/latest/process-data/task-options/)
|
953
|
+
# @param task_id [String] A task ID. Specifies the [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task)to update.
|
954
|
+
# @param task_update_request [TaskUpdateRequest] In the request body, provide the task properties to update.
|
955
|
+
# @param [Hash] opts the optional parameters
|
956
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
957
|
+
# @return [Task]
|
958
|
+
def patch_tasks_id(task_id, task_update_request, opts = {})
|
959
|
+
data, _status_code, _headers = patch_tasks_id_with_http_info(task_id, task_update_request, opts)
|
960
|
+
data
|
961
|
+
end
|
962
|
+
|
963
|
+
# Update a task
|
964
|
+
# Updates the specified [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task), and then cancels all scheduled runs of the task. Use this endpoint to set, modify, or clear task properties--for example: `cron`, `name`, `flux`, `status`. Once InfluxDB applies the update, it cancels all previously scheduled runs of the task. #### Related guides - [Update a task](https://docs.influxdata.com/influxdb/latest/process-data/manage-tasks/update-task/) - [Task configuration options](https://docs.influxdata.com/influxdb/latest/process-data/task-options/)
|
965
|
+
# @param task_id [String] A task ID. Specifies the [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task)to update.
|
966
|
+
# @param task_update_request [TaskUpdateRequest] In the request body, provide the task properties to update.
|
967
|
+
# @param [Hash] opts the optional parameters
|
968
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
969
|
+
# @return [Array<(Task, Integer, Hash)>] Task data, response status code and response headers
|
970
|
+
def patch_tasks_id_with_http_info(task_id, task_update_request, opts = {})
|
971
|
+
# verify the required parameter 'task_id' is set
|
972
|
+
if @api_client.config.client_side_validation && task_id.nil?
|
973
|
+
fail ArgumentError, "Missing the required parameter 'task_id' when calling TasksApi.patch_tasks_id"
|
974
|
+
end
|
975
|
+
# verify the required parameter 'task_update_request' is set
|
976
|
+
if @api_client.config.client_side_validation && task_update_request.nil?
|
977
|
+
fail ArgumentError, "Missing the required parameter 'task_update_request' when calling TasksApi.patch_tasks_id"
|
978
|
+
end
|
979
|
+
# resource path
|
980
|
+
local_var_path = '/tasks/{taskID}'.sub('{' + 'taskID' + '}', CGI.escape(task_id.to_s))
|
981
|
+
|
982
|
+
# query parameters
|
983
|
+
query_params = opts[:query_params] || {}
|
984
|
+
|
985
|
+
# header parameters
|
986
|
+
header_params = opts[:header_params] || {}
|
987
|
+
# HTTP header 'Accept' (if needed)
|
988
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
989
|
+
# HTTP header 'Content-Type'
|
990
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
991
|
+
header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
|
992
|
+
|
993
|
+
# form parameters
|
994
|
+
form_params = opts[:form_params] || {}
|
995
|
+
|
996
|
+
# http body (model)
|
997
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(task_update_request)
|
998
|
+
|
999
|
+
# return_type
|
1000
|
+
return_type = opts[:debug_return_type] || 'Task'
|
1001
|
+
|
1002
|
+
# auth_names
|
1003
|
+
auth_names = opts[:debug_auth_names] || ['header']
|
1004
|
+
|
1005
|
+
new_options = opts.merge(
|
1006
|
+
:operation => :"TasksApi.patch_tasks_id",
|
1007
|
+
:header_params => header_params,
|
1008
|
+
:query_params => query_params,
|
1009
|
+
:form_params => form_params,
|
1010
|
+
:body => post_body,
|
1011
|
+
:auth_names => auth_names,
|
1012
|
+
:return_type => return_type
|
1013
|
+
)
|
1014
|
+
|
1015
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
1016
|
+
return data, status_code, headers
|
1017
|
+
end
|
1018
|
+
|
1019
|
+
# Create a task
|
1020
|
+
# Creates a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) and returns the task. Use this endpoint to create a scheduled task that runs a script. #### Related guides - [Get started with tasks](https://docs.influxdata.com/influxdb/latest/process-data/get-started/) - [Create a task](https://docs.influxdata.com/influxdb/latest/process-data/manage-tasks/create-task/) - [Common tasks](https://docs.influxdata.com/influxdb/latest/process-data/common-tasks/) - [Task configuration options](https://docs.influxdata.com/influxdb/latest/process-data/task-options/)
|
1021
|
+
# @param task_create_request [TaskCreateRequest] In the request body, provide the task. #### InfluxDB OSS - Requires either the `org` parameter or the `orgID` parameter.
|
1022
|
+
# @param [Hash] opts the optional parameters
|
1023
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
1024
|
+
# @return [Task]
|
1025
|
+
def post_tasks(task_create_request, opts = {})
|
1026
|
+
data, _status_code, _headers = post_tasks_with_http_info(task_create_request, opts)
|
1027
|
+
data
|
1028
|
+
end
|
1029
|
+
|
1030
|
+
# Create a task
|
1031
|
+
# Creates a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) and returns the task. Use this endpoint to create a scheduled task that runs a script. #### Related guides - [Get started with tasks](https://docs.influxdata.com/influxdb/latest/process-data/get-started/) - [Create a task](https://docs.influxdata.com/influxdb/latest/process-data/manage-tasks/create-task/) - [Common tasks](https://docs.influxdata.com/influxdb/latest/process-data/common-tasks/) - [Task configuration options](https://docs.influxdata.com/influxdb/latest/process-data/task-options/)
|
1032
|
+
# @param task_create_request [TaskCreateRequest] In the request body, provide the task. #### InfluxDB OSS - Requires either the `org` parameter or the `orgID` parameter.
|
1033
|
+
# @param [Hash] opts the optional parameters
|
1034
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
1035
|
+
# @return [Array<(Task, Integer, Hash)>] Task data, response status code and response headers
|
1036
|
+
def post_tasks_with_http_info(task_create_request, opts = {})
|
1037
|
+
# verify the required parameter 'task_create_request' is set
|
1038
|
+
if @api_client.config.client_side_validation && task_create_request.nil?
|
1039
|
+
fail ArgumentError, "Missing the required parameter 'task_create_request' when calling TasksApi.post_tasks"
|
1040
|
+
end
|
1041
|
+
# resource path
|
1042
|
+
local_var_path = '/tasks'
|
1043
|
+
|
1044
|
+
# query parameters
|
1045
|
+
query_params = opts[:query_params] || {}
|
1046
|
+
|
1047
|
+
# header parameters
|
1048
|
+
header_params = opts[:header_params] || {}
|
1049
|
+
# HTTP header 'Accept' (if needed)
|
1050
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1051
|
+
# HTTP header 'Content-Type'
|
1052
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1053
|
+
header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
|
1054
|
+
|
1055
|
+
# form parameters
|
1056
|
+
form_params = opts[:form_params] || {}
|
1057
|
+
|
1058
|
+
# http body (model)
|
1059
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(task_create_request)
|
1060
|
+
|
1061
|
+
# return_type
|
1062
|
+
return_type = opts[:debug_return_type] || 'Task'
|
1063
|
+
|
1064
|
+
# auth_names
|
1065
|
+
auth_names = opts[:debug_auth_names] || ['header']
|
1066
|
+
|
1067
|
+
new_options = opts.merge(
|
1068
|
+
:operation => :"TasksApi.post_tasks",
|
1069
|
+
:header_params => header_params,
|
1070
|
+
:query_params => query_params,
|
1071
|
+
:form_params => form_params,
|
1072
|
+
:body => post_body,
|
1073
|
+
:auth_names => auth_names,
|
1074
|
+
:return_type => return_type
|
1075
|
+
)
|
1076
|
+
|
1077
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
1078
|
+
return data, status_code, headers
|
1079
|
+
end
|
1080
|
+
|
1081
|
+
# Add a label to a task
|
1082
|
+
# Adds a label to a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). Use this endpoint to add a label to a task. Labels are a way to add metadata to InfluxDB resources. You can use labels for grouping and filtering resources in the InfluxDB UI, `influx` CLI, and InfluxDB API.
|
1083
|
+
# @param task_id [String] A task ID. Specifies the [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) to label.
|
1084
|
+
# @param label_mapping [LabelMapping] In the request body, provide an object that specifies the label.
|
1085
|
+
# @param [Hash] opts the optional parameters
|
1086
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
1087
|
+
# @return [LabelResponse]
|
1088
|
+
def post_tasks_id_labels(task_id, label_mapping, opts = {})
|
1089
|
+
data, _status_code, _headers = post_tasks_id_labels_with_http_info(task_id, label_mapping, opts)
|
1090
|
+
data
|
1091
|
+
end
|
1092
|
+
|
1093
|
+
# Add a label to a task
|
1094
|
+
# Adds a label to a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). Use this endpoint to add a label to a task. Labels are a way to add metadata to InfluxDB resources. You can use labels for grouping and filtering resources in the InfluxDB UI, `influx` CLI, and InfluxDB API.
|
1095
|
+
# @param task_id [String] A task ID. Specifies the [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) to label.
|
1096
|
+
# @param label_mapping [LabelMapping] In the request body, provide an object that specifies the label.
|
1097
|
+
# @param [Hash] opts the optional parameters
|
1098
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
1099
|
+
# @return [Array<(LabelResponse, Integer, Hash)>] LabelResponse data, response status code and response headers
|
1100
|
+
def post_tasks_id_labels_with_http_info(task_id, label_mapping, opts = {})
|
1101
|
+
# verify the required parameter 'task_id' is set
|
1102
|
+
if @api_client.config.client_side_validation && task_id.nil?
|
1103
|
+
fail ArgumentError, "Missing the required parameter 'task_id' when calling TasksApi.post_tasks_id_labels"
|
1104
|
+
end
|
1105
|
+
# verify the required parameter 'label_mapping' is set
|
1106
|
+
if @api_client.config.client_side_validation && label_mapping.nil?
|
1107
|
+
fail ArgumentError, "Missing the required parameter 'label_mapping' when calling TasksApi.post_tasks_id_labels"
|
1108
|
+
end
|
1109
|
+
# resource path
|
1110
|
+
local_var_path = '/tasks/{taskID}/labels'.sub('{' + 'taskID' + '}', CGI.escape(task_id.to_s))
|
1111
|
+
|
1112
|
+
# query parameters
|
1113
|
+
query_params = opts[:query_params] || {}
|
1114
|
+
|
1115
|
+
# header parameters
|
1116
|
+
header_params = opts[:header_params] || {}
|
1117
|
+
# HTTP header 'Accept' (if needed)
|
1118
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1119
|
+
# HTTP header 'Content-Type'
|
1120
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1121
|
+
header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
|
1122
|
+
|
1123
|
+
# form parameters
|
1124
|
+
form_params = opts[:form_params] || {}
|
1125
|
+
|
1126
|
+
# http body (model)
|
1127
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(label_mapping)
|
1128
|
+
|
1129
|
+
# return_type
|
1130
|
+
return_type = opts[:debug_return_type] || 'LabelResponse'
|
1131
|
+
|
1132
|
+
# auth_names
|
1133
|
+
auth_names = opts[:debug_auth_names] || ['header']
|
1134
|
+
|
1135
|
+
new_options = opts.merge(
|
1136
|
+
:operation => :"TasksApi.post_tasks_id_labels",
|
1137
|
+
:header_params => header_params,
|
1138
|
+
:query_params => query_params,
|
1139
|
+
:form_params => form_params,
|
1140
|
+
:body => post_body,
|
1141
|
+
:auth_names => auth_names,
|
1142
|
+
:return_type => return_type
|
1143
|
+
)
|
1144
|
+
|
1145
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
1146
|
+
return data, status_code, headers
|
1147
|
+
end
|
1148
|
+
|
1149
|
+
# Add a member to a task
|
1150
|
+
# **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Adds a specified user to members of the specified [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) and then returns the member.
|
1151
|
+
# @param task_id [String] A [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) ID. Specifies the task for the member.
|
1152
|
+
# @param add_resource_member_request_body [AddResourceMemberRequestBody] In the request body, provide an object that specifies the user.
|
1153
|
+
# @param [Hash] opts the optional parameters
|
1154
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
1155
|
+
# @return [ResourceMember]
|
1156
|
+
def post_tasks_id_members(task_id, add_resource_member_request_body, opts = {})
|
1157
|
+
data, _status_code, _headers = post_tasks_id_members_with_http_info(task_id, add_resource_member_request_body, opts)
|
1158
|
+
data
|
1159
|
+
end
|
1160
|
+
|
1161
|
+
# Add a member to a task
|
1162
|
+
# **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Adds a specified user to members of the specified [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) and then returns the member.
|
1163
|
+
# @param task_id [String] A [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) ID. Specifies the task for the member.
|
1164
|
+
# @param add_resource_member_request_body [AddResourceMemberRequestBody] In the request body, provide an object that specifies the user.
|
1165
|
+
# @param [Hash] opts the optional parameters
|
1166
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
1167
|
+
# @return [Array<(ResourceMember, Integer, Hash)>] ResourceMember data, response status code and response headers
|
1168
|
+
def post_tasks_id_members_with_http_info(task_id, add_resource_member_request_body, opts = {})
|
1169
|
+
# verify the required parameter 'task_id' is set
|
1170
|
+
if @api_client.config.client_side_validation && task_id.nil?
|
1171
|
+
fail ArgumentError, "Missing the required parameter 'task_id' when calling TasksApi.post_tasks_id_members"
|
1172
|
+
end
|
1173
|
+
# verify the required parameter 'add_resource_member_request_body' is set
|
1174
|
+
if @api_client.config.client_side_validation && add_resource_member_request_body.nil?
|
1175
|
+
fail ArgumentError, "Missing the required parameter 'add_resource_member_request_body' when calling TasksApi.post_tasks_id_members"
|
1176
|
+
end
|
1177
|
+
# resource path
|
1178
|
+
local_var_path = '/tasks/{taskID}/members'.sub('{' + 'taskID' + '}', CGI.escape(task_id.to_s))
|
1179
|
+
|
1180
|
+
# query parameters
|
1181
|
+
query_params = opts[:query_params] || {}
|
1182
|
+
|
1183
|
+
# header parameters
|
1184
|
+
header_params = opts[:header_params] || {}
|
1185
|
+
# HTTP header 'Accept' (if needed)
|
1186
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1187
|
+
# HTTP header 'Content-Type'
|
1188
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1189
|
+
header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
|
1190
|
+
|
1191
|
+
# form parameters
|
1192
|
+
form_params = opts[:form_params] || {}
|
1193
|
+
|
1194
|
+
# http body (model)
|
1195
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(add_resource_member_request_body)
|
1196
|
+
|
1197
|
+
# return_type
|
1198
|
+
return_type = opts[:debug_return_type] || 'ResourceMember'
|
1199
|
+
|
1200
|
+
# auth_names
|
1201
|
+
auth_names = opts[:debug_auth_names] || ['header']
|
1202
|
+
|
1203
|
+
new_options = opts.merge(
|
1204
|
+
:operation => :"TasksApi.post_tasks_id_members",
|
1205
|
+
:header_params => header_params,
|
1206
|
+
:query_params => query_params,
|
1207
|
+
:form_params => form_params,
|
1208
|
+
:body => post_body,
|
1209
|
+
:auth_names => auth_names,
|
1210
|
+
:return_type => return_type
|
1211
|
+
)
|
1212
|
+
|
1213
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
1214
|
+
return data, status_code, headers
|
1215
|
+
end
|
1216
|
+
|
1217
|
+
# Add an owner for a task
|
1218
|
+
# **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Adds a specified user to owners of the specified task and then returns the owner. Use this endpoint to create a _resource owner_ for the task. A _resource owner_ is a user with `role: owner` for a specific resource.
|
1219
|
+
# @param task_id [String] A task ID. Specifies the [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) for the owner.
|
1220
|
+
# @param add_resource_member_request_body [AddResourceMemberRequestBody] In the request body, provide an object that specifies the user.
|
1221
|
+
# @param [Hash] opts the optional parameters
|
1222
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
1223
|
+
# @return [ResourceOwner]
|
1224
|
+
def post_tasks_id_owners(task_id, add_resource_member_request_body, opts = {})
|
1225
|
+
data, _status_code, _headers = post_tasks_id_owners_with_http_info(task_id, add_resource_member_request_body, opts)
|
1226
|
+
data
|
1227
|
+
end
|
1228
|
+
|
1229
|
+
# Add an owner for a task
|
1230
|
+
# **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Adds a specified user to owners of the specified task and then returns the owner. Use this endpoint to create a _resource owner_ for the task. A _resource owner_ is a user with `role: owner` for a specific resource.
|
1231
|
+
# @param task_id [String] A task ID. Specifies the [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) for the owner.
|
1232
|
+
# @param add_resource_member_request_body [AddResourceMemberRequestBody] In the request body, provide an object that specifies the user.
|
1233
|
+
# @param [Hash] opts the optional parameters
|
1234
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
1235
|
+
# @return [Array<(ResourceOwner, Integer, Hash)>] ResourceOwner data, response status code and response headers
|
1236
|
+
def post_tasks_id_owners_with_http_info(task_id, add_resource_member_request_body, opts = {})
|
1237
|
+
# verify the required parameter 'task_id' is set
|
1238
|
+
if @api_client.config.client_side_validation && task_id.nil?
|
1239
|
+
fail ArgumentError, "Missing the required parameter 'task_id' when calling TasksApi.post_tasks_id_owners"
|
1240
|
+
end
|
1241
|
+
# verify the required parameter 'add_resource_member_request_body' is set
|
1242
|
+
if @api_client.config.client_side_validation && add_resource_member_request_body.nil?
|
1243
|
+
fail ArgumentError, "Missing the required parameter 'add_resource_member_request_body' when calling TasksApi.post_tasks_id_owners"
|
1244
|
+
end
|
1245
|
+
# resource path
|
1246
|
+
local_var_path = '/tasks/{taskID}/owners'.sub('{' + 'taskID' + '}', CGI.escape(task_id.to_s))
|
1247
|
+
|
1248
|
+
# query parameters
|
1249
|
+
query_params = opts[:query_params] || {}
|
1250
|
+
|
1251
|
+
# header parameters
|
1252
|
+
header_params = opts[:header_params] || {}
|
1253
|
+
# HTTP header 'Accept' (if needed)
|
1254
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1255
|
+
# HTTP header 'Content-Type'
|
1256
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1257
|
+
header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
|
1258
|
+
|
1259
|
+
# form parameters
|
1260
|
+
form_params = opts[:form_params] || {}
|
1261
|
+
|
1262
|
+
# http body (model)
|
1263
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(add_resource_member_request_body)
|
1264
|
+
|
1265
|
+
# return_type
|
1266
|
+
return_type = opts[:debug_return_type] || 'ResourceOwner'
|
1267
|
+
|
1268
|
+
# auth_names
|
1269
|
+
auth_names = opts[:debug_auth_names] || ['header']
|
1270
|
+
|
1271
|
+
new_options = opts.merge(
|
1272
|
+
:operation => :"TasksApi.post_tasks_id_owners",
|
1273
|
+
:header_params => header_params,
|
1274
|
+
:query_params => query_params,
|
1275
|
+
:form_params => form_params,
|
1276
|
+
:body => post_body,
|
1277
|
+
:auth_names => auth_names,
|
1278
|
+
:return_type => return_type
|
1279
|
+
)
|
1280
|
+
|
1281
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
1282
|
+
return data, status_code, headers
|
1283
|
+
end
|
1284
|
+
|
1285
|
+
# Start a task run, overriding the schedule
|
1286
|
+
# Schedules a task run to start immediately, ignoring scheduled runs. Use this endpoint to manually start a task run. Scheduled runs will continue to run as scheduled. This may result in concurrently running tasks. To _retry_ a previous run (and avoid creating a new run), use the [`POST /api/v2/tasks/{taskID}/runs/{runID}/retry` endpoint](#operation/PostTasksIDRunsIDRetry). #### Limitations - Queuing a task run requires that the task's `status` property be set to `active`.
|
1287
|
+
# @param task_id [String] A task ID. Specifies the [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) to to run.
|
1288
|
+
# @param [Hash] opts the optional parameters
|
1289
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
1290
|
+
# @option opts [RunManually] :run_manually
|
1291
|
+
# @return [Run]
|
1292
|
+
def post_tasks_id_runs(task_id, opts = {})
|
1293
|
+
data, _status_code, _headers = post_tasks_id_runs_with_http_info(task_id, opts)
|
1294
|
+
data
|
1295
|
+
end
|
1296
|
+
|
1297
|
+
# Start a task run, overriding the schedule
|
1298
|
+
# Schedules a task run to start immediately, ignoring scheduled runs. Use this endpoint to manually start a task run. Scheduled runs will continue to run as scheduled. This may result in concurrently running tasks. To _retry_ a previous run (and avoid creating a new run), use the [`POST /api/v2/tasks/{taskID}/runs/{runID}/retry` endpoint](#operation/PostTasksIDRunsIDRetry). #### Limitations - Queuing a task run requires that the task's `status` property be set to `active`.
|
1299
|
+
# @param task_id [String] A task ID. Specifies the [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) to to run.
|
1300
|
+
# @param [Hash] opts the optional parameters
|
1301
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
1302
|
+
# @option opts [RunManually] :run_manually
|
1303
|
+
# @return [Array<(Run, Integer, Hash)>] Run data, response status code and response headers
|
1304
|
+
def post_tasks_id_runs_with_http_info(task_id, opts = {})
|
1305
|
+
# verify the required parameter 'task_id' is set
|
1306
|
+
if @api_client.config.client_side_validation && task_id.nil?
|
1307
|
+
fail ArgumentError, "Missing the required parameter 'task_id' when calling TasksApi.post_tasks_id_runs"
|
1308
|
+
end
|
1309
|
+
# resource path
|
1310
|
+
local_var_path = '/tasks/{taskID}/runs'.sub('{' + 'taskID' + '}', CGI.escape(task_id.to_s))
|
1311
|
+
|
1312
|
+
# query parameters
|
1313
|
+
query_params = opts[:query_params] || {}
|
1314
|
+
|
1315
|
+
# header parameters
|
1316
|
+
header_params = opts[:header_params] || {}
|
1317
|
+
# HTTP header 'Accept' (if needed)
|
1318
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1319
|
+
# HTTP header 'Content-Type'
|
1320
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1321
|
+
header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
|
1322
|
+
|
1323
|
+
# form parameters
|
1324
|
+
form_params = opts[:form_params] || {}
|
1325
|
+
|
1326
|
+
# http body (model)
|
1327
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'run_manually'])
|
1328
|
+
|
1329
|
+
# return_type
|
1330
|
+
return_type = opts[:debug_return_type] || 'Run'
|
1331
|
+
|
1332
|
+
# auth_names
|
1333
|
+
auth_names = opts[:debug_auth_names] || ['header']
|
1334
|
+
|
1335
|
+
new_options = opts.merge(
|
1336
|
+
:operation => :"TasksApi.post_tasks_id_runs",
|
1337
|
+
:header_params => header_params,
|
1338
|
+
:query_params => query_params,
|
1339
|
+
:form_params => form_params,
|
1340
|
+
:body => post_body,
|
1341
|
+
:auth_names => auth_names,
|
1342
|
+
:return_type => return_type
|
1343
|
+
)
|
1344
|
+
|
1345
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
1346
|
+
return data, status_code, headers
|
1347
|
+
end
|
1348
|
+
|
1349
|
+
# Retry a task run
|
1350
|
+
# Queues a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) run to retry and then returns the scheduled run. To manually start a _new_ task run, use the [`POST /api/v2/tasks/{taskID}/runs` endpoint](#operation/PostTasksIDRuns). #### Limitations - Queuing a task run requires that the task's `status` property be set to `active`.
|
1351
|
+
# @param task_id [String] A task ID. Specifies the [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) that the task run belongs to.
|
1352
|
+
# @param run_id [String] A task run ID. Specifies the task run to retry. To find a task run ID, use the [`GET /api/v2/tasks/{taskID}/runs` endpoint](#operation/GetTasksIDRuns) to list task runs.
|
1353
|
+
# @param [Hash] opts the optional parameters
|
1354
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
1355
|
+
# @option opts [Object] :body
|
1356
|
+
# @return [Run]
|
1357
|
+
def post_tasks_id_runs_id_retry(task_id, run_id, opts = {})
|
1358
|
+
data, _status_code, _headers = post_tasks_id_runs_id_retry_with_http_info(task_id, run_id, opts)
|
1359
|
+
data
|
1360
|
+
end
|
1361
|
+
|
1362
|
+
# Retry a task run
|
1363
|
+
# Queues a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) run to retry and then returns the scheduled run. To manually start a _new_ task run, use the [`POST /api/v2/tasks/{taskID}/runs` endpoint](#operation/PostTasksIDRuns). #### Limitations - Queuing a task run requires that the task's `status` property be set to `active`.
|
1364
|
+
# @param task_id [String] A task ID. Specifies the [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) that the task run belongs to.
|
1365
|
+
# @param run_id [String] A task run ID. Specifies the task run to retry. To find a task run ID, use the [`GET /api/v2/tasks/{taskID}/runs` endpoint](#operation/GetTasksIDRuns) to list task runs.
|
1366
|
+
# @param [Hash] opts the optional parameters
|
1367
|
+
# @option opts [String] :zap_trace_span OpenTracing span context
|
1368
|
+
# @option opts [Object] :body
|
1369
|
+
# @return [Array<(Run, Integer, Hash)>] Run data, response status code and response headers
|
1370
|
+
def post_tasks_id_runs_id_retry_with_http_info(task_id, run_id, opts = {})
|
1371
|
+
# verify the required parameter 'task_id' is set
|
1372
|
+
if @api_client.config.client_side_validation && task_id.nil?
|
1373
|
+
fail ArgumentError, "Missing the required parameter 'task_id' when calling TasksApi.post_tasks_id_runs_id_retry"
|
1374
|
+
end
|
1375
|
+
# verify the required parameter 'run_id' is set
|
1376
|
+
if @api_client.config.client_side_validation && run_id.nil?
|
1377
|
+
fail ArgumentError, "Missing the required parameter 'run_id' when calling TasksApi.post_tasks_id_runs_id_retry"
|
1378
|
+
end
|
1379
|
+
# resource path
|
1380
|
+
local_var_path = '/tasks/{taskID}/runs/{runID}/retry'.sub('{' + 'taskID' + '}', CGI.escape(task_id.to_s)).sub('{' + 'runID' + '}', CGI.escape(run_id.to_s))
|
1381
|
+
|
1382
|
+
# query parameters
|
1383
|
+
query_params = opts[:query_params] || {}
|
1384
|
+
|
1385
|
+
# header parameters
|
1386
|
+
header_params = opts[:header_params] || {}
|
1387
|
+
# HTTP header 'Accept' (if needed)
|
1388
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1389
|
+
# HTTP header 'Content-Type'
|
1390
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8'])
|
1391
|
+
header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
|
1392
|
+
|
1393
|
+
# form parameters
|
1394
|
+
form_params = opts[:form_params] || {}
|
1395
|
+
|
1396
|
+
# http body (model)
|
1397
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
|
1398
|
+
|
1399
|
+
# return_type
|
1400
|
+
return_type = opts[:debug_return_type] || 'Run'
|
1401
|
+
|
1402
|
+
# auth_names
|
1403
|
+
auth_names = opts[:debug_auth_names] || ['header']
|
1404
|
+
|
1405
|
+
new_options = opts.merge(
|
1406
|
+
:operation => :"TasksApi.post_tasks_id_runs_id_retry",
|
1407
|
+
:header_params => header_params,
|
1408
|
+
:query_params => query_params,
|
1409
|
+
:form_params => form_params,
|
1410
|
+
:body => post_body,
|
1411
|
+
:auth_names => auth_names,
|
1412
|
+
:return_type => return_type
|
1413
|
+
)
|
1414
|
+
|
1415
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
1416
|
+
return data, status_code, headers
|
1417
|
+
end
|
1418
|
+
end
|
1419
|
+
end
|