Class: DatadogAPIClient::V2::DEMAPI

Inherits:
Object
  • Object
show all
Defined in:
lib/datadog_api_client/v2/api/dem_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = DatadogAPIClient::APIClient.default) ⇒ DEMAPI

Returns a new instance of DEMAPI.



22
23
24
# File 'lib/datadog_api_client/v2/api/dem_api.rb', line 22

def initialize(api_client = DatadogAPIClient::APIClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



20
21
22
# File 'lib/datadog_api_client/v2/api/dem_api.rb', line 20

def api_client
  @api_client
end

Instance Method Details

#batch_get_journeys_by_test_suite_i_ds(body, opts = {}) ⇒ Object

Batch get DEM journeys by test suite IDs.



29
30
31
32
# File 'lib/datadog_api_client/v2/api/dem_api.rb', line 29

def batch_get_journeys_by_test_suite_i_ds(body, opts = {})
  data, _status_code, _headers = batch_get_journeys_by_test_suite_i_ds_with_http_info(body, opts)
  data
end

#batch_get_journeys_by_test_suite_i_ds_with_http_info(body, opts = {}) ⇒ Array<(DemJourneysListResponse, Integer, Hash)>

Batch get DEM journeys by test suite IDs.

Return DEM journeys associated with multiple given test suite IDs.

Parameters:

Returns:

  • (Array<(DemJourneysListResponse, Integer, Hash)>)

    DemJourneysListResponse data, response status code and response headers



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
# File 'lib/datadog_api_client/v2/api/dem_api.rb', line 41

def batch_get_journeys_by_test_suite_i_ds_with_http_info(body, opts = {})

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DEMAPI.batch_get_journeys_by_test_suite_i_ds ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling DEMAPI.batch_get_journeys_by_test_suite_i_ds"
  end
  # resource path
  local_var_path = '/api/v2/dem/journeys/suites/batch'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'DemJourneysListResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :batch_get_journeys_by_test_suite_i_ds,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type,
    :api_version => "V2"
  )

  data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DEMAPI#batch_get_journeys_by_test_suite_i_ds\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_journey(body, opts = {}) ⇒ Object

Create a DEM journey.



96
97
98
99
# File 'lib/datadog_api_client/v2/api/dem_api.rb', line 96

def create_journey(body, opts = {})
  data, _status_code, _headers = create_journey_with_http_info(body, opts)
  data
end

#create_journey_variant(journey_id, body, opts = {}) ⇒ Object

Create a DEM journey variant.



163
164
165
166
# File 'lib/datadog_api_client/v2/api/dem_api.rb', line 163

def create_journey_variant(journey_id, body, opts = {})
  data, _status_code, _headers = create_journey_variant_with_http_info(journey_id, body, opts)
  data
end

#create_journey_variant_with_http_info(journey_id, body, opts = {}) ⇒ Array<(DemVariantResponse, Integer, Hash)>

Create a DEM journey variant.

Create a variant for a DEM journey.

Parameters:

  • journey_id (String)

    The unique identifier of the journey that owns the variant.

  • body (DemVariantRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(DemVariantResponse, Integer, Hash)>)

    DemVariantResponse data, response status code and response headers



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
# File 'lib/datadog_api_client/v2/api/dem_api.rb', line 176

def create_journey_variant_with_http_info(journey_id, body, opts = {})

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DEMAPI.create_journey_variant ...'
  end
  # verify the required parameter 'journey_id' is set
  if @api_client.config.client_side_validation && journey_id.nil?
    fail ArgumentError, "Missing the required parameter 'journey_id' when calling DEMAPI.create_journey_variant"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling DEMAPI.create_journey_variant"
  end
  # resource path
  local_var_path = '/api/v2/dem/journeys/{journey_id}/variants'.sub('{journey_id}', CGI.escape(journey_id.to_s).gsub('%2F', '/'))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'DemVariantResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :create_journey_variant,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type,
    :api_version => "V2"
  )

  data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DEMAPI#create_journey_variant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_journey_with_http_info(body, opts = {}) ⇒ Array<(DemJourneyResponse, Integer, Hash)>

Create a DEM journey.

Create a DEM journey.

Parameters:

Returns:

  • (Array<(DemJourneyResponse, Integer, Hash)>)

    DemJourneyResponse data, response status code and response headers



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
# File 'lib/datadog_api_client/v2/api/dem_api.rb', line 108

