Class: DatadogAPIClient::V2::ModelLabAPIAPI

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of ModelLabAPIAPI.



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

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

Instance Attribute Details

#api_client ⇒ Object

Returns the value of attribute api_client.



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

def api_client
  @api_client
end

Instance Method Details

#add_model_lab_project_owner(project_id, user_id, opts = {}) ⇒ Object

Add an owner to a Model Lab project.



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

def add_model_lab_project_owner(project_id, user_id, opts = {})
  add_model_lab_project_owner_with_http_info(project_id, user_id, opts)
  nil
end

#add_model_lab_project_owner_with_http_info(project_id, user_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Add an owner to a Model Lab project.

Add a user as an owner of a Model Lab project. The user must belong to the project's organization. The project's creator is always an owner, so adding the creator, or a user who is already an owner, has no effect. A project can have at most 50 owners besides its creator.

Parameters:

  • project_id (Integer) —

    The ID of the Model Lab project.

  • user_id (UUID) —

    The UUID of the user.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# File 'lib/datadog_api_client/v2/api/model_lab_api_api.rb', line 45

def add_model_lab_project_owner_with_http_info(project_id, user_id, opts = {})
  unstable_enabled = @api_client.config.unstable_operations["v2.add_model_lab_project_owner".to_sym]
  if unstable_enabled
    @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.add_model_lab_project_owner")
  else
    raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.add_model_lab_project_owner"))
  end

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ModelLabAPIAPI.add_model_lab_project_owner ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ModelLabAPIAPI.add_model_lab_project_owner"
  end
  # verify the required parameter 'user_id' is set
  if @api_client.config.client_side_validation && user_id.nil?
    fail ArgumentError, "Missing the required parameter 'user_id' when calling ModelLabAPIAPI.add_model_lab_project_owner"
  end
  # resource path
  local_var_path = '/api/v2/model-lab-api/projects/{project_id}/owners/{user_id}'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')).sub('{user_id}', CGI.escape(user_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, :AuthZ]

  new_options = opts.merge(
    :operation => :add_model_lab_project_owner,
    :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: ModelLabAPIAPI#add_model_lab_project_owner\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_model_lab_run(run_id, opts = {}) ⇒ Object

Delete a Model Lab run.



108
109
110
111
# File 'lib/datadog_api_client/v2/api/model_lab_api_api.rb', line 108

def delete_model_lab_run(run_id, opts = {})
  delete_model_lab_run_with_http_info(run_id, opts)
  nil
end

#delete_model_lab_run_with_http_info(run_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete a Model Lab run.

Delete a Model Lab run by its ID.

Parameters:

  • run_id (Integer) —

    The ID of the Model Lab run.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# File 'lib/datadog_api_client/v2/api/model_lab_api_api.rb', line 120

def delete_model_lab_run_with_http_info(run_id, opts = {})
  unstable_enabled = @api_client.config.unstable_operations["v2.delete_model_lab_run".to_sym]
  if unstable_enabled
    @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_model_lab_run")
  else
    raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_model_lab_run"))
  end

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ModelLabAPIAPI.delete_model_lab_run ...'
  end
  # verify the required parameter 'run_id' is set
  if @api_client.config.client_side_validation && run_id.nil?
    fail ArgumentError, "Missing the required parameter 'run_id' when calling ModelLabAPIAPI.delete_model_lab_run"
  end
  # resource path
  local_var_path = '/api/v2/model-lab-api/runs/{run_id}'.sub('{run_id}', CGI.escape(run_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, :AuthZ]

  new_options = opts.merge(
    :operation => :delete_model_lab_run,
    :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: ModelLabAPIAPI#delete_model_lab_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_model_lab_artifact_content(project_id, artifact_path, opts = {}) ⇒ Object

Get Model Lab artifact content.



179
180
181
182
# File 'lib/datadog_api_client/v2/api/model_lab_api_api.rb', line 179

def get_model_lab_artifact_content(project_id, artifact_path, opts = {})
  data, _status_code, _headers = get_model_lab_artifact_content_with_http_info(project_id, artifact_path, opts)
  data
end

#get_model_lab_artifact_content_with_http_info(project_id, artifact_path, opts = {}) ⇒ Array<(File, Integer, Hash)>

Get Model Lab artifact content.

Download the raw content of a Model Lab artifact file.

Parameters:

  • project_id (String) —

    ID of the project.

  • artifact_path (String) —

    Path to the artifact relative to the project directory.

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

    the optional parameters

Returns:

  • (Array<(File, Integer, Hash)>) —

    File data, response status code and response headers



192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
# File 'lib/datadog_api_client/v2/api/model_lab_api_api.rb', line 192

def get_model_lab_artifact_content_with_http_info(project_id, artifact_path, opts = {})
  unstable_enabled = @api_client.config.unstable_operations["v2.get_model_lab_artifact_content".to_sym]
  if unstable_enabled
    @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_model_lab_artifact_content")
  else
    raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_model_lab_artifact_content"))
  end

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ModelLabAPIAPI.get_model_lab_artifact_content ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ModelLabAPIAPI.get_model_lab_artifact_content"
  end
  # verify the required parameter 'artifact_path' is set
  if @api_client.config.client_side_validation && artifact_path.nil?
    fail ArgumentError, "Missing the required parameter 'artifact_path' when calling ModelLabAPIAPI.get_model_lab_artifact_content"
  end
  # resource path
  local_var_path = '/api/v2/model-lab-api/artifacts/content'

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

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream', '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] || 'File'

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

  new_options = opts.merge(
    :operation => :get_model_lab_artifact_content,
    :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: ModelLabAPIAPI#get_model_lab_artifact_content\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_model_lab_project(project_id, opts = {}) ⇒ Object

Get a Model Lab project.



257
258
259
260
# File 'lib/datadog_api_client/v2/api/model_lab_api_api.rb', line 257

def get_model_lab_project(project_id, opts = {})
  data, _status_code, _headers = get_model_lab_project_with_http_info(project_id, opts)
  data
end

#get_model_lab_project_with_http_info(project_id, opts = {}) ⇒ Array<(ModelLabProjectResponse, Integer, Hash)>

Get a Model Lab project.

Get a single Model Lab project by its ID.

Parameters:

  • project_id (Integer) —

    The ID of the Model Lab project.

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

    the optional parameters

Returns:

  • (Array<(ModelLabProjectResponse, Integer, Hash)>) —

    ModelLabProjectResponse data, response status code and response headers



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
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
# File 'lib/datadog_api_client/v2/api/model_lab_api_api.rb', line 269

def get_model_lab_project_with_http_info(project_id, opts = {})
  unstable_enabled = @api_client.config.unstable_operations["v2.get_model_lab_project".to_sym]
  if unstable_enabled
    @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_model_lab_project")
  else
    raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_model_lab_project"))
  end

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ModelLabAPIAPI.get_model_lab_project ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ModelLabAPIAPI.get_model_lab_project"
  end
  # resource path
  local_var_path = '/api/v2/model-lab-api/projects/{project_id}'.sub('{project_id}', CGI.escape(project_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] || 'ModelLabProjectResponse'

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

  new_options = opts.merge(
    :operation => :get_model_lab_project,
    :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: ModelLabAPIAPI#get_model_lab_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_model_lab_run(run_id, opts = {}) ⇒ Object

Get a Model Lab run.



328
329
330
331
# File 'lib/datadog_api_client/v2/api/model_lab_api_api.rb', line 328

def get_model_lab_run(run_id, opts = {})
  data, _status_code, _headers = get_model_lab_run_with_http_info(run_id, opts)
  data
end

#get_model_lab_run_with_http_info(run_id, opts = {}) ⇒ Array<(ModelLabRunResponse, Integer, Hash)>

Get a Model Lab run.

Get a single Model Lab run by its ID.

Parameters:

  • run_id (Integer) —

    The ID of the Model Lab run.

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

    the optional parameters

Returns:

  • (Array<(ModelLabRunResponse, Integer, Hash)>) —

    ModelLabRunResponse data, response status code and response headers



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
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
# File 'lib/datadog_api_client/v2/api/model_lab_api_api.rb', line 340

def get_model_lab_run_with_http_info(run_id, opts = {})
  unstable_enabled = @api_client.config.unstable_operations["v2.get_model_lab_run".to_sym]
  if unstable_enabled
    @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_model_lab_run")
  else
    raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_model_lab_run"))
  end

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ModelLabAPIAPI.get_model_lab_run ...'
  end
  # verify the required parameter 'run_id' is set
  if @api_client.config.client_side_validation && run_id.nil?
    fail ArgumentError, "Missing the required parameter 'run_id' when calling ModelLabAPIAPI.get_model_lab_run"
  end
  # resource path
  local_var_path = '/api/v2/model-lab-api/runs/{run_id}'.sub('{run_id}', CGI.escape(run_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] || 'ModelLabRunResponse'

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

  new_options = opts.merge(
    :operation => :get_model_lab_run,
    :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: ModelLabAPIAPI#get_model_lab_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_model_lab_project_artifacts(project_id, opts = {}) ⇒ Object

List Model Lab project artifacts.



399
400
401
402
# File 'lib/datadog_api_client/v2/api/model_lab_api_api.rb', line 399

def list_model_lab_project_artifacts(project_id, opts = {})
  data, _status_code, _headers = list_model_lab_project_artifacts_with_http_info(project_id, opts)
  data
end

#list_model_lab_project_artifacts_with_http_info(project_id, opts = {}) ⇒ Array<(ModelLabProjectArtifactsResponse, Integer, Hash)>

List Model Lab project artifacts.

List all artifact files for a specific Model Lab project.

Parameters:

  • project_id (Integer) —

    The ID of the Model Lab project.

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

    the optional parameters

Returns:



411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
# File 'lib/datadog_api_client/v2/api/model_lab_api_api.rb', line 411

def list_model_lab_project_artifacts_with_http_info(project_id, opts = {})
  unstable_enabled = @api_client.config.unstable_operations["v2.list_model_lab_project_artifacts".to_sym]
  if unstable_enabled
    @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_model_lab_project_artifacts")
  else
    raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_model_lab_project_artifacts"))
  end

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ModelLabAPIAPI.list_model_lab_project_artifacts ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ModelLabAPIAPI.list_model_lab_project_artifacts"
  end
  # resource path
  local_var_path = '/api/v2/model-lab-api/projects/{project_id}/artifacts'.sub('{project_id}', CGI.escape(project_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] || 'ModelLabProjectArtifactsResponse'

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

  new_options = opts.merge(
    :operation => :list_model_lab_project_artifacts,
    :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: ModelLabAPIAPI#list_model_lab_project_artifacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_model_lab_project_facet_keys(opts = {}) ⇒ Object

List Model Lab project facet keys.



470
471
472
473
# File 'lib/datadog_api_client/v2/api/model_lab_api_api.rb', line 470

def list_model_lab_project_facet_keys(opts = {})
  data, _status_code, _headers = list_model_lab_project_facet_keys_with_http_info(opts)
  data
end

#list_model_lab_project_facet_keys_with_http_info(opts = {}) ⇒ Array<(ModelLabFacetKeysResponse, Integer, Hash)>

List Model Lab project facet keys.

List all available facet keys for filtering Model Lab projects.

Parameters:

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

    the optional parameters

Returns:

  • (Array<(ModelLabFacetKeysResponse, Integer, Hash)>) —

    ModelLabFacetKeysResponse data, response status code and response headers



481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
# File 'lib/datadog_api_client/v2/api/model_lab_api_api.rb', line 481

def list_model_lab_project_facet_keys_with_http_info(opts = {})
  unstable_enabled = @api_client.config.unstable_operations["v2.list_model_lab_project_facet_keys".to_sym]
  if unstable_enabled
    @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_model_lab_project_facet_keys")
  else
    raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_model_lab_project_facet_keys"))
  end

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ModelLabAPIAPI.list_model_lab_project_facet_keys ...'
  end
  # resource path
  local_var_path = '/api/v2/model-lab-api/project-facet-keys'

  # 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] || 'ModelLabFacetKeysResponse'

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

  new_options = opts.merge(
    :operation => :list_model_lab_project_facet_keys,
    :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: ModelLabAPIAPI#list_model_lab_project_facet_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_model_lab_project_facet_values(facet_type, facet_name, opts = {}) ⇒ Object

List Model Lab project facet values.



536
537
538
539
# File 'lib/datadog_api_client/v2/api/model_lab_api_api.rb', line 536

def list_model_lab_project_facet_values(facet_type, facet_name, opts = {})
  data, _status_code, _headers = list_model_lab_project_facet_values_with_http_info(facet_type, facet_name, opts)
  data
end

#list_model_lab_project_facet_values_with_http_info(facet_type, facet_name, opts = {}) ⇒ Array<(ModelLabFacetValuesResponse, Integer, Hash)>

List Model Lab project facet values.

List available facet values for a specific project facet key.

Parameters:

  • facet_type (ModelLabProjectFacetType) —

    Facet type. Valid values: tag.

  • facet_name (String) —

    Facet name.

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

    the optional parameters

Returns:

  • (Array<(ModelLabFacetValuesResponse, Integer, Hash)>) —

    ModelLabFacetValuesResponse data, response status code and response headers



549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
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
# File 'lib/datadog_api_client/v2/api/model_lab_api_api.rb', line 549

def list_model_lab_project_facet_values_with_http_info(facet_type, facet_name, opts = {})
  unstable_enabled = @api_client.config.unstable_operations["v2.list_model_lab_project_facet_values".to_sym]
  if unstable_enabled
    @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_model_lab_project_facet_values")
  else
    raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_model_lab_project_facet_values"))
  end

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ModelLabAPIAPI.list_model_lab_project_facet_values ...'
  end
  # verify the required parameter 'facet_type' is set
  if @api_client.config.client_side_validation && facet_type.nil?
    fail ArgumentError, "Missing the required parameter 'facet_type' when calling ModelLabAPIAPI.list_model_lab_project_facet_values"
  end
  # verify enum value
  allowable_values = ['tag']
  if @api_client.config.client_side_validation && !allowable_values.include?(facet_type)
    fail ArgumentError, "invalid value for \"facet_type\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'facet_name' is set
  if @api_client.config.client_side_validation && facet_name.nil?
    fail ArgumentError, "Missing the required parameter 'facet_name' when calling ModelLabAPIAPI.list_model_lab_project_facet_values"
  end
  # resource path
  local_var_path = '/api/v2/model-lab-api/project-facet-values'

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

  # 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] || 'ModelLabFacetValuesResponse'

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

  new_options = opts.merge(
    :operation => :list_model_lab_project_facet_values,
    :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: ModelLabAPIAPI#list_model_lab_project_facet_values\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_model_lab_projects(opts = {}) ⇒ Object

List Model Lab projects.



619
620
621
622
# File 'lib/datadog_api_client/v2/api/model_lab_api_api.rb', line 619

def list_model_lab_projects(opts = {})
  data, _status_code, _headers = list_model_lab_projects_with_http_info(opts)
  data
end

#list_model_lab_projects_with_http_info(opts = {}) ⇒ Array<(ModelLabProjectsResponse, Integer, Hash)>

List Model Lab projects.

List all Model Lab projects for the current organization.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String) —

    Text search filter for project name or description.

  • :filter_owner_id (UUID) —

    Filter by owner UUID. Matches projects the user created and projects the user was added to as an owner.

  • :filter_tags (String) —

    Filter by tags. Format: key:value,key2:value2.

  • :sort (String) —

    Sort field. Valid values: name, created_at, updated_at. Prefix with '-' for descending order (e.g., -updated_at).

  • :page_size (Integer) —

    Number of items per page. Maximum is 100.

  • :page_number (Integer) —

    Page number (1-indexed).

Returns:

  • (Array<(ModelLabProjectsResponse, Integer, Hash)>) —

    ModelLabProjectsResponse data, response status code and response headers



636
637
638
639
640
641
642
643
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
693
694
695
# File 'lib/datadog_api_client/v2/api/model_lab_api_api.rb', line 636

def list_model_lab_projects_with_http_info(opts = {})
  unstable_enabled = @api_client.config.unstable_operations["v2.list_model_lab_projects".to_sym]
  if unstable_enabled
    @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_model_lab_projects")
  else
    raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_model_lab_projects"))
  end

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ModelLabAPIAPI.list_model_lab_projects ...'
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ModelLabAPIAPI.list_model_lab_projects, must be smaller than or equal to 100.'
  end
  # resource path
  local_var_path = '/api/v2/model-lab-api/projects'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  query_params[:'filter[owner_id]'] = opts[:'filter_owner_id'] if !opts[:'filter_owner_id'].nil?
  query_params[:'filter[tags]'] = opts[:'filter_tags'] if !opts[:'filter_tags'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].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] || 'ModelLabProjectsResponse'

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

  new_options = opts.merge(
    :operation => :list_model_lab_projects,
    :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: ModelLabAPIAPI#list_model_lab_projects\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_model_lab_run_artifacts(run_id, opts = {}) ⇒ Object

List Model Lab run artifacts.



700
701
702
703
# File 'lib/datadog_api_client/v2/api/model_lab_api_api.rb', line 700

def list_model_lab_run_artifacts(run_id, opts = {})
  data, _status_code, _headers = list_model_lab_run_artifacts_with_http_info(run_id, opts)
  data
end

#list_model_lab_run_artifacts_with_http_info(run_id, opts = {}) ⇒ Array<(ModelLabRunArtifactsResponse, Integer, Hash)>

List Model Lab run artifacts.

List artifact files for a specific Model Lab run.

Parameters:

  • run_id (Integer) —

    The ID of the Model Lab run.

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

    the optional parameters

Options Hash (opts):

  • :path (String) —

    Optional subdirectory path within the run's artifacts.

Returns:



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
763
764
765
766
767
768
# File 'lib/datadog_api_client/v2/api/model_lab_api_api.rb', line 713

def list_model_lab_run_artifacts_with_http_info(run_id, opts = {})
  unstable_enabled = @api_client.config.unstable_operations["v2.list_model_lab_run_artifacts".to_sym]
  if unstable_enabled
    @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_model_lab_run_artifacts")
  else
    raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_model_lab_run_artifacts"))
  end

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ModelLabAPIAPI.list_model_lab_run_artifacts ...'
  end
  # verify the required parameter 'run_id' is set
  if @api_client.config.client_side_validation && run_id.nil?
    fail ArgumentError, "Missing the required parameter 'run_id' when calling ModelLabAPIAPI.list_model_lab_run_artifacts"
  end
  # resource path
  local_var_path = '/api/v2/model-lab-api/runs/{run_id}/artifacts'.sub('{run_id}', CGI.escape(run_id.to_s).gsub('%2F', '/'))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'path'] = opts[:'path'] if !opts[:'path'].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] || 'ModelLabRunArtifactsResponse'

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

  new_options = opts.merge(
    :operation => :list_model_lab_run_artifacts,
    :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: ModelLabAPIAPI#list_model_lab_run_artifacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_model_lab_run_facet_keys(filter_project_id, opts = {}) ⇒ Object

List Model Lab run facet keys.



773
774
775
776
# File 'lib/datadog_api_client/v2/api/model_lab_api_api.rb', line 773

def list_model_lab_run_facet_keys(filter_project_id, opts = {})
  data, _status_code, _headers = list_model_lab_run_facet_keys_with_http_info(filter_project_id, opts)
  data
end

#list_model_lab_run_facet_keys_with_http_info(filter_project_id, opts = {}) ⇒ Array<(ModelLabFacetKeysResponse, Integer, Hash)>

List Model Lab run facet keys.

List all available facet keys for filtering Model Lab runs.

Parameters:

  • filter_project_id (Integer) —

    Filter by project ID.

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

    the optional parameters

Returns:

  • (Array<(ModelLabFacetKeysResponse, Integer, Hash)>) —

    ModelLabFacetKeysResponse data, response status code and response headers



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
835
836
837
838
839
840
# File 'lib/datadog_api_client/v2/api/model_lab_api_api.rb', line 785

def list_model_lab_run_facet_keys_with_http_info(filter_project_id, opts = {})
  unstable_enabled = @api_client.config.unstable_operations["v2.list_model_lab_run_facet_keys".to_sym]
  if unstable_enabled
    @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_model_lab_run_facet_keys")
  else
    raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_model_lab_run_facet_keys"))
  end

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ModelLabAPIAPI.list_model_lab_run_facet_keys ...'
  end
  # verify the required parameter 'filter_project_id' is set
  if @api_client.config.client_side_validation && filter_project_id.nil?
    fail ArgumentError, "Missing the required parameter 'filter_project_id' when calling ModelLabAPIAPI.list_model_lab_run_facet_keys"
  end
  # resource path
  local_var_path = '/api/v2/model-lab-api/facet-keys'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter[project_id]'] = filter_project_id

  # 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] || 'ModelLabFacetKeysResponse'

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

  new_options = opts.merge(
    :operation => :list_model_lab_run_facet_keys,
    :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: ModelLabAPIAPI#list_model_lab_run_facet_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_model_lab_run_facet_values(filter_project_id, facet_type, facet_name, opts = {}) ⇒ Object

List Model Lab run facet values.



845
846
847
848
# File 'lib/datadog_api_client/v2/api/model_lab_api_api.rb', line 845

def list_model_lab_run_facet_values(filter_project_id, facet_type, facet_name, opts = {})
  data, _status_code, _headers = list_model_lab_run_facet_values_with_http_info(filter_project_id, facet_type, facet_name, opts)
  data
end

#list_model_lab_run_facet_values_with_http_info(filter_project_id, facet_type, facet_name, opts = {}) ⇒ Array<(ModelLabFacetValuesResponse, Integer, Hash)>

List Model Lab run facet values.

List available facet values for a specific run facet key.

Parameters:

  • filter_project_id (Integer) —

    Filter by project ID.

  • facet_type (ModelLabFacetType) —

    Facet type. Valid values: parameter, attribute, tag, metric.

  • facet_name (String) —

    Facet name.

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

    the optional parameters

Returns:

  • (Array<(ModelLabFacetValuesResponse, Integer, Hash)>) —

    ModelLabFacetValuesResponse data, response status code and response headers



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
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
# File 'lib/datadog_api_client/v2/api/model_lab_api_api.rb', line 859

def list_model_lab_run_facet_values_with_http_info(filter_project_id, facet_type, facet_name, opts = {})
  unstable_enabled = @api_client.config.unstable_operations["v2.list_model_lab_run_facet_values".to_sym]
  if unstable_enabled
    @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_model_lab_run_facet_values")
  else
    raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_model_lab_run_facet_values"))
  end

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ModelLabAPIAPI.list_model_lab_run_facet_values ...'
  end
  # verify the required parameter 'filter_project_id' is set
  if @api_client.config.client_side_validation && filter_project_id.nil?
    fail ArgumentError, "Missing the required parameter 'filter_project_id' when calling ModelLabAPIAPI.list_model_lab_run_facet_values"
  end
  # verify the required parameter 'facet_type' is set
  if @api_client.config.client_side_validation && facet_type.nil?
    fail ArgumentError, "Missing the required parameter 'facet_type' when calling ModelLabAPIAPI.list_model_lab_run_facet_values"
  end
  # verify enum value
  allowable_values = ['parameter', 'attribute', 'tag', 'metric']
  if @api_client.config.client_side_validation && !allowable_values.include?(facet_type)
    fail ArgumentError, "invalid value for \"facet_type\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'facet_name' is set
  if @api_client.config.client_side_validation && facet_name.nil?
    fail ArgumentError, "Missing the required parameter 'facet_name' when calling ModelLabAPIAPI.list_model_lab_run_facet_values"
  end
  # resource path
  local_var_path = '/api/v2/model-lab-api/facet-values'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter[project_id]'] = filter_project_id
  query_params[:'facet_type'] = facet_type
  query_params[:'facet_name'] = facet_name

  # 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] || 'ModelLabFacetValuesResponse'

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

  new_options = opts.merge(
    :operation => :list_model_lab_run_facet_values,
    :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: ModelLabAPIAPI#list_model_lab_run_facet_values\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_model_lab_runs(opts = {}) ⇒ Object

List Model Lab runs.



934
935
936
937
# File 'lib/datadog_api_client/v2/api/model_lab_api_api.rb', line 934

def list_model_lab_runs(opts = {})
  data, _status_code, _headers = list_model_lab_runs_with_http_info(opts)
  data
end

#list_model_lab_runs_with_http_info(opts = {}) ⇒ Array<(ModelLabRunsResponse, Integer, Hash)>

List Model Lab runs.

List all Model Lab runs for the current organization.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter_id (String) —

    Filter by run ID(s). Comma-separated list for multiple IDs.

  • :filter (String) —

    Text search filter for run name or description.

  • :filter_owner_id (String) —

    Filter by owner UUID.

  • :filter_status (ModelLabRunStatus) —

    Filter by run status. Valid values: pending, running, completed, failed, killed, unresponsive, paused.

  • :filter_project_id (Integer) —

    Filter by project ID.

  • :filter_tags (String) —

    Filter by tags. Format: key:value,key2:value2.

  • :filter_params (String) —

    Filter by params. Format: key:value,key2:>0.5,key3:true.

  • :filter_parent_run_id (String) —

    Filter by parent run ID. Use 'null' to return only root runs (runs with no parent).

  • :pinned_first (Boolean) —

    Sort pinned runs before non-pinned runs. Pinned runs are ordered by pin time descending.

  • :include_pinned (Boolean) —

    Include all runs pinned by the current user, regardless of other filters.

  • :include_descendant_matches (Boolean) —

    When true, also return runs whose descendants match the active filters. The descendant_match field in each result indicates whether the run was included via a descendant match.

  • :sort (String) —

    Sort field. Valid values: name, created_at, updated_at, duration. Prefix with '-' for descending order (e.g., -updated_at).

  • :page_size (Integer) —

    Number of items per page. Maximum is 100.

  • :page_number (Integer) —

    Page number (1-indexed).

Returns:

  • (Array<(ModelLabRunsResponse, Integer, Hash)>) —

    ModelLabRunsResponse data, response status code and response headers



959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
# File 'lib/datadog_api_client/v2/api/model_lab_api_api.rb', line 959

def list_model_lab_runs_with_http_info(opts = {})
  unstable_enabled = @api_client.config.unstable_operations["v2.list_model_lab_runs".to_sym]
  if unstable_enabled
    @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_model_lab_runs")
  else
    raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_model_lab_runs"))
  end

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ModelLabAPIAPI.list_model_lab_runs ...'
  end
  allowable_values = ['pending', 'running', 'completed', 'failed', 'killed', 'unresponsive', 'paused']
  if @api_client.config.client_side_validation && opts[:'filter_status'] && !allowable_values.include?(opts[:'filter_status'])
    fail ArgumentError, "invalid value for \"filter_status\", must be one of #{allowable_values}"
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ModelLabAPIAPI.list_model_lab_runs, must be smaller than or equal to 100.'
  end
  # resource path
  local_var_path = '/api/v2/model-lab-api/runs'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter[id]'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  query_params[:'filter[owner_id]'] = opts[:'filter_owner_id'] if !opts[:'filter_owner_id'].nil?
  query_params[:'filter[status]'] = opts[:'filter_status'] if !opts[:'filter_status'].nil?
  query_params[:'filter[project_id]'] = opts[:'filter_project_id'] if !opts[:'filter_project_id'].nil?
  query_params[:'filter[tags]'] = opts[:'filter_tags'] if !opts[:'filter_tags'].nil?
  query_params[:'filter[params]'] = opts[:'filter_params'] if !opts[:'filter_params'].nil?
  query_params[:'filter[parent_run_id]'] = opts[:'filter_parent_run_id'] if !opts[:'filter_parent_run_id'].nil?
  query_params[:'pinned_first'] = opts[:'pinned_first'] if !opts[:'pinned_first'].nil?
  query_params[:'include_pinned'] = opts[:'include_pinned'] if !opts[:'include_pinned'].nil?
  query_params[:'include_descendant_matches'] = opts[:'include_descendant_matches'] if !opts[:'include_descendant_matches'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].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] || 'ModelLabRunsResponse'

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

  new_options = opts.merge(
    :operation => :list_model_lab_runs,
    :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: ModelLabAPIAPI#list_model_lab_runs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#pin_model_lab_run(run_id, opts = {}) ⇒ Object

Pin a Model Lab run.



1035
1036
1037
1038
# File 'lib/datadog_api_client/v2/api/model_lab_api_api.rb', line 1035

def pin_model_lab_run(run_id, opts = {})
  pin_model_lab_run_with_http_info(run_id, opts)
  nil
end

#pin_model_lab_run_with_http_info(run_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Pin a Model Lab run.

Pin a Model Lab run for the current user.

Parameters:

  • run_id (Integer) —

    The ID of the Model Lab run.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
# File 'lib/datadog_api_client/v2/api/model_lab_api_api.rb', line 1047

def pin_model_lab_run_with_http_info(run_id, opts = {})
  unstable_enabled = @api_client.config.unstable_operations["v2.pin_model_lab_run".to_sym]
  if unstable_enabled
    @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.pin_model_lab_run")
  else
    raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.pin_model_lab_run"))
  end

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ModelLabAPIAPI.pin_model_lab_run ...'
  end
  # verify the required parameter 'run_id' is set
  if @api_client.config.client_side_validation && run_id.nil?
    fail ArgumentError, "Missing the required parameter 'run_id' when calling ModelLabAPIAPI.pin_model_lab_run"
  end
  # resource path
  local_var_path = '/api/v2/model-lab-api/runs/{run_id}/pin'.sub('{run_id}', CGI.escape(run_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, :AuthZ]

  new_options = opts.merge(
    :operation => :pin_model_lab_run,
    :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: ModelLabAPIAPI#pin_model_lab_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#remove_model_lab_project_owner(project_id, user_id, opts = {}) ⇒ Object

Remove an owner from a Model Lab project.



1106
1107
1108
1109
# File 'lib/datadog_api_client/v2/api/model_lab_api_api.rb', line 1106

def remove_model_lab_project_owner(project_id, user_id, opts = {})
  remove_model_lab_project_owner_with_http_info(project_id, user_id, opts)
  nil
end

#remove_model_lab_project_owner_with_http_info(project_id, user_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Remove an owner from a Model Lab project.

Remove a user from the owners of a Model Lab project. Removing a user who isn't an owner has no effect. The project's creator is always an owner and can't be removed.

Parameters:

  • project_id (Integer) —

    The ID of the Model Lab project.

  • user_id (UUID) —

    The UUID of the user.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
# File 'lib/datadog_api_client/v2/api/model_lab_api_api.rb', line 1121

def remove_model_lab_project_owner_with_http_info(project_id, user_id, opts = {})
  unstable_enabled = @api_client.config.unstable_operations["v2.remove_model_lab_project_owner".to_sym]
  if unstable_enabled
    @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.remove_model_lab_project_owner")
  else
    raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.remove_model_lab_project_owner"))
  end

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ModelLabAPIAPI.remove_model_lab_project_owner ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ModelLabAPIAPI.remove_model_lab_project_owner"
  end
  # verify the required parameter 'user_id' is set
  if @api_client.config.client_side_validation && user_id.nil?
    fail ArgumentError, "Missing the required parameter 'user_id' when calling ModelLabAPIAPI.remove_model_lab_project_owner"
  end
  # resource path
  local_var_path = '/api/v2/model-lab-api/projects/{project_id}/owners/{user_id}'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')).sub('{user_id}', CGI.escape(user_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, :AuthZ]

  new_options = opts.merge(
    :operation => :remove_model_lab_project_owner,
    :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: ModelLabAPIAPI#remove_model_lab_project_owner\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#star_model_lab_project(project_id, opts = {}) ⇒ Object

Star a Model Lab project.



1184
1185
1186
1187
# File 'lib/datadog_api_client/v2/api/model_lab_api_api.rb', line 1184

def star_model_lab_project(project_id, opts = {})
  star_model_lab_project_with_http_info(project_id, opts)
  nil
end

#star_model_lab_project_with_http_info(project_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Star a Model Lab project.

Star a Model Lab project for the current user.

Parameters:

  • project_id (Integer) —

    The ID of the Model Lab project.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
# File 'lib/datadog_api_client/v2/api/model_lab_api_api.rb', line 1196

def star_model_lab_project_with_http_info(project_id, opts = {})
  unstable_enabled = @api_client.config.unstable_operations["v2.star_model_lab_project".to_sym]
  if unstable_enabled
    @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.star_model_lab_project")
  else
    raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.star_model_lab_project"))
  end

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ModelLabAPIAPI.star_model_lab_project ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ModelLabAPIAPI.star_model_lab_project"
  end
  # resource path
  local_var_path = '/api/v2/model-lab-api/projects/{project_id}/star'.sub('{project_id}', CGI.escape(project_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, :AuthZ]

  new_options = opts.merge(
    :operation => :star_model_lab_project,
    :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: ModelLabAPIAPI#star_model_lab_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#unpin_model_lab_run(run_id, opts = {}) ⇒ Object

Unpin a Model Lab run.



1255
1256
1257
1258
# File 'lib/datadog_api_client/v2/api/model_lab_api_api.rb', line 1255

def unpin_model_lab_run(run_id, opts = {})
  unpin_model_lab_run_with_http_info(run_id, opts)
  nil
end

#unpin_model_lab_run_with_http_info(run_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Unpin a Model Lab run.

Remove the pin from a Model Lab run for the current user.

Parameters:

  • run_id (Integer) —

    The ID of the Model Lab run.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
# File 'lib/datadog_api_client/v2/api/model_lab_api_api.rb', line 1267

def unpin_model_lab_run_with_http_info(run_id, opts = {})
  unstable_enabled = @api_client.config.unstable_operations["v2.unpin_model_lab_run".to_sym]
  if unstable_enabled
    @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.unpin_model_lab_run")
  else
    raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.unpin_model_lab_run"))
  end

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ModelLabAPIAPI.unpin_model_lab_run ...'
  end
  # verify the required parameter 'run_id' is set
  if @api_client.config.client_side_validation && run_id.nil?
    fail ArgumentError, "Missing the required parameter 'run_id' when calling ModelLabAPIAPI.unpin_model_lab_run"
  end
  # resource path
  local_var_path = '/api/v2/model-lab-api/runs/{run_id}/pin'.sub('{run_id}', CGI.escape(run_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, :AuthZ]

  new_options = opts.merge(
    :operation => :unpin_model_lab_run,
    :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: ModelLabAPIAPI#unpin_model_lab_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#unstar_model_lab_project(project_id, opts = {}) ⇒ Object

Remove star from a Model Lab project.



1326
1327
1328
1329
# File 'lib/datadog_api_client/v2/api/model_lab_api_api.rb', line 1326

def unstar_model_lab_project(project_id, opts = {})
  unstar_model_lab_project_with_http_info(project_id, opts)
  nil
end

#unstar_model_lab_project_with_http_info(project_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Remove star from a Model Lab project.

Remove the star from a Model Lab project for the current user.

Parameters:

  • project_id (Integer) —

    The ID of the Model Lab project.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
# File 'lib/datadog_api_client/v2/api/model_lab_api_api.rb', line 1338

def unstar_model_lab_project_with_http_info(project_id, opts = {})
  unstable_enabled = @api_client.config.unstable_operations["v2.unstar_model_lab_project".to_sym]
  if unstable_enabled
    @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.unstar_model_lab_project")
  else
    raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.unstar_model_lab_project"))
  end

  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ModelLabAPIAPI.unstar_model_lab_project ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling ModelLabAPIAPI.unstar_model_lab_project"
  end
  # resource path
  local_var_path = '/api/v2/model-lab-api/projects/{project_id}/star'.sub('{project_id}', CGI.escape(project_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, :AuthZ]

  new_options = opts.merge(
    :operation => :unstar_model_lab_project,
    :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: ModelLabAPIAPI#unstar_model_lab_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end