def create_journey_with_http_info(body, opts = {})

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DEMAPI.create_journey ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling DEMAPI.create_journey"
  end
  # resource path
  local_var_path = '/api/v2/dem/journeys'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'DemJourneyResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :create_journey,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type,
    :api_version => "V2"
  )

  data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DEMAPI#create_journey\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_test_suite_for_journey(public_journey_id, body, opts = {}) ⇒ Object

Create a test suite for a DEM journey.



235
236
237
238
# File 'lib/datadog_api_client/v2/api/dem_api.rb', line 235

def create_test_suite_for_journey(public_journey_id, body, opts = {})
  data, _status_code, _headers = create_test_suite_for_journey_with_http_info(public_journey_id, body, opts)
  data
end

#create_test_suite_for_journey_with_http_info(public_journey_id, body, opts = {}) ⇒ Array<(DemJourneyTestSuiteResponse, Integer, Hash)>

Create a test suite for a DEM journey.

Trigger test suite creation for a given DEM journey.

Parameters:

  • public_journey_id (String)

    The public identifier of the DEM journey for which to create a test suite.

  • body (DemCreateJourneyTestSuiteRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(DemJourneyTestSuiteResponse, Integer, Hash)>)

    DemJourneyTestSuiteResponse data, response status code and response headers



248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
# File 'lib/datadog_api_client/v2/api/dem_api.rb', line 248

def create_test_suite_for_journey_with_http_info(public_journey_id, body, opts = {})

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DEMAPI.create_test_suite_for_journey ...'
  end
  # verify the required parameter 'public_journey_id' is set
  if @api_client.config.client_side_validation && public_journey_id.nil?
    fail ArgumentError, "Missing the required parameter 'public_journey_id' when calling DEMAPI.create_test_suite_for_journey"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling DEMAPI.create_test_suite_for_journey"
  end
  # resource path
  local_var_path = '/api/v2/dem/journeys/{public_journey_id}/suite'.sub('{public_journey_id}', CGI.escape(public_journey_id.to_s).gsub('%2F', '/'))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'DemJourneyTestSuiteResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :create_test_suite_for_journey,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type,
    :api_version => "V2"
  )

  data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DEMAPI#create_test_suite_for_journey\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_ignored_inferred_journey(journey_id, opts = {}) ⇒ Object

Delete an ignored inferred DEM journey.



307
308
309
310
# File 'lib/datadog_api_client/v2/api/dem_api.rb', line 307

def delete_ignored_inferred_journey(journey_id, opts = {})
  delete_ignored_inferred_journey_with_http_info(journey_id, opts)
  nil
end

#delete_ignored_inferred_journey_with_http_info(journey_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete an ignored inferred DEM journey.

Remove an ignored inferred DEM journey, making it eligible to appear as a candidate again.

Parameters:

  • journey_id (String)

    The unique identifier of the ignored inferred journey to delete.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
# File 'lib/datadog_api_client/v2/api/dem_api.rb', line 319

def delete_ignored_inferred_journey_with_http_info(journey_id, opts = {})

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DEMAPI.delete_ignored_inferred_journey ...'
  end
  # verify the required parameter 'journey_id' is set
  if @api_client.config.client_side_validation && journey_id.nil?
    fail ArgumentError, "Missing the required parameter 'journey_id' when calling DEMAPI.delete_ignored_inferred_journey"
  end
  # resource path
  local_var_path = '/api/v2/dem/journeys/inferred/ignored/{journey_id}'.sub('{journey_id}', CGI.escape(journey_id.to_s).gsub('%2F', '/'))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :delete_ignored_inferred_journey,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type,
    :api_version => "V2"
  )

  data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DEMAPI#delete_ignored_inferred_journey\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_journey(journey_id, opts = {}) ⇒ Object

Delete a DEM journey.



372
373
374
375
# File 'lib/datadog_api_client/v2/api/dem_api.rb', line 372

def delete_journey(journey_id, opts = {})
  delete_journey_with_http_info(journey_id, opts)
  nil
end

#delete_journey_variant(variant_id, opts = {}) ⇒ Object

Delete a DEM journey variant.



437
438
439
440
# File 'lib/datadog_api_client/v2/api/dem_api.rb', line 437

def delete_journey_variant(variant_id, opts = {})
  delete_journey_variant_with_http_info(variant_id, opts)
  nil
end

#delete_journey_variant_with_http_info(variant_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete a DEM journey variant.

Delete a variant from a DEM journey.

Parameters:

  • variant_id (String)

    The unique identifier of the variant to delete.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
# File 'lib/datadog_api_client/v2/api/dem_api.rb', line 449

def delete_journey_variant_with_http_info(variant_id, opts = {})

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DEMAPI.delete_journey_variant ...'
  end
  # verify the required parameter 'variant_id' is set
  if @api_client.config.client_side_validation && variant_id.nil?
    fail ArgumentError, "Missing the required parameter 'variant_id' when calling DEMAPI.delete_journey_variant"
  end
  # resource path
  local_var_path = '/api/v2/dem/journeys/variants/{variant_id}'.sub('{variant_id}', CGI.escape(variant_id.to_s).gsub('%2F', '/'))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :delete_journey_variant,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type,
    :api_version => "V2"
  )

  data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DEMAPI#delete_journey_variant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_journey_with_http_info(journey_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete a DEM journey.

Delete a DEM journey by its ID.

Parameters:

  • journey_id (String)

    The unique identifier of the DEM journey to delete.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
# File 'lib/datadog_api_client/v2/api/dem_api.rb', line 384

def delete_journey_with_http_info(journey_id, opts = {})

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DEMAPI.delete_journey ...'
  end
  # verify the required parameter 'journey_id' is set
  if @api_client.config.client_side_validation && journey_id.nil?
    fail ArgumentError, "Missing the required parameter 'journey_id' when calling DEMAPI.delete_journey"
  end
  # resource path
  local_var_path = '/api/v2/dem/journeys/{journey_id}'.sub('{journey_id}', CGI.escape(journey_id.to_s).gsub('%2F', '/'))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :delete_journey,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type,
    :api_version => "V2"
  )

  data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DEMAPI#delete_journey\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_journey(journey_id, opts = {}) ⇒ Object

Get a DEM journey.



502
503
504
505
# File 'lib/datadog_api_client/v2/api/dem_api.rb', line 502

def get_journey(journey_id, opts = {})
  data, _status_code, _headers = get_journey_with_http_info(journey_id, opts)
  data
end

Get recommended tests for a DEM journey.



567
568
569
570
# File 'lib/datadog_api_client/v2/api/dem_api.rb', line 567

def get_journey_recommended_tests(journey_id, opts = {})
  data, _status_code, _headers = get_journey_recommended_tests_with_http_info(journey_id, opts)
  data
end

Get recommended tests for a DEM journey.

Retrieve AI-recommended synthetic tests for a DEM journey. Returns an empty list when no recommendation is available.

Parameters:

  • journey_id (String)

    The unique identifier of the journey.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(DemRecommendedTestsResponse, Integer, Hash)>)

    DemRecommendedTestsResponse data, response status code and response headers



579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
# File 'lib/datadog_api_client/v2/api/dem_api.rb', line 579

def get_journey_recommended_tests_with_http_info(journey_id, opts = {})

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DEMAPI.get_journey_recommended_tests ...'
  end
  # verify the required parameter 'journey_id' is set
  if @api_client.config.client_side_validation && journey_id.nil?
    fail ArgumentError, "Missing the required parameter 'journey_id' when calling DEMAPI.get_journey_recommended_tests"
  end
  # resource path
  local_var_path = '/api/v2/dem/journeys/{journey_id}/recommended-tests'.sub('{journey_id}', CGI.escape(journey_id.to_s).gsub('%2F', '/'))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'DemRecommendedTestsResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :get_journey_recommended_tests,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type,
    :api_version => "V2"
  )

  data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DEMAPI#get_journey_recommended_tests\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_journey_with_http_info(journey_id, opts = {}) ⇒ Array<(DemJourneyResponse, Integer, Hash)>

Get a DEM journey.

Retrieve a single DEM journey by its ID.

Parameters:

  • journey_id (String)

    The unique identifier of the DEM journey.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(DemJourneyResponse, Integer, Hash)>)

    DemJourneyResponse data, response status code and response headers



514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
# File 'lib/datadog_api_client/v2/api/dem_api.rb', line 514

def get_journey_with_http_info(journey_id, opts = {})

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DEMAPI.get_journey ...'
  end
  # verify the required parameter 'journey_id' is set
  if @api_client.config.client_side_validation && journey_id.nil?
    fail ArgumentError, "Missing the required parameter 'journey_id' when calling DEMAPI.get_journey"
  end
  # resource path
  local_var_path = '/api/v2/dem/journeys/{journey_id}'.sub('{journey_id}', CGI.escape(journey_id.to_s).gsub('%2F', '/'))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'DemJourneyResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :get_journey,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type,
    :api_version => "V2"
  )

  data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DEMAPI#get_journey\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#ignore_inferred_journey(journey_id, opts = {}) ⇒ Object

Ignore an inferred DEM journey.



632
633
634
635
# File 'lib/datadog_api_client/v2/api/dem_api.rb', line 632

def ignore_inferred_journey(journey_id, opts = {})
  ignore_inferred_journey_with_http_info(journey_id, opts)
  nil
end

#ignore_inferred_journey_with_http_info(journey_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Ignore an inferred DEM journey.

Mark an inferred DEM journey as ignored so it no longer appears in the candidate list.

Parameters:

  • journey_id (String)

    The unique identifier of the inferred journey to ignore.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
# File 'lib/datadog_api_client/v2/api/dem_api.rb', line 644

def ignore_inferred_journey_with_http_info(journey_id, opts = {})

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DEMAPI.ignore_inferred_journey ...'
  end
  # verify the required parameter 'journey_id' is set
  if @api_client.config.client_side_validation && journey_id.nil?
    fail ArgumentError, "Missing the required parameter 'journey_id' when calling DEMAPI.ignore_inferred_journey"
  end
  # resource path
  local_var_path = '/api/v2/dem/journeys/inferred/{journey_id}/ignore'.sub('{journey_id}', CGI.escape(journey_id.to_s).gsub('%2F', '/'))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :ignore_inferred_journey,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type,
    :api_version => "V2"
  )

  data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DEMAPI#ignore_inferred_journey\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#search_inferred_journeys(opts = {}) ⇒ Object

Search inferred DEM journeys.



697
698
699
700
# File 'lib/datadog_api_client/v2/api/dem_api.rb', line 697

def search_inferred_journeys(opts = {})
  data, _status_code, _headers = search_inferred_journeys_with_http_info(opts)
  data
end

#search_inferred_journeys_with_http_info(opts = {}) ⇒ Array<(DemSearchInferredJourneysResponse, Integer, Hash)>

Search inferred DEM journeys.

Search for inferred DEM journeys by status. Returns candidates (status=candidate, the default) or ignored journeys (status=ignored). Supports optional fuzzy name filtering and app ID filtering.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :status (DemInferredJourneyStatus)

    Filter by inferred journey status. Use candidate (default) to retrieve journeys suggested for promotion, or ignored to retrieve journeys that have been dismissed.

  • :q (String)

    Fuzzy search query to filter inferred journeys by name.

  • :app_id (String)

    Filter inferred journeys by application ID.

Returns:



711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
# File 'lib/datadog_api_client/v2/api/dem_api.rb', line 711

def search_inferred_journeys_with_http_info(opts = {})

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DEMAPI.search_inferred_journeys ...'
  end
  allowable_values = ['candidate', 'ignored']
  if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
    fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/api/v2/dem/journeys/inferred/search'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
  query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
  query_params[:'app_id'] = opts[:'app_id'] if !opts[:'app_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'DemSearchInferredJourneysResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :search_inferred_journeys,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type,
    :api_version => "V2"
  )

  data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DEMAPI#search_inferred_journeys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#search_journeys(opts = {}) ⇒ Object

Search DEM journeys.



767
768
769
770
# File 'lib/datadog_api_client/v2/api/dem_api.rb', line 767

def search_journeys(opts = {})
  data, _status_code, _headers = search_journeys_with_http_info(opts)
  data
end

#search_journeys_with_http_info(opts = {}) ⇒ Array<(DemJourneysListResponse, Integer, Hash)>

Search DEM journeys.

Search for DEM journeys with optional filtering by query, creator, team, and app.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :query (String)

    A search query string to filter journeys by name.

  • :page_offset (Integer)

    The offset for pagination.

  • :page_limit (Integer)

    The maximum number of results to return.

  • :creator (String)

    Filter journeys by creator handle.

  • :team (String)

    Filter journeys by team tag.

  • :app_id (String)

    Filter journeys by application ID.

Returns:

  • (Array<(DemJourneysListResponse, Integer, Hash)>)

    DemJourneysListResponse data, response status code and response headers



784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
# File 'lib/datadog_api_client/v2/api/dem_api.rb', line 784

def search_journeys_with_http_info(opts = {})

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DEMAPI.search_journeys ...'
  end
  # resource path
  local_var_path = '/api/v2/dem/journeys/search'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
  query_params[:'page[offset]'] = opts[:'page_offset'] if !opts[:'page_offset'].nil?
  query_params[:'page[limit]'] = opts[:'page_limit'] if !opts[:'page_limit'].nil?
  query_params[:'creator'] = opts[:'creator'] if !opts[:'creator'].nil?
  query_params[:'team'] = opts[:'team'] if !opts[:'team'].nil?
  query_params[:'app_id'] = opts[:'app_id'] if !opts[:'app_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'DemJourneysListResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :search_journeys,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type,
    :api_version => "V2"
  )

  data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DEMAPI#search_journeys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_journey(journey_id, body, opts = {}) ⇒ Object

Update a DEM journey.



839
840
841
842
# File 'lib/datadog_api_client/v2/api/dem_api.rb', line 839

def update_journey(journey_id, body, opts = {})
  data, _status_code, _headers = update_journey_with_http_info(journey_id, body, opts)
  data
end

#update_journey_variant(variant_id, body, opts = {}) ⇒ Object

Update a DEM journey variant.



911
912
913
914
# File 'lib/datadog_api_client/v2/api/dem_api.rb', line 911

def update_journey_variant(variant_id, body, opts = {})
  data, _status_code, _headers = update_journey_variant_with_http_info(variant_id, body, opts)
  data
end

#update_journey_variant_with_http_info(variant_id, body, opts = {}) ⇒ Array<(DemVariantResponse, Integer, Hash)>

Update a DEM journey variant.

Update an existing variant of a DEM journey.

Parameters:

  • variant_id (String)

    The unique identifier of the variant to update.

  • body (DemVariantRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(DemVariantResponse, Integer, Hash)>)

    DemVariantResponse data, response status code and response headers



924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
# File 'lib/datadog_api_client/v2/api/dem_api.rb', line 924

def update_journey_variant_with_http_info(variant_id, body, opts = {})

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DEMAPI.update_journey_variant ...'
  end
  # verify the required parameter 'variant_id' is set
  if @api_client.config.client_side_validation && variant_id.nil?
    fail ArgumentError, "Missing the required parameter 'variant_id' when calling DEMAPI.update_journey_variant"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling DEMAPI.update_journey_variant"
  end
  # resource path
  local_var_path = '/api/v2/dem/journeys/variants/{variant_id}'.sub('{variant_id}', CGI.escape(variant_id.to_s).gsub('%2F', '/'))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'DemVariantResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :update_journey_variant,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type,
    :api_version => "V2"
  )

  data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DEMAPI#update_journey_variant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_journey_with_http_info(journey_id, body, opts = {}) ⇒ Array<(DemJourneyResponse, Integer, Hash)>

Update a DEM journey.

Update an existing DEM journey by its ID.

Parameters:

  • journey_id (String)

    The unique identifier of the DEM journey to update.

  • body (DemJourneyCreateRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(DemJourneyResponse, Integer, Hash)>)

    DemJourneyResponse data, response status code and response headers



852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
# File 'lib/datadog_api_client/v2/api/dem_api.rb', line 852

def update_journey_with_http_info(journey_id, body, opts = {})

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DEMAPI.update_journey ...'
  end
  # verify the required parameter 'journey_id' is set
  if @api_client.config.client_side_validation && journey_id.nil?
    fail ArgumentError, "Missing the required parameter 'journey_id' when calling DEMAPI.update_journey"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling DEMAPI.update_journey"
  end
  # resource path
  local_var_path = '/api/v2/dem/journeys/{journey_id}'.sub('{journey_id}', CGI.escape(journey_id.to_s).gsub('%2F', '/'))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'DemJourneyResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

  new_options = opts.merge(
    :operation => :update_journey,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type,
    :api_version => "V2"
  )

  data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DEMAPI#update_journey\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end