rapidata 2.28.3__py3-none-any.whl → 2.28.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of rapidata might be problematic. Click here for more details.

Files changed (37) hide show
  1. rapidata/__init__.py +1 -1
  2. rapidata/api_client/__init__.py +3 -9
  3. rapidata/api_client/api/campaign_api.py +0 -780
  4. rapidata/api_client/api/coco_api.py +0 -571
  5. rapidata/api_client/api/datapoint_api.py +0 -524
  6. rapidata/api_client/api/dataset_api.py +579 -2276
  7. rapidata/api_client/api/feedback_api.py +0 -270
  8. rapidata/api_client/api/identity_api.py +74 -888
  9. rapidata/api_client/api/leaderboard_api.py +267 -6
  10. rapidata/api_client/api/order_api.py +617 -5692
  11. rapidata/api_client/api/pipeline_api.py +31 -334
  12. rapidata/api_client/api/validation_set_api.py +469 -3356
  13. rapidata/api_client/api/workflow_api.py +0 -799
  14. rapidata/api_client/models/__init__.py +3 -9
  15. rapidata/api_client/models/add_validation_rapid_model.py +1 -3
  16. rapidata/api_client/models/add_validation_text_rapid_model.py +1 -3
  17. rapidata/api_client/models/clone_order_model.py +2 -4
  18. rapidata/api_client/models/get_participant_by_id_result.py +6 -2
  19. rapidata/api_client/models/get_validation_rapids_result.py +3 -3
  20. rapidata/api_client/models/get_workflow_results_result.py +3 -3
  21. rapidata/api_client/models/participant_by_leaderboard.py +6 -2
  22. rapidata/api_client/models/pipeline_id_workflow_config_put_request.py +140 -0
  23. rapidata/api_client/models/rapid_model.py +3 -3
  24. rapidata/api_client/models/simple_workflow_config.py +3 -3
  25. rapidata/api_client/models/simple_workflow_model1.py +3 -3
  26. rapidata/api_client/models/submit_coco_model.py +1 -3
  27. rapidata/api_client/models/validation_set_zip_post_request_blueprint.py +252 -0
  28. rapidata/api_client_README.md +6 -61
  29. rapidata/rapidata_client/assets/_media_asset.py +1 -1
  30. rapidata/rapidata_client/assets/_text_asset.py +1 -1
  31. rapidata/rapidata_client/order/rapidata_order.py +1 -1
  32. rapidata/rapidata_client/validation/rapidata_validation_set.py +1 -1
  33. rapidata/rapidata_client/validation/rapids/rapids.py +4 -6
  34. {rapidata-2.28.3.dist-info → rapidata-2.28.5.dist-info}/METADATA +1 -1
  35. {rapidata-2.28.3.dist-info → rapidata-2.28.5.dist-info}/RECORD +37 -35
  36. {rapidata-2.28.3.dist-info → rapidata-2.28.5.dist-info}/LICENSE +0 -0
  37. {rapidata-2.28.3.dist-info → rapidata-2.28.5.dist-info}/WHEEL +0 -0
@@ -24,7 +24,6 @@ from rapidata.api_client.models.create_datapoint_from_text_sources_model import
24
24
  from rapidata.api_client.models.create_datapoint_from_urls_model import CreateDatapointFromUrlsModel
25
25
  from rapidata.api_client.models.create_datapoint_result import CreateDatapointResult
26
26
  from rapidata.api_client.models.create_datapoints_from_s3_bucket_model import CreateDatapointsFromS3BucketModel
27
- from rapidata.api_client.models.datapoint_metadata_model import DatapointMetadataModel
28
27
  from rapidata.api_client.models.datapoint_model_paged_result import DatapointModelPagedResult
29
28
  from rapidata.api_client.models.dataset_dataset_id_datapoints_post_request_metadata_inner import DatasetDatasetIdDatapointsPostRequestMetadataInner
30
29
  from rapidata.api_client.models.get_dataset_by_id_result import GetDatasetByIdResult
@@ -33,9 +32,7 @@ from rapidata.api_client.models.get_failed_datapoints_result import GetFailedDat
33
32
  from rapidata.api_client.models.import_from_file_result import ImportFromFileResult
34
33
  from rapidata.api_client.models.query_model import QueryModel
35
34
  from rapidata.api_client.models.update_dataset_name_model import UpdateDatasetNameModel
36
- from rapidata.api_client.models.upload_files_from_s3_bucket_model import UploadFilesFromS3BucketModel
37
35
  from rapidata.api_client.models.upload_from_s3_result import UploadFromS3Result
38
- from rapidata.api_client.models.upload_text_sources_to_dataset_model import UploadTextSourcesToDatasetModel
39
36
 
40
37
  from rapidata.api_client.api_client import ApiClient, RequestSerialized
41
38
  from rapidata.api_client.api_response import ApiResponse
@@ -56,10 +53,10 @@ class DatasetApi:
56
53
 
57
54
 
58
55
  @validate_call
59
- def dataset_createdatapoint_post(
56
+ def dataset_dataset_id_datapoints_csv_post(
60
57
  self,
61
- files: Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]] = None,
62
- model: Optional[DatapointMetadataModel] = None,
58
+ dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to import the datapoints to.")],
59
+ file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The csv file to import.")] = None,
63
60
  _request_timeout: Union[
64
61
  None,
65
62
  Annotated[StrictFloat, Field(gt=0)],
@@ -72,15 +69,14 @@ class DatasetApi:
72
69
  _content_type: Optional[StrictStr] = None,
73
70
  _headers: Optional[Dict[StrictStr, Any]] = None,
74
71
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
75
- ) -> CreateDatapointResult:
76
- """(Deprecated) Creates a single datapoint.
72
+ ) -> ImportFromFileResult:
73
+ """Creates multiple datapoints from a csv.
77
74
 
78
- If multiple files are uploaded, a multi asset datapoint will be created.
79
75
 
80
- :param files:
81
- :type files: List[bytearray]
82
- :param model:
83
- :type model: DatapointMetadataModel
76
+ :param dataset_id: The id of the dataset to import the datapoints to. (required)
77
+ :type dataset_id: str
78
+ :param file: The csv file to import.
79
+ :type file: bytearray
84
80
  :param _request_timeout: timeout setting for this request. If one
85
81
  number provided, it will be total request
86
82
  timeout. It can also be a pair (tuple) of
@@ -102,11 +98,10 @@ class DatasetApi:
102
98
  :type _host_index: int, optional
103
99
  :return: Returns the result object.
104
100
  """ # noqa: E501
105
- warnings.warn("POST /dataset/createdatapoint is deprecated.", DeprecationWarning)
106
101
 
107
- _param = self._dataset_createdatapoint_post_serialize(
108
- files=files,
109
- model=model,
102
+ _param = self._dataset_dataset_id_datapoints_csv_post_serialize(
103
+ dataset_id=dataset_id,
104
+ file=file,
110
105
  _request_auth=_request_auth,
111
106
  _content_type=_content_type,
112
107
  _headers=_headers,
@@ -114,7 +109,7 @@ class DatasetApi:
114
109
  )
115
110
 
116
111
  _response_types_map: Dict[str, Optional[str]] = {
117
- '200': "CreateDatapointResult",
112
+ '200': "ImportFromFileResult",
118
113
  }
119
114
  response_data = self.api_client.call_api(
120
115
  *_param,
@@ -128,10 +123,10 @@ class DatasetApi:
128
123
 
129
124
 
130
125
  @validate_call
131
- def dataset_createdatapoint_post_with_http_info(
126
+ def dataset_dataset_id_datapoints_csv_post_with_http_info(
132
127
  self,
133
- files: Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]] = None,
134
- model: Optional[DatapointMetadataModel] = None,
128
+ dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to import the datapoints to.")],
129
+ file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The csv file to import.")] = None,
135
130
  _request_timeout: Union[
136
131
  None,
137
132
  Annotated[StrictFloat, Field(gt=0)],
@@ -144,15 +139,14 @@ class DatasetApi:
144
139
  _content_type: Optional[StrictStr] = None,
145
140
  _headers: Optional[Dict[StrictStr, Any]] = None,
146
141
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
147
- ) -> ApiResponse[CreateDatapointResult]:
148
- """(Deprecated) Creates a single datapoint.
142
+ ) -> ApiResponse[ImportFromFileResult]:
143
+ """Creates multiple datapoints from a csv.
149
144
 
150
- If multiple files are uploaded, a multi asset datapoint will be created.
151
145
 
152
- :param files:
153
- :type files: List[bytearray]
154
- :param model:
155
- :type model: DatapointMetadataModel
146
+ :param dataset_id: The id of the dataset to import the datapoints to. (required)
147
+ :type dataset_id: str
148
+ :param file: The csv file to import.
149
+ :type file: bytearray
156
150
  :param _request_timeout: timeout setting for this request. If one
157
151
  number provided, it will be total request
158
152
  timeout. It can also be a pair (tuple) of
@@ -174,11 +168,10 @@ class DatasetApi:
174
168
  :type _host_index: int, optional
175
169
  :return: Returns the result object.
176
170
  """ # noqa: E501
177
- warnings.warn("POST /dataset/createdatapoint is deprecated.", DeprecationWarning)
178
171
 
179
- _param = self._dataset_createdatapoint_post_serialize(
180
- files=files,
181
- model=model,
172
+ _param = self._dataset_dataset_id_datapoints_csv_post_serialize(
173
+ dataset_id=dataset_id,
174
+ file=file,
182
175
  _request_auth=_request_auth,
183
176
  _content_type=_content_type,
184
177
  _headers=_headers,
@@ -186,7 +179,7 @@ class DatasetApi:
186
179
  )
187
180
 
188
181
  _response_types_map: Dict[str, Optional[str]] = {
189
- '200': "CreateDatapointResult",
182
+ '200': "ImportFromFileResult",
190
183
  }
191
184
  response_data = self.api_client.call_api(
192
185
  *_param,
@@ -200,10 +193,10 @@ class DatasetApi:
200
193
 
201
194
 
202
195
  @validate_call
203
- def dataset_createdatapoint_post_without_preload_content(
196
+ def dataset_dataset_id_datapoints_csv_post_without_preload_content(
204
197
  self,
205
- files: Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]] = None,
206
- model: Optional[DatapointMetadataModel] = None,
198
+ dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to import the datapoints to.")],
199
+ file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The csv file to import.")] = None,
207
200
  _request_timeout: Union[
208
201
  None,
209
202
  Annotated[StrictFloat, Field(gt=0)],
@@ -217,14 +210,13 @@ class DatasetApi:
217
210
  _headers: Optional[Dict[StrictStr, Any]] = None,
218
211
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
219
212
  ) -> RESTResponseType:
220
- """(Deprecated) Creates a single datapoint.
213
+ """Creates multiple datapoints from a csv.
221
214
 
222
- If multiple files are uploaded, a multi asset datapoint will be created.
223
215
 
224
- :param files:
225
- :type files: List[bytearray]
226
- :param model:
227
- :type model: DatapointMetadataModel
216
+ :param dataset_id: The id of the dataset to import the datapoints to. (required)
217
+ :type dataset_id: str
218
+ :param file: The csv file to import.
219
+ :type file: bytearray
228
220
  :param _request_timeout: timeout setting for this request. If one
229
221
  number provided, it will be total request
230
222
  timeout. It can also be a pair (tuple) of
@@ -246,11 +238,10 @@ class DatasetApi:
246
238
  :type _host_index: int, optional
247
239
  :return: Returns the result object.
248
240
  """ # noqa: E501
249
- warnings.warn("POST /dataset/createdatapoint is deprecated.", DeprecationWarning)
250
241
 
251
- _param = self._dataset_createdatapoint_post_serialize(
252
- files=files,
253
- model=model,
242
+ _param = self._dataset_dataset_id_datapoints_csv_post_serialize(
243
+ dataset_id=dataset_id,
244
+ file=file,
254
245
  _request_auth=_request_auth,
255
246
  _content_type=_content_type,
256
247
  _headers=_headers,
@@ -258,7 +249,7 @@ class DatasetApi:
258
249
  )
259
250
 
260
251
  _response_types_map: Dict[str, Optional[str]] = {
261
- '200': "CreateDatapointResult",
252
+ '200': "ImportFromFileResult",
262
253
  }
263
254
  response_data = self.api_client.call_api(
264
255
  *_param,
@@ -267,10 +258,10 @@ class DatasetApi:
267
258
  return response_data.response
268
259
 
269
260
 
270
- def _dataset_createdatapoint_post_serialize(
261
+ def _dataset_dataset_id_datapoints_csv_post_serialize(
271
262
  self,
272
- files,
273
- model,
263
+ dataset_id,
264
+ file,
274
265
  _request_auth,
275
266
  _content_type,
276
267
  _headers,
@@ -280,7 +271,6 @@ class DatasetApi:
280
271
  _host = None
281
272
 
282
273
  _collection_formats: Dict[str, str] = {
283
- 'files': 'multi',
284
274
  }
285
275
 
286
276
  _path_params: Dict[str, str] = {}
@@ -293,13 +283,13 @@ class DatasetApi:
293
283
  _body_params: Optional[bytes] = None
294
284
 
295
285
  # process the path parameters
286
+ if dataset_id is not None:
287
+ _path_params['datasetId'] = dataset_id
296
288
  # process the query parameters
297
289
  # process the header parameters
298
290
  # process the form parameters
299
- if files is not None:
300
- _files['files'] = files
301
- if model is not None:
302
- _form_params.append(('model', model))
291
+ if file is not None:
292
+ _files['file'] = file
303
293
  # process the body parameter
304
294
 
305
295
 
@@ -335,7 +325,7 @@ class DatasetApi:
335
325
 
336
326
  return self.api_client.param_serialize(
337
327
  method='POST',
338
- resource_path='/dataset/createdatapoint',
328
+ resource_path='/dataset/{datasetId}/datapoints/csv',
339
329
  path_params=_path_params,
340
330
  query_params=_query_params,
341
331
  header_params=_header_params,
@@ -352,9 +342,9 @@ class DatasetApi:
352
342
 
353
343
 
354
344
  @validate_call
355
- def dataset_creattextdatapoint_post(
345
+ def dataset_dataset_id_datapoints_failed_get(
356
346
  self,
357
- upload_text_sources_to_dataset_model: Annotated[Optional[UploadTextSourcesToDatasetModel], Field(description="The body of the request.")] = None,
347
+ dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get the failed datapoints of.")],
358
348
  _request_timeout: Union[
359
349
  None,
360
350
  Annotated[StrictFloat, Field(gt=0)],
@@ -367,13 +357,13 @@ class DatasetApi:
367
357
  _content_type: Optional[StrictStr] = None,
368
358
  _headers: Optional[Dict[StrictStr, Any]] = None,
369
359
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
370
- ) -> CreateDatapointResult:
371
- """(Deprecated) Creates new datapoints from text sources.
360
+ ) -> GetFailedDatapointsResult:
361
+ """Gets a list of all datapoints that failed to upload.
372
362
 
373
- If multiple text sources are uploaded, a new datapoint will be created for each text source.
363
+ A datapoint usually fails to upload when using a deferred upload mechanism such as when providing a URL and the URL is not accessible.
374
364
 
375
- :param upload_text_sources_to_dataset_model: The body of the request.
376
- :type upload_text_sources_to_dataset_model: UploadTextSourcesToDatasetModel
365
+ :param dataset_id: The id of the dataset to get the failed datapoints of. (required)
366
+ :type dataset_id: str
377
367
  :param _request_timeout: timeout setting for this request. If one
378
368
  number provided, it will be total request
379
369
  timeout. It can also be a pair (tuple) of
@@ -395,10 +385,9 @@ class DatasetApi:
395
385
  :type _host_index: int, optional
396
386
  :return: Returns the result object.
397
387
  """ # noqa: E501
398
- warnings.warn("POST /dataset/creattextdatapoint is deprecated.", DeprecationWarning)
399
388
 
400
- _param = self._dataset_creattextdatapoint_post_serialize(
401
- upload_text_sources_to_dataset_model=upload_text_sources_to_dataset_model,
389
+ _param = self._dataset_dataset_id_datapoints_failed_get_serialize(
390
+ dataset_id=dataset_id,
402
391
  _request_auth=_request_auth,
403
392
  _content_type=_content_type,
404
393
  _headers=_headers,
@@ -406,7 +395,7 @@ class DatasetApi:
406
395
  )
407
396
 
408
397
  _response_types_map: Dict[str, Optional[str]] = {
409
- '200': "CreateDatapointResult",
398
+ '200': "GetFailedDatapointsResult",
410
399
  }
411
400
  response_data = self.api_client.call_api(
412
401
  *_param,
@@ -420,9 +409,9 @@ class DatasetApi:
420
409
 
421
410
 
422
411
  @validate_call
423
- def dataset_creattextdatapoint_post_with_http_info(
412
+ def dataset_dataset_id_datapoints_failed_get_with_http_info(
424
413
  self,
425
- upload_text_sources_to_dataset_model: Annotated[Optional[UploadTextSourcesToDatasetModel], Field(description="The body of the request.")] = None,
414
+ dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get the failed datapoints of.")],
426
415
  _request_timeout: Union[
427
416
  None,
428
417
  Annotated[StrictFloat, Field(gt=0)],
@@ -435,13 +424,13 @@ class DatasetApi:
435
424
  _content_type: Optional[StrictStr] = None,
436
425
  _headers: Optional[Dict[StrictStr, Any]] = None,
437
426
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
438
- ) -> ApiResponse[CreateDatapointResult]:
439
- """(Deprecated) Creates new datapoints from text sources.
427
+ ) -> ApiResponse[GetFailedDatapointsResult]:
428
+ """Gets a list of all datapoints that failed to upload.
440
429
 
441
- If multiple text sources are uploaded, a new datapoint will be created for each text source.
430
+ A datapoint usually fails to upload when using a deferred upload mechanism such as when providing a URL and the URL is not accessible.
442
431
 
443
- :param upload_text_sources_to_dataset_model: The body of the request.
444
- :type upload_text_sources_to_dataset_model: UploadTextSourcesToDatasetModel
432
+ :param dataset_id: The id of the dataset to get the failed datapoints of. (required)
433
+ :type dataset_id: str
445
434
  :param _request_timeout: timeout setting for this request. If one
446
435
  number provided, it will be total request
447
436
  timeout. It can also be a pair (tuple) of
@@ -463,10 +452,9 @@ class DatasetApi:
463
452
  :type _host_index: int, optional
464
453
  :return: Returns the result object.
465
454
  """ # noqa: E501
466
- warnings.warn("POST /dataset/creattextdatapoint is deprecated.", DeprecationWarning)
467
455
 
468
- _param = self._dataset_creattextdatapoint_post_serialize(
469
- upload_text_sources_to_dataset_model=upload_text_sources_to_dataset_model,
456
+ _param = self._dataset_dataset_id_datapoints_failed_get_serialize(
457
+ dataset_id=dataset_id,
470
458
  _request_auth=_request_auth,
471
459
  _content_type=_content_type,
472
460
  _headers=_headers,
@@ -474,7 +462,7 @@ class DatasetApi:
474
462
  )
475
463
 
476
464
  _response_types_map: Dict[str, Optional[str]] = {
477
- '200': "CreateDatapointResult",
465
+ '200': "GetFailedDatapointsResult",
478
466
  }
479
467
  response_data = self.api_client.call_api(
480
468
  *_param,
@@ -488,9 +476,9 @@ class DatasetApi:
488
476
 
489
477
 
490
478
  @validate_call
491
- def dataset_creattextdatapoint_post_without_preload_content(
479
+ def dataset_dataset_id_datapoints_failed_get_without_preload_content(
492
480
  self,
493
- upload_text_sources_to_dataset_model: Annotated[Optional[UploadTextSourcesToDatasetModel], Field(description="The body of the request.")] = None,
481
+ dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get the failed datapoints of.")],
494
482
  _request_timeout: Union[
495
483
  None,
496
484
  Annotated[StrictFloat, Field(gt=0)],
@@ -504,12 +492,12 @@ class DatasetApi:
504
492
  _headers: Optional[Dict[StrictStr, Any]] = None,
505
493
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
506
494
  ) -> RESTResponseType:
507
- """(Deprecated) Creates new datapoints from text sources.
495
+ """Gets a list of all datapoints that failed to upload.
508
496
 
509
- If multiple text sources are uploaded, a new datapoint will be created for each text source.
497
+ A datapoint usually fails to upload when using a deferred upload mechanism such as when providing a URL and the URL is not accessible.
510
498
 
511
- :param upload_text_sources_to_dataset_model: The body of the request.
512
- :type upload_text_sources_to_dataset_model: UploadTextSourcesToDatasetModel
499
+ :param dataset_id: The id of the dataset to get the failed datapoints of. (required)
500
+ :type dataset_id: str
513
501
  :param _request_timeout: timeout setting for this request. If one
514
502
  number provided, it will be total request
515
503
  timeout. It can also be a pair (tuple) of
@@ -531,10 +519,9 @@ class DatasetApi:
531
519
  :type _host_index: int, optional
532
520
  :return: Returns the result object.
533
521
  """ # noqa: E501
534
- warnings.warn("POST /dataset/creattextdatapoint is deprecated.", DeprecationWarning)
535
522
 
536
- _param = self._dataset_creattextdatapoint_post_serialize(
537
- upload_text_sources_to_dataset_model=upload_text_sources_to_dataset_model,
523
+ _param = self._dataset_dataset_id_datapoints_failed_get_serialize(
524
+ dataset_id=dataset_id,
538
525
  _request_auth=_request_auth,
539
526
  _content_type=_content_type,
540
527
  _headers=_headers,
@@ -542,7 +529,7 @@ class DatasetApi:
542
529
  )
543
530
 
544
531
  _response_types_map: Dict[str, Optional[str]] = {
545
- '200': "CreateDatapointResult",
532
+ '200': "GetFailedDatapointsResult",
546
533
  }
547
534
  response_data = self.api_client.call_api(
548
535
  *_param,
@@ -551,9 +538,9 @@ class DatasetApi:
551
538
  return response_data.response
552
539
 
553
540
 
554
- def _dataset_creattextdatapoint_post_serialize(
541
+ def _dataset_dataset_id_datapoints_failed_get_serialize(
555
542
  self,
556
- upload_text_sources_to_dataset_model,
543
+ dataset_id,
557
544
  _request_auth,
558
545
  _content_type,
559
546
  _headers,
@@ -575,12 +562,12 @@ class DatasetApi:
575
562
  _body_params: Optional[bytes] = None
576
563
 
577
564
  # process the path parameters
565
+ if dataset_id is not None:
566
+ _path_params['datasetId'] = dataset_id
578
567
  # process the query parameters
579
568
  # process the header parameters
580
569
  # process the form parameters
581
570
  # process the body parameter
582
- if upload_text_sources_to_dataset_model is not None:
583
- _body_params = upload_text_sources_to_dataset_model
584
571
 
585
572
 
586
573
  # set the HTTP header `Accept`
@@ -593,21 +580,6 @@ class DatasetApi:
593
580
  ]
594
581
  )
595
582
 
596
- # set the HTTP header `Content-Type`
597
- if _content_type:
598
- _header_params['Content-Type'] = _content_type
599
- else:
600
- _default_content_type = (
601
- self.api_client.select_header_content_type(
602
- [
603
- 'application/json',
604
- 'text/json',
605
- 'application/*+json'
606
- ]
607
- )
608
- )
609
- if _default_content_type is not None:
610
- _header_params['Content-Type'] = _default_content_type
611
583
 
612
584
  # authentication setting
613
585
  _auth_settings: List[str] = [
@@ -616,8 +588,8 @@ class DatasetApi:
616
588
  ]
617
589
 
618
590
  return self.api_client.param_serialize(
619
- method='POST',
620
- resource_path='/dataset/creattextdatapoint',
591
+ method='GET',
592
+ resource_path='/dataset/{datasetId}/datapoints/failed',
621
593
  path_params=_path_params,
622
594
  query_params=_query_params,
623
595
  header_params=_header_params,
@@ -634,10 +606,11 @@ class DatasetApi:
634
606
 
635
607
 
636
608
  @validate_call
637
- def dataset_dataset_id_datapoints_csv_post(
609
+ def dataset_dataset_id_datapoints_files_post(
638
610
  self,
639
- dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to import the datapoints to.")],
640
- file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The csv file to import.")] = None,
611
+ dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to create the datapoint in.")],
612
+ files: Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]] = None,
613
+ model: Optional[CreateDatapointFromFilesModel] = None,
641
614
  _request_timeout: Union[
642
615
  None,
643
616
  Annotated[StrictFloat, Field(gt=0)],
@@ -650,14 +623,17 @@ class DatasetApi:
650
623
  _content_type: Optional[StrictStr] = None,
651
624
  _headers: Optional[Dict[StrictStr, Any]] = None,
652
625
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
653
- ) -> ImportFromFileResult:
654
- """Creates multiple datapoints from a csv.
626
+ ) -> CreateDatapointResult:
627
+ """Creates a single datapoint by uploading files.
655
628
 
629
+ If multiple files are uploaded, a multi asset datapoint will be created.
656
630
 
657
- :param dataset_id: The id of the dataset to import the datapoints to. (required)
631
+ :param dataset_id: The id of the dataset to create the datapoint in. (required)
658
632
  :type dataset_id: str
659
- :param file: The csv file to import.
660
- :type file: bytearray
633
+ :param files:
634
+ :type files: List[bytearray]
635
+ :param model:
636
+ :type model: CreateDatapointFromFilesModel
661
637
  :param _request_timeout: timeout setting for this request. If one
662
638
  number provided, it will be total request
663
639
  timeout. It can also be a pair (tuple) of
@@ -680,9 +656,10 @@ class DatasetApi:
680
656
  :return: Returns the result object.
681
657
  """ # noqa: E501
682
658
 
683
- _param = self._dataset_dataset_id_datapoints_csv_post_serialize(
659
+ _param = self._dataset_dataset_id_datapoints_files_post_serialize(
684
660
  dataset_id=dataset_id,
685
- file=file,
661
+ files=files,
662
+ model=model,
686
663
  _request_auth=_request_auth,
687
664
  _content_type=_content_type,
688
665
  _headers=_headers,
@@ -690,7 +667,7 @@ class DatasetApi:
690
667
  )
691
668
 
692
669
  _response_types_map: Dict[str, Optional[str]] = {
693
- '200': "ImportFromFileResult",
670
+ '200': "CreateDatapointResult",
694
671
  }
695
672
  response_data = self.api_client.call_api(
696
673
  *_param,
@@ -704,10 +681,11 @@ class DatasetApi:
704
681
 
705
682
 
706
683
  @validate_call
707
- def dataset_dataset_id_datapoints_csv_post_with_http_info(
684
+ def dataset_dataset_id_datapoints_files_post_with_http_info(
708
685
  self,
709
- dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to import the datapoints to.")],
710
- file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The csv file to import.")] = None,
686
+ dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to create the datapoint in.")],
687
+ files: Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]] = None,
688
+ model: Optional[CreateDatapointFromFilesModel] = None,
711
689
  _request_timeout: Union[
712
690
  None,
713
691
  Annotated[StrictFloat, Field(gt=0)],
@@ -720,14 +698,17 @@ class DatasetApi:
720
698
  _content_type: Optional[StrictStr] = None,
721
699
  _headers: Optional[Dict[StrictStr, Any]] = None,
722
700
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
723
- ) -> ApiResponse[ImportFromFileResult]:
724
- """Creates multiple datapoints from a csv.
701
+ ) -> ApiResponse[CreateDatapointResult]:
702
+ """Creates a single datapoint by uploading files.
725
703
 
704
+ If multiple files are uploaded, a multi asset datapoint will be created.
726
705
 
727
- :param dataset_id: The id of the dataset to import the datapoints to. (required)
706
+ :param dataset_id: The id of the dataset to create the datapoint in. (required)
728
707
  :type dataset_id: str
729
- :param file: The csv file to import.
730
- :type file: bytearray
708
+ :param files:
709
+ :type files: List[bytearray]
710
+ :param model:
711
+ :type model: CreateDatapointFromFilesModel
731
712
  :param _request_timeout: timeout setting for this request. If one
732
713
  number provided, it will be total request
733
714
  timeout. It can also be a pair (tuple) of
@@ -750,9 +731,10 @@ class DatasetApi:
750
731
  :return: Returns the result object.
751
732
  """ # noqa: E501
752
733
 
753
- _param = self._dataset_dataset_id_datapoints_csv_post_serialize(
734
+ _param = self._dataset_dataset_id_datapoints_files_post_serialize(
754
735
  dataset_id=dataset_id,
755
- file=file,
736
+ files=files,
737
+ model=model,
756
738
  _request_auth=_request_auth,
757
739
  _content_type=_content_type,
758
740
  _headers=_headers,
@@ -760,7 +742,7 @@ class DatasetApi:
760
742
  )
761
743
 
762
744
  _response_types_map: Dict[str, Optional[str]] = {
763
- '200': "ImportFromFileResult",
745
+ '200': "CreateDatapointResult",
764
746
  }
765
747
  response_data = self.api_client.call_api(
766
748
  *_param,
@@ -774,10 +756,11 @@ class DatasetApi:
774
756
 
775
757
 
776
758
  @validate_call
777
- def dataset_dataset_id_datapoints_csv_post_without_preload_content(
759
+ def dataset_dataset_id_datapoints_files_post_without_preload_content(
778
760
  self,
779
- dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to import the datapoints to.")],
780
- file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The csv file to import.")] = None,
761
+ dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to create the datapoint in.")],
762
+ files: Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]] = None,
763
+ model: Optional[CreateDatapointFromFilesModel] = None,
781
764
  _request_timeout: Union[
782
765
  None,
783
766
  Annotated[StrictFloat, Field(gt=0)],
@@ -791,13 +774,16 @@ class DatasetApi:
791
774
  _headers: Optional[Dict[StrictStr, Any]] = None,
792
775
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
793
776
  ) -> RESTResponseType:
794
- """Creates multiple datapoints from a csv.
777
+ """Creates a single datapoint by uploading files.
795
778
 
779
+ If multiple files are uploaded, a multi asset datapoint will be created.
796
780
 
797
- :param dataset_id: The id of the dataset to import the datapoints to. (required)
781
+ :param dataset_id: The id of the dataset to create the datapoint in. (required)
798
782
  :type dataset_id: str
799
- :param file: The csv file to import.
800
- :type file: bytearray
783
+ :param files:
784
+ :type files: List[bytearray]
785
+ :param model:
786
+ :type model: CreateDatapointFromFilesModel
801
787
  :param _request_timeout: timeout setting for this request. If one
802
788
  number provided, it will be total request
803
789
  timeout. It can also be a pair (tuple) of
@@ -820,9 +806,10 @@ class DatasetApi:
820
806
  :return: Returns the result object.
821
807
  """ # noqa: E501
822
808
 
823
- _param = self._dataset_dataset_id_datapoints_csv_post_serialize(
809
+ _param = self._dataset_dataset_id_datapoints_files_post_serialize(
824
810
  dataset_id=dataset_id,
825
- file=file,
811
+ files=files,
812
+ model=model,
826
813
  _request_auth=_request_auth,
827
814
  _content_type=_content_type,
828
815
  _headers=_headers,
@@ -830,7 +817,7 @@ class DatasetApi:
830
817
  )
831
818
 
832
819
  _response_types_map: Dict[str, Optional[str]] = {
833
- '200': "ImportFromFileResult",
820
+ '200': "CreateDatapointResult",
834
821
  }
835
822
  response_data = self.api_client.call_api(
836
823
  *_param,
@@ -839,10 +826,11 @@ class DatasetApi:
839
826
  return response_data.response
840
827
 
841
828
 
842
- def _dataset_dataset_id_datapoints_csv_post_serialize(
829
+ def _dataset_dataset_id_datapoints_files_post_serialize(
843
830
  self,
844
831
  dataset_id,
845
- file,
832
+ files,
833
+ model,
846
834
  _request_auth,
847
835
  _content_type,
848
836
  _headers,
@@ -852,6 +840,7 @@ class DatasetApi:
852
840
  _host = None
853
841
 
854
842
  _collection_formats: Dict[str, str] = {
843
+ 'files': 'multi',
855
844
  }
856
845
 
857
846
  _path_params: Dict[str, str] = {}
@@ -869,8 +858,10 @@ class DatasetApi:
869
858
  # process the query parameters
870
859
  # process the header parameters
871
860
  # process the form parameters
872
- if file is not None:
873
- _files['file'] = file
861
+ if files is not None:
862
+ _files['files'] = files
863
+ if model is not None:
864
+ _form_params.append(('model', model))
874
865
  # process the body parameter
875
866
 
876
867
 
@@ -906,7 +897,7 @@ class DatasetApi:
906
897
 
907
898
  return self.api_client.param_serialize(
908
899
  method='POST',
909
- resource_path='/dataset/{datasetId}/datapoints/csv',
900
+ resource_path='/dataset/{datasetId}/datapoints/files',
910
901
  path_params=_path_params,
911
902
  query_params=_query_params,
912
903
  header_params=_header_params,
@@ -923,9 +914,10 @@ class DatasetApi:
923
914
 
924
915
 
925
916
  @validate_call
926
- def dataset_dataset_id_datapoints_failed_get(
917
+ def dataset_dataset_id_datapoints_get(
927
918
  self,
928
- dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get the failed datapoints of.")],
919
+ dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get the datapoints of.")],
920
+ request: Annotated[Optional[QueryModel], Field(description="The query model to filter, sort, and paginate the results.")] = None,
929
921
  _request_timeout: Union[
930
922
  None,
931
923
  Annotated[StrictFloat, Field(gt=0)],
@@ -938,13 +930,14 @@ class DatasetApi:
938
930
  _content_type: Optional[StrictStr] = None,
939
931
  _headers: Optional[Dict[StrictStr, Any]] = None,
940
932
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
941
- ) -> GetFailedDatapointsResult:
942
- """Gets a list of all datapoints that failed to upload.
933
+ ) -> DatapointModelPagedResult:
934
+ """Gets all datapoints of a dataset.
943
935
 
944
- A datapoint usually fails to upload when using a deferred upload mechanism such as when providing a URL and the URL is not accessible.
945
936
 
946
- :param dataset_id: The id of the dataset to get the failed datapoints of. (required)
937
+ :param dataset_id: The id of the dataset to get the datapoints of. (required)
947
938
  :type dataset_id: str
939
+ :param request: The query model to filter, sort, and paginate the results.
940
+ :type request: QueryModel
948
941
  :param _request_timeout: timeout setting for this request. If one
949
942
  number provided, it will be total request
950
943
  timeout. It can also be a pair (tuple) of
@@ -967,8 +960,9 @@ class DatasetApi:
967
960
  :return: Returns the result object.
968
961
  """ # noqa: E501
969
962
 
970
- _param = self._dataset_dataset_id_datapoints_failed_get_serialize(
963
+ _param = self._dataset_dataset_id_datapoints_get_serialize(
971
964
  dataset_id=dataset_id,
965
+ request=request,
972
966
  _request_auth=_request_auth,
973
967
  _content_type=_content_type,
974
968
  _headers=_headers,
@@ -976,7 +970,7 @@ class DatasetApi:
976
970
  )
977
971
 
978
972
  _response_types_map: Dict[str, Optional[str]] = {
979
- '200': "GetFailedDatapointsResult",
973
+ '200': "DatapointModelPagedResult",
980
974
  }
981
975
  response_data = self.api_client.call_api(
982
976
  *_param,
@@ -990,9 +984,10 @@ class DatasetApi:
990
984
 
991
985
 
992
986
  @validate_call
993
- def dataset_dataset_id_datapoints_failed_get_with_http_info(
987
+ def dataset_dataset_id_datapoints_get_with_http_info(
994
988
  self,
995
- dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get the failed datapoints of.")],
989
+ dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get the datapoints of.")],
990
+ request: Annotated[Optional[QueryModel], Field(description="The query model to filter, sort, and paginate the results.")] = None,
996
991
  _request_timeout: Union[
997
992
  None,
998
993
  Annotated[StrictFloat, Field(gt=0)],
@@ -1005,13 +1000,14 @@ class DatasetApi:
1005
1000
  _content_type: Optional[StrictStr] = None,
1006
1001
  _headers: Optional[Dict[StrictStr, Any]] = None,
1007
1002
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1008
- ) -> ApiResponse[GetFailedDatapointsResult]:
1009
- """Gets a list of all datapoints that failed to upload.
1003
+ ) -> ApiResponse[DatapointModelPagedResult]:
1004
+ """Gets all datapoints of a dataset.
1010
1005
 
1011
- A datapoint usually fails to upload when using a deferred upload mechanism such as when providing a URL and the URL is not accessible.
1012
1006
 
1013
- :param dataset_id: The id of the dataset to get the failed datapoints of. (required)
1007
+ :param dataset_id: The id of the dataset to get the datapoints of. (required)
1014
1008
  :type dataset_id: str
1009
+ :param request: The query model to filter, sort, and paginate the results.
1010
+ :type request: QueryModel
1015
1011
  :param _request_timeout: timeout setting for this request. If one
1016
1012
  number provided, it will be total request
1017
1013
  timeout. It can also be a pair (tuple) of
@@ -1034,8 +1030,9 @@ class DatasetApi:
1034
1030
  :return: Returns the result object.
1035
1031
  """ # noqa: E501
1036
1032
 
1037
- _param = self._dataset_dataset_id_datapoints_failed_get_serialize(
1033
+ _param = self._dataset_dataset_id_datapoints_get_serialize(
1038
1034
  dataset_id=dataset_id,
1035
+ request=request,
1039
1036
  _request_auth=_request_auth,
1040
1037
  _content_type=_content_type,
1041
1038
  _headers=_headers,
@@ -1043,7 +1040,7 @@ class DatasetApi:
1043
1040
  )
1044
1041
 
1045
1042
  _response_types_map: Dict[str, Optional[str]] = {
1046
- '200': "GetFailedDatapointsResult",
1043
+ '200': "DatapointModelPagedResult",
1047
1044
  }
1048
1045
  response_data = self.api_client.call_api(
1049
1046
  *_param,
@@ -1057,9 +1054,10 @@ class DatasetApi:
1057
1054
 
1058
1055
 
1059
1056
  @validate_call
1060
- def dataset_dataset_id_datapoints_failed_get_without_preload_content(
1057
+ def dataset_dataset_id_datapoints_get_without_preload_content(
1061
1058
  self,
1062
- dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get the failed datapoints of.")],
1059
+ dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get the datapoints of.")],
1060
+ request: Annotated[Optional[QueryModel], Field(description="The query model to filter, sort, and paginate the results.")] = None,
1063
1061
  _request_timeout: Union[
1064
1062
  None,
1065
1063
  Annotated[StrictFloat, Field(gt=0)],
@@ -1073,12 +1071,13 @@ class DatasetApi:
1073
1071
  _headers: Optional[Dict[StrictStr, Any]] = None,
1074
1072
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1075
1073
  ) -> RESTResponseType:
1076
- """Gets a list of all datapoints that failed to upload.
1074
+ """Gets all datapoints of a dataset.
1077
1075
 
1078
- A datapoint usually fails to upload when using a deferred upload mechanism such as when providing a URL and the URL is not accessible.
1079
1076
 
1080
- :param dataset_id: The id of the dataset to get the failed datapoints of. (required)
1077
+ :param dataset_id: The id of the dataset to get the datapoints of. (required)
1081
1078
  :type dataset_id: str
1079
+ :param request: The query model to filter, sort, and paginate the results.
1080
+ :type request: QueryModel
1082
1081
  :param _request_timeout: timeout setting for this request. If one
1083
1082
  number provided, it will be total request
1084
1083
  timeout. It can also be a pair (tuple) of
@@ -1101,8 +1100,9 @@ class DatasetApi:
1101
1100
  :return: Returns the result object.
1102
1101
  """ # noqa: E501
1103
1102
 
1104
- _param = self._dataset_dataset_id_datapoints_failed_get_serialize(
1103
+ _param = self._dataset_dataset_id_datapoints_get_serialize(
1105
1104
  dataset_id=dataset_id,
1105
+ request=request,
1106
1106
  _request_auth=_request_auth,
1107
1107
  _content_type=_content_type,
1108
1108
  _headers=_headers,
@@ -1110,7 +1110,7 @@ class DatasetApi:
1110
1110
  )
1111
1111
 
1112
1112
  _response_types_map: Dict[str, Optional[str]] = {
1113
- '200': "GetFailedDatapointsResult",
1113
+ '200': "DatapointModelPagedResult",
1114
1114
  }
1115
1115
  response_data = self.api_client.call_api(
1116
1116
  *_param,
@@ -1119,9 +1119,10 @@ class DatasetApi:
1119
1119
  return response_data.response
1120
1120
 
1121
1121
 
1122
- def _dataset_dataset_id_datapoints_failed_get_serialize(
1122
+ def _dataset_dataset_id_datapoints_get_serialize(
1123
1123
  self,
1124
1124
  dataset_id,
1125
+ request,
1125
1126
  _request_auth,
1126
1127
  _content_type,
1127
1128
  _headers,
@@ -1146,6 +1147,10 @@ class DatasetApi:
1146
1147
  if dataset_id is not None:
1147
1148
  _path_params['datasetId'] = dataset_id
1148
1149
  # process the query parameters
1150
+ if request is not None:
1151
+
1152
+ _query_params.append(('request', request))
1153
+
1149
1154
  # process the header parameters
1150
1155
  # process the form parameters
1151
1156
  # process the body parameter
@@ -1170,7 +1175,7 @@ class DatasetApi:
1170
1175
 
1171
1176
  return self.api_client.param_serialize(
1172
1177
  method='GET',
1173
- resource_path='/dataset/{datasetId}/datapoints/failed',
1178
+ resource_path='/dataset/{datasetId}/datapoints',
1174
1179
  path_params=_path_params,
1175
1180
  query_params=_query_params,
1176
1181
  header_params=_header_params,
@@ -1187,11 +1192,14 @@ class DatasetApi:
1187
1192
 
1188
1193
 
1189
1194
  @validate_call
1190
- def dataset_dataset_id_datapoints_files_post(
1195
+ def dataset_dataset_id_datapoints_post(
1191
1196
  self,
1192
- dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to create the datapoint in.")],
1193
- files: Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]] = None,
1194
- model: Optional[CreateDatapointFromFilesModel] = None,
1197
+ dataset_id: Annotated[StrictStr, Field(description="The id of the dataset")],
1198
+ file: Annotated[Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]], Field(description="The files to upload from the local storage. Must be either images or videos.")] = None,
1199
+ text: Annotated[Optional[List[StrictStr]], Field(description="The texts to upload. The length limit is set at 256 characters per text.")] = None,
1200
+ url: Annotated[Optional[List[StrictStr]], Field(description="Creates an asset from a url. The url needs to point to a publicly accessible resource. The server will download the resource and store it as an asset in the background. <remarks> Additionally, to the urls having to be publicly accessible, they need to support HTTP HEAD requests. </remarks>")] = None,
1201
+ metadata: Annotated[Optional[List[DatasetDatasetIdDatapointsPostRequestMetadataInner]], Field(description="Optional metadata to attach to the datapoint.")] = None,
1202
+ sort_index: Annotated[Optional[StrictInt], Field(description="The index will be used to keep the datapoints in order. Useful if upload is parallelized")] = None,
1195
1203
  _request_timeout: Union[
1196
1204
  None,
1197
1205
  Annotated[StrictFloat, Field(gt=0)],
@@ -1205,16 +1213,22 @@ class DatasetApi:
1205
1213
  _headers: Optional[Dict[StrictStr, Any]] = None,
1206
1214
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1207
1215
  ) -> CreateDatapointResult:
1208
- """Creates a single datapoint by uploading files.
1216
+ """Creates a new datapoint from multiple possible sources.
1209
1217
 
1210
- If multiple files are uploaded, a multi asset datapoint will be created.
1218
+ Multiple files, texts, and urls can be provided. If multiple files are provided, a multi-asset datapoint will be created, meaning that all sources provided will be stored as sub-assets of the datapoint. If multiple datapoints are desired, one should not pass in multiple files, texts, or urls, instead, one should call this endpoint multiple times with the desired file, text, or url per datapoint. The request must be a multipart form request, where each parameter is sent as a separate part. The files, texts, and urls can be mixed and matched as needed, however, at least one of them must be provided, and one should make sure that mixing them makes sense for the dataset.
1211
1219
 
1212
- :param dataset_id: The id of the dataset to create the datapoint in. (required)
1220
+ :param dataset_id: The id of the dataset (required)
1213
1221
  :type dataset_id: str
1214
- :param files:
1215
- :type files: List[bytearray]
1216
- :param model:
1217
- :type model: CreateDatapointFromFilesModel
1222
+ :param file: The files to upload from the local storage. Must be either images or videos.
1223
+ :type file: List[bytearray]
1224
+ :param text: The texts to upload. The length limit is set at 256 characters per text.
1225
+ :type text: List[str]
1226
+ :param url: Creates an asset from a url. The url needs to point to a publicly accessible resource. The server will download the resource and store it as an asset in the background. <remarks> Additionally, to the urls having to be publicly accessible, they need to support HTTP HEAD requests. </remarks>
1227
+ :type url: List[str]
1228
+ :param metadata: Optional metadata to attach to the datapoint.
1229
+ :type metadata: List[DatasetDatasetIdDatapointsPostRequestMetadataInner]
1230
+ :param sort_index: The index will be used to keep the datapoints in order. Useful if upload is parallelized
1231
+ :type sort_index: int
1218
1232
  :param _request_timeout: timeout setting for this request. If one
1219
1233
  number provided, it will be total request
1220
1234
  timeout. It can also be a pair (tuple) of
@@ -1237,10 +1251,13 @@ class DatasetApi:
1237
1251
  :return: Returns the result object.
1238
1252
  """ # noqa: E501
1239
1253
 
1240
- _param = self._dataset_dataset_id_datapoints_files_post_serialize(
1254
+ _param = self._dataset_dataset_id_datapoints_post_serialize(
1241
1255
  dataset_id=dataset_id,
1242
- files=files,
1243
- model=model,
1256
+ file=file,
1257
+ text=text,
1258
+ url=url,
1259
+ metadata=metadata,
1260
+ sort_index=sort_index,
1244
1261
  _request_auth=_request_auth,
1245
1262
  _content_type=_content_type,
1246
1263
  _headers=_headers,
@@ -1262,11 +1279,14 @@ class DatasetApi:
1262
1279
 
1263
1280
 
1264
1281
  @validate_call
1265
- def dataset_dataset_id_datapoints_files_post_with_http_info(
1282
+ def dataset_dataset_id_datapoints_post_with_http_info(
1266
1283
  self,
1267
- dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to create the datapoint in.")],
1268
- files: Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]] = None,
1269
- model: Optional[CreateDatapointFromFilesModel] = None,
1284
+ dataset_id: Annotated[StrictStr, Field(description="The id of the dataset")],
1285
+ file: Annotated[Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]], Field(description="The files to upload from the local storage. Must be either images or videos.")] = None,
1286
+ text: Annotated[Optional[List[StrictStr]], Field(description="The texts to upload. The length limit is set at 256 characters per text.")] = None,
1287
+ url: Annotated[Optional[List[StrictStr]], Field(description="Creates an asset from a url. The url needs to point to a publicly accessible resource. The server will download the resource and store it as an asset in the background. <remarks> Additionally, to the urls having to be publicly accessible, they need to support HTTP HEAD requests. </remarks>")] = None,
1288
+ metadata: Annotated[Optional[List[DatasetDatasetIdDatapointsPostRequestMetadataInner]], Field(description="Optional metadata to attach to the datapoint.")] = None,
1289
+ sort_index: Annotated[Optional[StrictInt], Field(description="The index will be used to keep the datapoints in order. Useful if upload is parallelized")] = None,
1270
1290
  _request_timeout: Union[
1271
1291
  None,
1272
1292
  Annotated[StrictFloat, Field(gt=0)],
@@ -1280,1824 +1300,22 @@ class DatasetApi:
1280
1300
  _headers: Optional[Dict[StrictStr, Any]] = None,
1281
1301
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1282
1302
  ) -> ApiResponse[CreateDatapointResult]:
1283
- """Creates a single datapoint by uploading files.
1284
-
1285
- If multiple files are uploaded, a multi asset datapoint will be created.
1286
-
1287
- :param dataset_id: The id of the dataset to create the datapoint in. (required)
1288
- :type dataset_id: str
1289
- :param files:
1290
- :type files: List[bytearray]
1291
- :param model:
1292
- :type model: CreateDatapointFromFilesModel
1293
- :param _request_timeout: timeout setting for this request. If one
1294
- number provided, it will be total request
1295
- timeout. It can also be a pair (tuple) of
1296
- (connection, read) timeouts.
1297
- :type _request_timeout: int, tuple(int, int), optional
1298
- :param _request_auth: set to override the auth_settings for an a single
1299
- request; this effectively ignores the
1300
- authentication in the spec for a single request.
1301
- :type _request_auth: dict, optional
1302
- :param _content_type: force content-type for the request.
1303
- :type _content_type: str, Optional
1304
- :param _headers: set to override the headers for a single
1305
- request; this effectively ignores the headers
1306
- in the spec for a single request.
1307
- :type _headers: dict, optional
1308
- :param _host_index: set to override the host_index for a single
1309
- request; this effectively ignores the host_index
1310
- in the spec for a single request.
1311
- :type _host_index: int, optional
1312
- :return: Returns the result object.
1313
- """ # noqa: E501
1314
-
1315
- _param = self._dataset_dataset_id_datapoints_files_post_serialize(
1316
- dataset_id=dataset_id,
1317
- files=files,
1318
- model=model,
1319
- _request_auth=_request_auth,
1320
- _content_type=_content_type,
1321
- _headers=_headers,
1322
- _host_index=_host_index
1323
- )
1324
-
1325
- _response_types_map: Dict[str, Optional[str]] = {
1326
- '200': "CreateDatapointResult",
1327
- }
1328
- response_data = self.api_client.call_api(
1329
- *_param,
1330
- _request_timeout=_request_timeout
1331
- )
1332
- response_data.read()
1333
- return self.api_client.response_deserialize(
1334
- response_data=response_data,
1335
- response_types_map=_response_types_map,
1336
- )
1337
-
1338
-
1339
- @validate_call
1340
- def dataset_dataset_id_datapoints_files_post_without_preload_content(
1341
- self,
1342
- dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to create the datapoint in.")],
1343
- files: Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]] = None,
1344
- model: Optional[CreateDatapointFromFilesModel] = None,
1345
- _request_timeout: Union[
1346
- None,
1347
- Annotated[StrictFloat, Field(gt=0)],
1348
- Tuple[
1349
- Annotated[StrictFloat, Field(gt=0)],
1350
- Annotated[StrictFloat, Field(gt=0)]
1351
- ]
1352
- ] = None,
1353
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1354
- _content_type: Optional[StrictStr] = None,
1355
- _headers: Optional[Dict[StrictStr, Any]] = None,
1356
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1357
- ) -> RESTResponseType:
1358
- """Creates a single datapoint by uploading files.
1303
+ """Creates a new datapoint from multiple possible sources.
1359
1304
 
1360
- If multiple files are uploaded, a multi asset datapoint will be created.
1305
+ Multiple files, texts, and urls can be provided. If multiple files are provided, a multi-asset datapoint will be created, meaning that all sources provided will be stored as sub-assets of the datapoint. If multiple datapoints are desired, one should not pass in multiple files, texts, or urls, instead, one should call this endpoint multiple times with the desired file, text, or url per datapoint. The request must be a multipart form request, where each parameter is sent as a separate part. The files, texts, and urls can be mixed and matched as needed, however, at least one of them must be provided, and one should make sure that mixing them makes sense for the dataset.
1361
1306
 
1362
- :param dataset_id: The id of the dataset to create the datapoint in. (required)
1363
- :type dataset_id: str
1364
- :param files:
1365
- :type files: List[bytearray]
1366
- :param model:
1367
- :type model: CreateDatapointFromFilesModel
1368
- :param _request_timeout: timeout setting for this request. If one
1369
- number provided, it will be total request
1370
- timeout. It can also be a pair (tuple) of
1371
- (connection, read) timeouts.
1372
- :type _request_timeout: int, tuple(int, int), optional
1373
- :param _request_auth: set to override the auth_settings for an a single
1374
- request; this effectively ignores the
1375
- authentication in the spec for a single request.
1376
- :type _request_auth: dict, optional
1377
- :param _content_type: force content-type for the request.
1378
- :type _content_type: str, Optional
1379
- :param _headers: set to override the headers for a single
1380
- request; this effectively ignores the headers
1381
- in the spec for a single request.
1382
- :type _headers: dict, optional
1383
- :param _host_index: set to override the host_index for a single
1384
- request; this effectively ignores the host_index
1385
- in the spec for a single request.
1386
- :type _host_index: int, optional
1387
- :return: Returns the result object.
1388
- """ # noqa: E501
1389
-
1390
- _param = self._dataset_dataset_id_datapoints_files_post_serialize(
1391
- dataset_id=dataset_id,
1392
- files=files,
1393
- model=model,
1394
- _request_auth=_request_auth,
1395
- _content_type=_content_type,
1396
- _headers=_headers,
1397
- _host_index=_host_index
1398
- )
1399
-
1400
- _response_types_map: Dict[str, Optional[str]] = {
1401
- '200': "CreateDatapointResult",
1402
- }
1403
- response_data = self.api_client.call_api(
1404
- *_param,
1405
- _request_timeout=_request_timeout
1406
- )
1407
- return response_data.response
1408
-
1409
-
1410
- def _dataset_dataset_id_datapoints_files_post_serialize(
1411
- self,
1412
- dataset_id,
1413
- files,
1414
- model,
1415
- _request_auth,
1416
- _content_type,
1417
- _headers,
1418
- _host_index,
1419
- ) -> RequestSerialized:
1420
-
1421
- _host = None
1422
-
1423
- _collection_formats: Dict[str, str] = {
1424
- 'files': 'multi',
1425
- }
1426
-
1427
- _path_params: Dict[str, str] = {}
1428
- _query_params: List[Tuple[str, str]] = []
1429
- _header_params: Dict[str, Optional[str]] = _headers or {}
1430
- _form_params: List[Tuple[str, str]] = []
1431
- _files: Dict[
1432
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1433
- ] = {}
1434
- _body_params: Optional[bytes] = None
1435
-
1436
- # process the path parameters
1437
- if dataset_id is not None:
1438
- _path_params['datasetId'] = dataset_id
1439
- # process the query parameters
1440
- # process the header parameters
1441
- # process the form parameters
1442
- if files is not None:
1443
- _files['files'] = files
1444
- if model is not None:
1445
- _form_params.append(('model', model))
1446
- # process the body parameter
1447
-
1448
-
1449
- # set the HTTP header `Accept`
1450
- if 'Accept' not in _header_params:
1451
- _header_params['Accept'] = self.api_client.select_header_accept(
1452
- [
1453
- 'text/plain',
1454
- 'application/json',
1455
- 'text/json'
1456
- ]
1457
- )
1458
-
1459
- # set the HTTP header `Content-Type`
1460
- if _content_type:
1461
- _header_params['Content-Type'] = _content_type
1462
- else:
1463
- _default_content_type = (
1464
- self.api_client.select_header_content_type(
1465
- [
1466
- 'multipart/form-data'
1467
- ]
1468
- )
1469
- )
1470
- if _default_content_type is not None:
1471
- _header_params['Content-Type'] = _default_content_type
1472
-
1473
- # authentication setting
1474
- _auth_settings: List[str] = [
1475
- 'bearer',
1476
- 'oauth2'
1477
- ]
1478
-
1479
- return self.api_client.param_serialize(
1480
- method='POST',
1481
- resource_path='/dataset/{datasetId}/datapoints/files',
1482
- path_params=_path_params,
1483
- query_params=_query_params,
1484
- header_params=_header_params,
1485
- body=_body_params,
1486
- post_params=_form_params,
1487
- files=_files,
1488
- auth_settings=_auth_settings,
1489
- collection_formats=_collection_formats,
1490
- _host=_host,
1491
- _request_auth=_request_auth
1492
- )
1493
-
1494
-
1495
-
1496
-
1497
- @validate_call
1498
- def dataset_dataset_id_datapoints_get(
1499
- self,
1500
- dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get the datapoints of.")],
1501
- request: Annotated[Optional[QueryModel], Field(description="The query model to filter, sort, and paginate the results.")] = None,
1502
- _request_timeout: Union[
1503
- None,
1504
- Annotated[StrictFloat, Field(gt=0)],
1505
- Tuple[
1506
- Annotated[StrictFloat, Field(gt=0)],
1507
- Annotated[StrictFloat, Field(gt=0)]
1508
- ]
1509
- ] = None,
1510
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1511
- _content_type: Optional[StrictStr] = None,
1512
- _headers: Optional[Dict[StrictStr, Any]] = None,
1513
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1514
- ) -> DatapointModelPagedResult:
1515
- """Gets all datapoints of a dataset.
1516
-
1517
-
1518
- :param dataset_id: The id of the dataset to get the datapoints of. (required)
1519
- :type dataset_id: str
1520
- :param request: The query model to filter, sort, and paginate the results.
1521
- :type request: QueryModel
1522
- :param _request_timeout: timeout setting for this request. If one
1523
- number provided, it will be total request
1524
- timeout. It can also be a pair (tuple) of
1525
- (connection, read) timeouts.
1526
- :type _request_timeout: int, tuple(int, int), optional
1527
- :param _request_auth: set to override the auth_settings for an a single
1528
- request; this effectively ignores the
1529
- authentication in the spec for a single request.
1530
- :type _request_auth: dict, optional
1531
- :param _content_type: force content-type for the request.
1532
- :type _content_type: str, Optional
1533
- :param _headers: set to override the headers for a single
1534
- request; this effectively ignores the headers
1535
- in the spec for a single request.
1536
- :type _headers: dict, optional
1537
- :param _host_index: set to override the host_index for a single
1538
- request; this effectively ignores the host_index
1539
- in the spec for a single request.
1540
- :type _host_index: int, optional
1541
- :return: Returns the result object.
1542
- """ # noqa: E501
1543
-
1544
- _param = self._dataset_dataset_id_datapoints_get_serialize(
1545
- dataset_id=dataset_id,
1546
- request=request,
1547
- _request_auth=_request_auth,
1548
- _content_type=_content_type,
1549
- _headers=_headers,
1550
- _host_index=_host_index
1551
- )
1552
-
1553
- _response_types_map: Dict[str, Optional[str]] = {
1554
- '200': "DatapointModelPagedResult",
1555
- }
1556
- response_data = self.api_client.call_api(
1557
- *_param,
1558
- _request_timeout=_request_timeout
1559
- )
1560
- response_data.read()
1561
- return self.api_client.response_deserialize(
1562
- response_data=response_data,
1563
- response_types_map=_response_types_map,
1564
- ).data
1565
-
1566
-
1567
- @validate_call
1568
- def dataset_dataset_id_datapoints_get_with_http_info(
1569
- self,
1570
- dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get the datapoints of.")],
1571
- request: Annotated[Optional[QueryModel], Field(description="The query model to filter, sort, and paginate the results.")] = None,
1572
- _request_timeout: Union[
1573
- None,
1574
- Annotated[StrictFloat, Field(gt=0)],
1575
- Tuple[
1576
- Annotated[StrictFloat, Field(gt=0)],
1577
- Annotated[StrictFloat, Field(gt=0)]
1578
- ]
1579
- ] = None,
1580
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1581
- _content_type: Optional[StrictStr] = None,
1582
- _headers: Optional[Dict[StrictStr, Any]] = None,
1583
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1584
- ) -> ApiResponse[DatapointModelPagedResult]:
1585
- """Gets all datapoints of a dataset.
1586
-
1587
-
1588
- :param dataset_id: The id of the dataset to get the datapoints of. (required)
1589
- :type dataset_id: str
1590
- :param request: The query model to filter, sort, and paginate the results.
1591
- :type request: QueryModel
1592
- :param _request_timeout: timeout setting for this request. If one
1593
- number provided, it will be total request
1594
- timeout. It can also be a pair (tuple) of
1595
- (connection, read) timeouts.
1596
- :type _request_timeout: int, tuple(int, int), optional
1597
- :param _request_auth: set to override the auth_settings for an a single
1598
- request; this effectively ignores the
1599
- authentication in the spec for a single request.
1600
- :type _request_auth: dict, optional
1601
- :param _content_type: force content-type for the request.
1602
- :type _content_type: str, Optional
1603
- :param _headers: set to override the headers for a single
1604
- request; this effectively ignores the headers
1605
- in the spec for a single request.
1606
- :type _headers: dict, optional
1607
- :param _host_index: set to override the host_index for a single
1608
- request; this effectively ignores the host_index
1609
- in the spec for a single request.
1610
- :type _host_index: int, optional
1611
- :return: Returns the result object.
1612
- """ # noqa: E501
1613
-
1614
- _param = self._dataset_dataset_id_datapoints_get_serialize(
1615
- dataset_id=dataset_id,
1616
- request=request,
1617
- _request_auth=_request_auth,
1618
- _content_type=_content_type,
1619
- _headers=_headers,
1620
- _host_index=_host_index
1621
- )
1622
-
1623
- _response_types_map: Dict[str, Optional[str]] = {
1624
- '200': "DatapointModelPagedResult",
1625
- }
1626
- response_data = self.api_client.call_api(
1627
- *_param,
1628
- _request_timeout=_request_timeout
1629
- )
1630
- response_data.read()
1631
- return self.api_client.response_deserialize(
1632
- response_data=response_data,
1633
- response_types_map=_response_types_map,
1634
- )
1635
-
1636
-
1637
- @validate_call
1638
- def dataset_dataset_id_datapoints_get_without_preload_content(
1639
- self,
1640
- dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get the datapoints of.")],
1641
- request: Annotated[Optional[QueryModel], Field(description="The query model to filter, sort, and paginate the results.")] = None,
1642
- _request_timeout: Union[
1643
- None,
1644
- Annotated[StrictFloat, Field(gt=0)],
1645
- Tuple[
1646
- Annotated[StrictFloat, Field(gt=0)],
1647
- Annotated[StrictFloat, Field(gt=0)]
1648
- ]
1649
- ] = None,
1650
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1651
- _content_type: Optional[StrictStr] = None,
1652
- _headers: Optional[Dict[StrictStr, Any]] = None,
1653
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1654
- ) -> RESTResponseType:
1655
- """Gets all datapoints of a dataset.
1656
-
1657
-
1658
- :param dataset_id: The id of the dataset to get the datapoints of. (required)
1659
- :type dataset_id: str
1660
- :param request: The query model to filter, sort, and paginate the results.
1661
- :type request: QueryModel
1662
- :param _request_timeout: timeout setting for this request. If one
1663
- number provided, it will be total request
1664
- timeout. It can also be a pair (tuple) of
1665
- (connection, read) timeouts.
1666
- :type _request_timeout: int, tuple(int, int), optional
1667
- :param _request_auth: set to override the auth_settings for an a single
1668
- request; this effectively ignores the
1669
- authentication in the spec for a single request.
1670
- :type _request_auth: dict, optional
1671
- :param _content_type: force content-type for the request.
1672
- :type _content_type: str, Optional
1673
- :param _headers: set to override the headers for a single
1674
- request; this effectively ignores the headers
1675
- in the spec for a single request.
1676
- :type _headers: dict, optional
1677
- :param _host_index: set to override the host_index for a single
1678
- request; this effectively ignores the host_index
1679
- in the spec for a single request.
1680
- :type _host_index: int, optional
1681
- :return: Returns the result object.
1682
- """ # noqa: E501
1683
-
1684
- _param = self._dataset_dataset_id_datapoints_get_serialize(
1685
- dataset_id=dataset_id,
1686
- request=request,
1687
- _request_auth=_request_auth,
1688
- _content_type=_content_type,
1689
- _headers=_headers,
1690
- _host_index=_host_index
1691
- )
1692
-
1693
- _response_types_map: Dict[str, Optional[str]] = {
1694
- '200': "DatapointModelPagedResult",
1695
- }
1696
- response_data = self.api_client.call_api(
1697
- *_param,
1698
- _request_timeout=_request_timeout
1699
- )
1700
- return response_data.response
1701
-
1702
-
1703
- def _dataset_dataset_id_datapoints_get_serialize(
1704
- self,
1705
- dataset_id,
1706
- request,
1707
- _request_auth,
1708
- _content_type,
1709
- _headers,
1710
- _host_index,
1711
- ) -> RequestSerialized:
1712
-
1713
- _host = None
1714
-
1715
- _collection_formats: Dict[str, str] = {
1716
- }
1717
-
1718
- _path_params: Dict[str, str] = {}
1719
- _query_params: List[Tuple[str, str]] = []
1720
- _header_params: Dict[str, Optional[str]] = _headers or {}
1721
- _form_params: List[Tuple[str, str]] = []
1722
- _files: Dict[
1723
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1724
- ] = {}
1725
- _body_params: Optional[bytes] = None
1726
-
1727
- # process the path parameters
1728
- if dataset_id is not None:
1729
- _path_params['datasetId'] = dataset_id
1730
- # process the query parameters
1731
- if request is not None:
1732
-
1733
- _query_params.append(('request', request))
1734
-
1735
- # process the header parameters
1736
- # process the form parameters
1737
- # process the body parameter
1738
-
1739
-
1740
- # set the HTTP header `Accept`
1741
- if 'Accept' not in _header_params:
1742
- _header_params['Accept'] = self.api_client.select_header_accept(
1743
- [
1744
- 'text/plain',
1745
- 'application/json',
1746
- 'text/json'
1747
- ]
1748
- )
1749
-
1750
-
1751
- # authentication setting
1752
- _auth_settings: List[str] = [
1753
- 'bearer',
1754
- 'oauth2'
1755
- ]
1756
-
1757
- return self.api_client.param_serialize(
1758
- method='GET',
1759
- resource_path='/dataset/{datasetId}/datapoints',
1760
- path_params=_path_params,
1761
- query_params=_query_params,
1762
- header_params=_header_params,
1763
- body=_body_params,
1764
- post_params=_form_params,
1765
- files=_files,
1766
- auth_settings=_auth_settings,
1767
- collection_formats=_collection_formats,
1768
- _host=_host,
1769
- _request_auth=_request_auth
1770
- )
1771
-
1772
-
1773
-
1774
-
1775
- @validate_call
1776
- def dataset_dataset_id_datapoints_post(
1777
- self,
1778
- dataset_id: Annotated[StrictStr, Field(description="The id of the dataset")],
1779
- file: Annotated[Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]], Field(description="The files to upload from the local storage. Must be either images or videos.")] = None,
1780
- text: Annotated[Optional[List[StrictStr]], Field(description="The texts to upload. The length limit is set at 256 characters per text.")] = None,
1781
- url: Annotated[Optional[List[StrictStr]], Field(description="Creates an asset from a url. The url needs to point to a publicly accessible resource. The server will download the resource and store it as an asset in the background. <remarks> Additionally, to the urls having to be publicly accessible, they need to support HTTP HEAD requests. </remarks>")] = None,
1782
- metadata: Annotated[Optional[List[DatasetDatasetIdDatapointsPostRequestMetadataInner]], Field(description="Optional metadata to attach to the datapoint.")] = None,
1783
- sort_index: Annotated[Optional[StrictInt], Field(description="The index will be used to keep the datapoints in order. Useful if upload is parallelized")] = None,
1784
- _request_timeout: Union[
1785
- None,
1786
- Annotated[StrictFloat, Field(gt=0)],
1787
- Tuple[
1788
- Annotated[StrictFloat, Field(gt=0)],
1789
- Annotated[StrictFloat, Field(gt=0)]
1790
- ]
1791
- ] = None,
1792
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1793
- _content_type: Optional[StrictStr] = None,
1794
- _headers: Optional[Dict[StrictStr, Any]] = None,
1795
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1796
- ) -> CreateDatapointResult:
1797
- """Creates a new datapoint from multiple possible sources.
1798
-
1799
- Multiple files, texts, and urls can be provided. If multiple files are provided, a multi-asset datapoint will be created, meaning that all sources provided will be stored as sub-assets of the datapoint. If multiple datapoints are desired, one should not pass in multiple files, texts, or urls, instead, one should call this endpoint multiple times with the desired file, text, or url per datapoint. The request must be a multipart form request, where each parameter is sent as a separate part. The files, texts, and urls can be mixed and matched as needed, however, at least one of them must be provided, and one should make sure that mixing them makes sense for the dataset.
1800
-
1801
- :param dataset_id: The id of the dataset (required)
1802
- :type dataset_id: str
1803
- :param file: The files to upload from the local storage. Must be either images or videos.
1804
- :type file: List[bytearray]
1805
- :param text: The texts to upload. The length limit is set at 256 characters per text.
1806
- :type text: List[str]
1807
- :param url: Creates an asset from a url. The url needs to point to a publicly accessible resource. The server will download the resource and store it as an asset in the background. <remarks> Additionally, to the urls having to be publicly accessible, they need to support HTTP HEAD requests. </remarks>
1808
- :type url: List[str]
1809
- :param metadata: Optional metadata to attach to the datapoint.
1810
- :type metadata: List[DatasetDatasetIdDatapointsPostRequestMetadataInner]
1811
- :param sort_index: The index will be used to keep the datapoints in order. Useful if upload is parallelized
1812
- :type sort_index: int
1813
- :param _request_timeout: timeout setting for this request. If one
1814
- number provided, it will be total request
1815
- timeout. It can also be a pair (tuple) of
1816
- (connection, read) timeouts.
1817
- :type _request_timeout: int, tuple(int, int), optional
1818
- :param _request_auth: set to override the auth_settings for an a single
1819
- request; this effectively ignores the
1820
- authentication in the spec for a single request.
1821
- :type _request_auth: dict, optional
1822
- :param _content_type: force content-type for the request.
1823
- :type _content_type: str, Optional
1824
- :param _headers: set to override the headers for a single
1825
- request; this effectively ignores the headers
1826
- in the spec for a single request.
1827
- :type _headers: dict, optional
1828
- :param _host_index: set to override the host_index for a single
1829
- request; this effectively ignores the host_index
1830
- in the spec for a single request.
1831
- :type _host_index: int, optional
1832
- :return: Returns the result object.
1833
- """ # noqa: E501
1834
-
1835
- _param = self._dataset_dataset_id_datapoints_post_serialize(
1836
- dataset_id=dataset_id,
1837
- file=file,
1838
- text=text,
1839
- url=url,
1840
- metadata=metadata,
1841
- sort_index=sort_index,
1842
- _request_auth=_request_auth,
1843
- _content_type=_content_type,
1844
- _headers=_headers,
1845
- _host_index=_host_index
1846
- )
1847
-
1848
- _response_types_map: Dict[str, Optional[str]] = {
1849
- '200': "CreateDatapointResult",
1850
- }
1851
- response_data = self.api_client.call_api(
1852
- *_param,
1853
- _request_timeout=_request_timeout
1854
- )
1855
- response_data.read()
1856
- return self.api_client.response_deserialize(
1857
- response_data=response_data,
1858
- response_types_map=_response_types_map,
1859
- ).data
1860
-
1861
-
1862
- @validate_call
1863
- def dataset_dataset_id_datapoints_post_with_http_info(
1864
- self,
1865
- dataset_id: Annotated[StrictStr, Field(description="The id of the dataset")],
1866
- file: Annotated[Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]], Field(description="The files to upload from the local storage. Must be either images or videos.")] = None,
1867
- text: Annotated[Optional[List[StrictStr]], Field(description="The texts to upload. The length limit is set at 256 characters per text.")] = None,
1868
- url: Annotated[Optional[List[StrictStr]], Field(description="Creates an asset from a url. The url needs to point to a publicly accessible resource. The server will download the resource and store it as an asset in the background. <remarks> Additionally, to the urls having to be publicly accessible, they need to support HTTP HEAD requests. </remarks>")] = None,
1869
- metadata: Annotated[Optional[List[DatasetDatasetIdDatapointsPostRequestMetadataInner]], Field(description="Optional metadata to attach to the datapoint.")] = None,
1870
- sort_index: Annotated[Optional[StrictInt], Field(description="The index will be used to keep the datapoints in order. Useful if upload is parallelized")] = None,
1871
- _request_timeout: Union[
1872
- None,
1873
- Annotated[StrictFloat, Field(gt=0)],
1874
- Tuple[
1875
- Annotated[StrictFloat, Field(gt=0)],
1876
- Annotated[StrictFloat, Field(gt=0)]
1877
- ]
1878
- ] = None,
1879
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1880
- _content_type: Optional[StrictStr] = None,
1881
- _headers: Optional[Dict[StrictStr, Any]] = None,
1882
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1883
- ) -> ApiResponse[CreateDatapointResult]:
1884
- """Creates a new datapoint from multiple possible sources.
1885
-
1886
- Multiple files, texts, and urls can be provided. If multiple files are provided, a multi-asset datapoint will be created, meaning that all sources provided will be stored as sub-assets of the datapoint. If multiple datapoints are desired, one should not pass in multiple files, texts, or urls, instead, one should call this endpoint multiple times with the desired file, text, or url per datapoint. The request must be a multipart form request, where each parameter is sent as a separate part. The files, texts, and urls can be mixed and matched as needed, however, at least one of them must be provided, and one should make sure that mixing them makes sense for the dataset.
1887
-
1888
- :param dataset_id: The id of the dataset (required)
1889
- :type dataset_id: str
1890
- :param file: The files to upload from the local storage. Must be either images or videos.
1891
- :type file: List[bytearray]
1892
- :param text: The texts to upload. The length limit is set at 256 characters per text.
1893
- :type text: List[str]
1894
- :param url: Creates an asset from a url. The url needs to point to a publicly accessible resource. The server will download the resource and store it as an asset in the background. <remarks> Additionally, to the urls having to be publicly accessible, they need to support HTTP HEAD requests. </remarks>
1895
- :type url: List[str]
1896
- :param metadata: Optional metadata to attach to the datapoint.
1897
- :type metadata: List[DatasetDatasetIdDatapointsPostRequestMetadataInner]
1898
- :param sort_index: The index will be used to keep the datapoints in order. Useful if upload is parallelized
1899
- :type sort_index: int
1900
- :param _request_timeout: timeout setting for this request. If one
1901
- number provided, it will be total request
1902
- timeout. It can also be a pair (tuple) of
1903
- (connection, read) timeouts.
1904
- :type _request_timeout: int, tuple(int, int), optional
1905
- :param _request_auth: set to override the auth_settings for an a single
1906
- request; this effectively ignores the
1907
- authentication in the spec for a single request.
1908
- :type _request_auth: dict, optional
1909
- :param _content_type: force content-type for the request.
1910
- :type _content_type: str, Optional
1911
- :param _headers: set to override the headers for a single
1912
- request; this effectively ignores the headers
1913
- in the spec for a single request.
1914
- :type _headers: dict, optional
1915
- :param _host_index: set to override the host_index for a single
1916
- request; this effectively ignores the host_index
1917
- in the spec for a single request.
1918
- :type _host_index: int, optional
1919
- :return: Returns the result object.
1920
- """ # noqa: E501
1921
-
1922
- _param = self._dataset_dataset_id_datapoints_post_serialize(
1923
- dataset_id=dataset_id,
1924
- file=file,
1925
- text=text,
1926
- url=url,
1927
- metadata=metadata,
1928
- sort_index=sort_index,
1929
- _request_auth=_request_auth,
1930
- _content_type=_content_type,
1931
- _headers=_headers,
1932
- _host_index=_host_index
1933
- )
1934
-
1935
- _response_types_map: Dict[str, Optional[str]] = {
1936
- '200': "CreateDatapointResult",
1937
- }
1938
- response_data = self.api_client.call_api(
1939
- *_param,
1940
- _request_timeout=_request_timeout
1941
- )
1942
- response_data.read()
1943
- return self.api_client.response_deserialize(
1944
- response_data=response_data,
1945
- response_types_map=_response_types_map,
1946
- )
1947
-
1948
-
1949
- @validate_call
1950
- def dataset_dataset_id_datapoints_post_without_preload_content(
1951
- self,
1952
- dataset_id: Annotated[StrictStr, Field(description="The id of the dataset")],
1953
- file: Annotated[Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]], Field(description="The files to upload from the local storage. Must be either images or videos.")] = None,
1954
- text: Annotated[Optional[List[StrictStr]], Field(description="The texts to upload. The length limit is set at 256 characters per text.")] = None,
1955
- url: Annotated[Optional[List[StrictStr]], Field(description="Creates an asset from a url. The url needs to point to a publicly accessible resource. The server will download the resource and store it as an asset in the background. <remarks> Additionally, to the urls having to be publicly accessible, they need to support HTTP HEAD requests. </remarks>")] = None,
1956
- metadata: Annotated[Optional[List[DatasetDatasetIdDatapointsPostRequestMetadataInner]], Field(description="Optional metadata to attach to the datapoint.")] = None,
1957
- sort_index: Annotated[Optional[StrictInt], Field(description="The index will be used to keep the datapoints in order. Useful if upload is parallelized")] = None,
1958
- _request_timeout: Union[
1959
- None,
1960
- Annotated[StrictFloat, Field(gt=0)],
1961
- Tuple[
1962
- Annotated[StrictFloat, Field(gt=0)],
1963
- Annotated[StrictFloat, Field(gt=0)]
1964
- ]
1965
- ] = None,
1966
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1967
- _content_type: Optional[StrictStr] = None,
1968
- _headers: Optional[Dict[StrictStr, Any]] = None,
1969
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1970
- ) -> RESTResponseType:
1971
- """Creates a new datapoint from multiple possible sources.
1972
-
1973
- Multiple files, texts, and urls can be provided. If multiple files are provided, a multi-asset datapoint will be created, meaning that all sources provided will be stored as sub-assets of the datapoint. If multiple datapoints are desired, one should not pass in multiple files, texts, or urls, instead, one should call this endpoint multiple times with the desired file, text, or url per datapoint. The request must be a multipart form request, where each parameter is sent as a separate part. The files, texts, and urls can be mixed and matched as needed, however, at least one of them must be provided, and one should make sure that mixing them makes sense for the dataset.
1974
-
1975
- :param dataset_id: The id of the dataset (required)
1976
- :type dataset_id: str
1977
- :param file: The files to upload from the local storage. Must be either images or videos.
1978
- :type file: List[bytearray]
1979
- :param text: The texts to upload. The length limit is set at 256 characters per text.
1980
- :type text: List[str]
1981
- :param url: Creates an asset from a url. The url needs to point to a publicly accessible resource. The server will download the resource and store it as an asset in the background. <remarks> Additionally, to the urls having to be publicly accessible, they need to support HTTP HEAD requests. </remarks>
1982
- :type url: List[str]
1983
- :param metadata: Optional metadata to attach to the datapoint.
1984
- :type metadata: List[DatasetDatasetIdDatapointsPostRequestMetadataInner]
1985
- :param sort_index: The index will be used to keep the datapoints in order. Useful if upload is parallelized
1986
- :type sort_index: int
1987
- :param _request_timeout: timeout setting for this request. If one
1988
- number provided, it will be total request
1989
- timeout. It can also be a pair (tuple) of
1990
- (connection, read) timeouts.
1991
- :type _request_timeout: int, tuple(int, int), optional
1992
- :param _request_auth: set to override the auth_settings for an a single
1993
- request; this effectively ignores the
1994
- authentication in the spec for a single request.
1995
- :type _request_auth: dict, optional
1996
- :param _content_type: force content-type for the request.
1997
- :type _content_type: str, Optional
1998
- :param _headers: set to override the headers for a single
1999
- request; this effectively ignores the headers
2000
- in the spec for a single request.
2001
- :type _headers: dict, optional
2002
- :param _host_index: set to override the host_index for a single
2003
- request; this effectively ignores the host_index
2004
- in the spec for a single request.
2005
- :type _host_index: int, optional
2006
- :return: Returns the result object.
2007
- """ # noqa: E501
2008
-
2009
- _param = self._dataset_dataset_id_datapoints_post_serialize(
2010
- dataset_id=dataset_id,
2011
- file=file,
2012
- text=text,
2013
- url=url,
2014
- metadata=metadata,
2015
- sort_index=sort_index,
2016
- _request_auth=_request_auth,
2017
- _content_type=_content_type,
2018
- _headers=_headers,
2019
- _host_index=_host_index
2020
- )
2021
-
2022
- _response_types_map: Dict[str, Optional[str]] = {
2023
- '200': "CreateDatapointResult",
2024
- }
2025
- response_data = self.api_client.call_api(
2026
- *_param,
2027
- _request_timeout=_request_timeout
2028
- )
2029
- return response_data.response
2030
-
2031
-
2032
- def _dataset_dataset_id_datapoints_post_serialize(
2033
- self,
2034
- dataset_id,
2035
- file,
2036
- text,
2037
- url,
2038
- metadata,
2039
- sort_index,
2040
- _request_auth,
2041
- _content_type,
2042
- _headers,
2043
- _host_index,
2044
- ) -> RequestSerialized:
2045
-
2046
- _host = None
2047
-
2048
- _collection_formats: Dict[str, str] = {
2049
- 'file': 'csv',
2050
- 'text': 'multi',
2051
- 'url': 'multi',
2052
- 'metadata': 'multi',
2053
- }
2054
-
2055
- _path_params: Dict[str, str] = {}
2056
- _query_params: List[Tuple[str, str]] = []
2057
- _header_params: Dict[str, Optional[str]] = _headers or {}
2058
- _form_params: List[Tuple[str, str]] = []
2059
- _files: Dict[
2060
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2061
- ] = {}
2062
- _body_params: Optional[bytes] = None
2063
-
2064
- # process the path parameters
2065
- if dataset_id is not None:
2066
- _path_params['datasetId'] = dataset_id
2067
- # process the query parameters
2068
- # process the header parameters
2069
- # process the form parameters
2070
- if file is not None:
2071
- _files['file'] = file
2072
- if text is not None:
2073
- _form_params.append(('text', text))
2074
- if url is not None:
2075
- _form_params.append(('url', url))
2076
- if metadata is not None:
2077
- _form_params.append(('metadata', metadata))
2078
- if sort_index is not None:
2079
- _form_params.append(('sortIndex', sort_index))
2080
- # process the body parameter
2081
-
2082
-
2083
- # set the HTTP header `Accept`
2084
- if 'Accept' not in _header_params:
2085
- _header_params['Accept'] = self.api_client.select_header_accept(
2086
- [
2087
- 'text/plain',
2088
- 'application/json',
2089
- 'text/json'
2090
- ]
2091
- )
2092
-
2093
- # set the HTTP header `Content-Type`
2094
- if _content_type:
2095
- _header_params['Content-Type'] = _content_type
2096
- else:
2097
- _default_content_type = (
2098
- self.api_client.select_header_content_type(
2099
- [
2100
- 'multipart/form-data'
2101
- ]
2102
- )
2103
- )
2104
- if _default_content_type is not None:
2105
- _header_params['Content-Type'] = _default_content_type
2106
-
2107
- # authentication setting
2108
- _auth_settings: List[str] = [
2109
- 'bearer',
2110
- 'oauth2'
2111
- ]
2112
-
2113
- return self.api_client.param_serialize(
2114
- method='POST',
2115
- resource_path='/dataset/{datasetId}/datapoints',
2116
- path_params=_path_params,
2117
- query_params=_query_params,
2118
- header_params=_header_params,
2119
- body=_body_params,
2120
- post_params=_form_params,
2121
- files=_files,
2122
- auth_settings=_auth_settings,
2123
- collection_formats=_collection_formats,
2124
- _host=_host,
2125
- _request_auth=_request_auth
2126
- )
2127
-
2128
-
2129
-
2130
-
2131
- @validate_call
2132
- def dataset_dataset_id_datapoints_s3_post(
2133
- self,
2134
- dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to upload the files to.")],
2135
- create_datapoints_from_s3_bucket_model: Annotated[Optional[CreateDatapointsFromS3BucketModel], Field(description="The body of the request.")] = None,
2136
- _request_timeout: Union[
2137
- None,
2138
- Annotated[StrictFloat, Field(gt=0)],
2139
- Tuple[
2140
- Annotated[StrictFloat, Field(gt=0)],
2141
- Annotated[StrictFloat, Field(gt=0)]
2142
- ]
2143
- ] = None,
2144
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2145
- _content_type: Optional[StrictStr] = None,
2146
- _headers: Optional[Dict[StrictStr, Any]] = None,
2147
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2148
- ) -> UploadFromS3Result:
2149
- """Uploads files from an S3 bucket to a dataset.
2150
-
2151
- A new datapoint will be created for each file in the bucket.
2152
-
2153
- :param dataset_id: The id of the dataset to upload the files to. (required)
2154
- :type dataset_id: str
2155
- :param create_datapoints_from_s3_bucket_model: The body of the request.
2156
- :type create_datapoints_from_s3_bucket_model: CreateDatapointsFromS3BucketModel
2157
- :param _request_timeout: timeout setting for this request. If one
2158
- number provided, it will be total request
2159
- timeout. It can also be a pair (tuple) of
2160
- (connection, read) timeouts.
2161
- :type _request_timeout: int, tuple(int, int), optional
2162
- :param _request_auth: set to override the auth_settings for an a single
2163
- request; this effectively ignores the
2164
- authentication in the spec for a single request.
2165
- :type _request_auth: dict, optional
2166
- :param _content_type: force content-type for the request.
2167
- :type _content_type: str, Optional
2168
- :param _headers: set to override the headers for a single
2169
- request; this effectively ignores the headers
2170
- in the spec for a single request.
2171
- :type _headers: dict, optional
2172
- :param _host_index: set to override the host_index for a single
2173
- request; this effectively ignores the host_index
2174
- in the spec for a single request.
2175
- :type _host_index: int, optional
2176
- :return: Returns the result object.
2177
- """ # noqa: E501
2178
-
2179
- _param = self._dataset_dataset_id_datapoints_s3_post_serialize(
2180
- dataset_id=dataset_id,
2181
- create_datapoints_from_s3_bucket_model=create_datapoints_from_s3_bucket_model,
2182
- _request_auth=_request_auth,
2183
- _content_type=_content_type,
2184
- _headers=_headers,
2185
- _host_index=_host_index
2186
- )
2187
-
2188
- _response_types_map: Dict[str, Optional[str]] = {
2189
- '200': "UploadFromS3Result",
2190
- }
2191
- response_data = self.api_client.call_api(
2192
- *_param,
2193
- _request_timeout=_request_timeout
2194
- )
2195
- response_data.read()
2196
- return self.api_client.response_deserialize(
2197
- response_data=response_data,
2198
- response_types_map=_response_types_map,
2199
- ).data
2200
-
2201
-
2202
- @validate_call
2203
- def dataset_dataset_id_datapoints_s3_post_with_http_info(
2204
- self,
2205
- dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to upload the files to.")],
2206
- create_datapoints_from_s3_bucket_model: Annotated[Optional[CreateDatapointsFromS3BucketModel], Field(description="The body of the request.")] = None,
2207
- _request_timeout: Union[
2208
- None,
2209
- Annotated[StrictFloat, Field(gt=0)],
2210
- Tuple[
2211
- Annotated[StrictFloat, Field(gt=0)],
2212
- Annotated[StrictFloat, Field(gt=0)]
2213
- ]
2214
- ] = None,
2215
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2216
- _content_type: Optional[StrictStr] = None,
2217
- _headers: Optional[Dict[StrictStr, Any]] = None,
2218
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2219
- ) -> ApiResponse[UploadFromS3Result]:
2220
- """Uploads files from an S3 bucket to a dataset.
2221
-
2222
- A new datapoint will be created for each file in the bucket.
2223
-
2224
- :param dataset_id: The id of the dataset to upload the files to. (required)
2225
- :type dataset_id: str
2226
- :param create_datapoints_from_s3_bucket_model: The body of the request.
2227
- :type create_datapoints_from_s3_bucket_model: CreateDatapointsFromS3BucketModel
2228
- :param _request_timeout: timeout setting for this request. If one
2229
- number provided, it will be total request
2230
- timeout. It can also be a pair (tuple) of
2231
- (connection, read) timeouts.
2232
- :type _request_timeout: int, tuple(int, int), optional
2233
- :param _request_auth: set to override the auth_settings for an a single
2234
- request; this effectively ignores the
2235
- authentication in the spec for a single request.
2236
- :type _request_auth: dict, optional
2237
- :param _content_type: force content-type for the request.
2238
- :type _content_type: str, Optional
2239
- :param _headers: set to override the headers for a single
2240
- request; this effectively ignores the headers
2241
- in the spec for a single request.
2242
- :type _headers: dict, optional
2243
- :param _host_index: set to override the host_index for a single
2244
- request; this effectively ignores the host_index
2245
- in the spec for a single request.
2246
- :type _host_index: int, optional
2247
- :return: Returns the result object.
2248
- """ # noqa: E501
2249
-
2250
- _param = self._dataset_dataset_id_datapoints_s3_post_serialize(
2251
- dataset_id=dataset_id,
2252
- create_datapoints_from_s3_bucket_model=create_datapoints_from_s3_bucket_model,
2253
- _request_auth=_request_auth,
2254
- _content_type=_content_type,
2255
- _headers=_headers,
2256
- _host_index=_host_index
2257
- )
2258
-
2259
- _response_types_map: Dict[str, Optional[str]] = {
2260
- '200': "UploadFromS3Result",
2261
- }
2262
- response_data = self.api_client.call_api(
2263
- *_param,
2264
- _request_timeout=_request_timeout
2265
- )
2266
- response_data.read()
2267
- return self.api_client.response_deserialize(
2268
- response_data=response_data,
2269
- response_types_map=_response_types_map,
2270
- )
2271
-
2272
-
2273
- @validate_call
2274
- def dataset_dataset_id_datapoints_s3_post_without_preload_content(
2275
- self,
2276
- dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to upload the files to.")],
2277
- create_datapoints_from_s3_bucket_model: Annotated[Optional[CreateDatapointsFromS3BucketModel], Field(description="The body of the request.")] = None,
2278
- _request_timeout: Union[
2279
- None,
2280
- Annotated[StrictFloat, Field(gt=0)],
2281
- Tuple[
2282
- Annotated[StrictFloat, Field(gt=0)],
2283
- Annotated[StrictFloat, Field(gt=0)]
2284
- ]
2285
- ] = None,
2286
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2287
- _content_type: Optional[StrictStr] = None,
2288
- _headers: Optional[Dict[StrictStr, Any]] = None,
2289
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2290
- ) -> RESTResponseType:
2291
- """Uploads files from an S3 bucket to a dataset.
2292
-
2293
- A new datapoint will be created for each file in the bucket.
2294
-
2295
- :param dataset_id: The id of the dataset to upload the files to. (required)
2296
- :type dataset_id: str
2297
- :param create_datapoints_from_s3_bucket_model: The body of the request.
2298
- :type create_datapoints_from_s3_bucket_model: CreateDatapointsFromS3BucketModel
2299
- :param _request_timeout: timeout setting for this request. If one
2300
- number provided, it will be total request
2301
- timeout. It can also be a pair (tuple) of
2302
- (connection, read) timeouts.
2303
- :type _request_timeout: int, tuple(int, int), optional
2304
- :param _request_auth: set to override the auth_settings for an a single
2305
- request; this effectively ignores the
2306
- authentication in the spec for a single request.
2307
- :type _request_auth: dict, optional
2308
- :param _content_type: force content-type for the request.
2309
- :type _content_type: str, Optional
2310
- :param _headers: set to override the headers for a single
2311
- request; this effectively ignores the headers
2312
- in the spec for a single request.
2313
- :type _headers: dict, optional
2314
- :param _host_index: set to override the host_index for a single
2315
- request; this effectively ignores the host_index
2316
- in the spec for a single request.
2317
- :type _host_index: int, optional
2318
- :return: Returns the result object.
2319
- """ # noqa: E501
2320
-
2321
- _param = self._dataset_dataset_id_datapoints_s3_post_serialize(
2322
- dataset_id=dataset_id,
2323
- create_datapoints_from_s3_bucket_model=create_datapoints_from_s3_bucket_model,
2324
- _request_auth=_request_auth,
2325
- _content_type=_content_type,
2326
- _headers=_headers,
2327
- _host_index=_host_index
2328
- )
2329
-
2330
- _response_types_map: Dict[str, Optional[str]] = {
2331
- '200': "UploadFromS3Result",
2332
- }
2333
- response_data = self.api_client.call_api(
2334
- *_param,
2335
- _request_timeout=_request_timeout
2336
- )
2337
- return response_data.response
2338
-
2339
-
2340
- def _dataset_dataset_id_datapoints_s3_post_serialize(
2341
- self,
2342
- dataset_id,
2343
- create_datapoints_from_s3_bucket_model,
2344
- _request_auth,
2345
- _content_type,
2346
- _headers,
2347
- _host_index,
2348
- ) -> RequestSerialized:
2349
-
2350
- _host = None
2351
-
2352
- _collection_formats: Dict[str, str] = {
2353
- }
2354
-
2355
- _path_params: Dict[str, str] = {}
2356
- _query_params: List[Tuple[str, str]] = []
2357
- _header_params: Dict[str, Optional[str]] = _headers or {}
2358
- _form_params: List[Tuple[str, str]] = []
2359
- _files: Dict[
2360
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2361
- ] = {}
2362
- _body_params: Optional[bytes] = None
2363
-
2364
- # process the path parameters
2365
- if dataset_id is not None:
2366
- _path_params['datasetId'] = dataset_id
2367
- # process the query parameters
2368
- # process the header parameters
2369
- # process the form parameters
2370
- # process the body parameter
2371
- if create_datapoints_from_s3_bucket_model is not None:
2372
- _body_params = create_datapoints_from_s3_bucket_model
2373
-
2374
-
2375
- # set the HTTP header `Accept`
2376
- if 'Accept' not in _header_params:
2377
- _header_params['Accept'] = self.api_client.select_header_accept(
2378
- [
2379
- 'text/plain',
2380
- 'application/json',
2381
- 'text/json'
2382
- ]
2383
- )
2384
-
2385
- # set the HTTP header `Content-Type`
2386
- if _content_type:
2387
- _header_params['Content-Type'] = _content_type
2388
- else:
2389
- _default_content_type = (
2390
- self.api_client.select_header_content_type(
2391
- [
2392
- 'application/json',
2393
- 'text/json',
2394
- 'application/*+json'
2395
- ]
2396
- )
2397
- )
2398
- if _default_content_type is not None:
2399
- _header_params['Content-Type'] = _default_content_type
2400
-
2401
- # authentication setting
2402
- _auth_settings: List[str] = [
2403
- 'bearer',
2404
- 'oauth2'
2405
- ]
2406
-
2407
- return self.api_client.param_serialize(
2408
- method='POST',
2409
- resource_path='/dataset/{datasetId}/datapoints/s3',
2410
- path_params=_path_params,
2411
- query_params=_query_params,
2412
- header_params=_header_params,
2413
- body=_body_params,
2414
- post_params=_form_params,
2415
- files=_files,
2416
- auth_settings=_auth_settings,
2417
- collection_formats=_collection_formats,
2418
- _host=_host,
2419
- _request_auth=_request_auth
2420
- )
2421
-
2422
-
2423
-
2424
-
2425
- @validate_call
2426
- def dataset_dataset_id_datapoints_texts_post(
2427
- self,
2428
- dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to create the datapoint in.")],
2429
- create_datapoint_from_text_sources_model: Annotated[Optional[CreateDatapointFromTextSourcesModel], Field(description="The body of the request.")] = None,
2430
- _request_timeout: Union[
2431
- None,
2432
- Annotated[StrictFloat, Field(gt=0)],
2433
- Tuple[
2434
- Annotated[StrictFloat, Field(gt=0)],
2435
- Annotated[StrictFloat, Field(gt=0)]
2436
- ]
2437
- ] = None,
2438
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2439
- _content_type: Optional[StrictStr] = None,
2440
- _headers: Optional[Dict[StrictStr, Any]] = None,
2441
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2442
- ) -> CreateDatapointResult:
2443
- """Creates a single datapoint from text sources.
2444
-
2445
- If multiple text sources are uploaded, a multi asset datapoint will be created.
2446
-
2447
- :param dataset_id: The id of the dataset to create the datapoint in. (required)
2448
- :type dataset_id: str
2449
- :param create_datapoint_from_text_sources_model: The body of the request.
2450
- :type create_datapoint_from_text_sources_model: CreateDatapointFromTextSourcesModel
2451
- :param _request_timeout: timeout setting for this request. If one
2452
- number provided, it will be total request
2453
- timeout. It can also be a pair (tuple) of
2454
- (connection, read) timeouts.
2455
- :type _request_timeout: int, tuple(int, int), optional
2456
- :param _request_auth: set to override the auth_settings for an a single
2457
- request; this effectively ignores the
2458
- authentication in the spec for a single request.
2459
- :type _request_auth: dict, optional
2460
- :param _content_type: force content-type for the request.
2461
- :type _content_type: str, Optional
2462
- :param _headers: set to override the headers for a single
2463
- request; this effectively ignores the headers
2464
- in the spec for a single request.
2465
- :type _headers: dict, optional
2466
- :param _host_index: set to override the host_index for a single
2467
- request; this effectively ignores the host_index
2468
- in the spec for a single request.
2469
- :type _host_index: int, optional
2470
- :return: Returns the result object.
2471
- """ # noqa: E501
2472
-
2473
- _param = self._dataset_dataset_id_datapoints_texts_post_serialize(
2474
- dataset_id=dataset_id,
2475
- create_datapoint_from_text_sources_model=create_datapoint_from_text_sources_model,
2476
- _request_auth=_request_auth,
2477
- _content_type=_content_type,
2478
- _headers=_headers,
2479
- _host_index=_host_index
2480
- )
2481
-
2482
- _response_types_map: Dict[str, Optional[str]] = {
2483
- '200': "CreateDatapointResult",
2484
- }
2485
- response_data = self.api_client.call_api(
2486
- *_param,
2487
- _request_timeout=_request_timeout
2488
- )
2489
- response_data.read()
2490
- return self.api_client.response_deserialize(
2491
- response_data=response_data,
2492
- response_types_map=_response_types_map,
2493
- ).data
2494
-
2495
-
2496
- @validate_call
2497
- def dataset_dataset_id_datapoints_texts_post_with_http_info(
2498
- self,
2499
- dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to create the datapoint in.")],
2500
- create_datapoint_from_text_sources_model: Annotated[Optional[CreateDatapointFromTextSourcesModel], Field(description="The body of the request.")] = None,
2501
- _request_timeout: Union[
2502
- None,
2503
- Annotated[StrictFloat, Field(gt=0)],
2504
- Tuple[
2505
- Annotated[StrictFloat, Field(gt=0)],
2506
- Annotated[StrictFloat, Field(gt=0)]
2507
- ]
2508
- ] = None,
2509
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2510
- _content_type: Optional[StrictStr] = None,
2511
- _headers: Optional[Dict[StrictStr, Any]] = None,
2512
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2513
- ) -> ApiResponse[CreateDatapointResult]:
2514
- """Creates a single datapoint from text sources.
2515
-
2516
- If multiple text sources are uploaded, a multi asset datapoint will be created.
2517
-
2518
- :param dataset_id: The id of the dataset to create the datapoint in. (required)
2519
- :type dataset_id: str
2520
- :param create_datapoint_from_text_sources_model: The body of the request.
2521
- :type create_datapoint_from_text_sources_model: CreateDatapointFromTextSourcesModel
2522
- :param _request_timeout: timeout setting for this request. If one
2523
- number provided, it will be total request
2524
- timeout. It can also be a pair (tuple) of
2525
- (connection, read) timeouts.
2526
- :type _request_timeout: int, tuple(int, int), optional
2527
- :param _request_auth: set to override the auth_settings for an a single
2528
- request; this effectively ignores the
2529
- authentication in the spec for a single request.
2530
- :type _request_auth: dict, optional
2531
- :param _content_type: force content-type for the request.
2532
- :type _content_type: str, Optional
2533
- :param _headers: set to override the headers for a single
2534
- request; this effectively ignores the headers
2535
- in the spec for a single request.
2536
- :type _headers: dict, optional
2537
- :param _host_index: set to override the host_index for a single
2538
- request; this effectively ignores the host_index
2539
- in the spec for a single request.
2540
- :type _host_index: int, optional
2541
- :return: Returns the result object.
2542
- """ # noqa: E501
2543
-
2544
- _param = self._dataset_dataset_id_datapoints_texts_post_serialize(
2545
- dataset_id=dataset_id,
2546
- create_datapoint_from_text_sources_model=create_datapoint_from_text_sources_model,
2547
- _request_auth=_request_auth,
2548
- _content_type=_content_type,
2549
- _headers=_headers,
2550
- _host_index=_host_index
2551
- )
2552
-
2553
- _response_types_map: Dict[str, Optional[str]] = {
2554
- '200': "CreateDatapointResult",
2555
- }
2556
- response_data = self.api_client.call_api(
2557
- *_param,
2558
- _request_timeout=_request_timeout
2559
- )
2560
- response_data.read()
2561
- return self.api_client.response_deserialize(
2562
- response_data=response_data,
2563
- response_types_map=_response_types_map,
2564
- )
2565
-
2566
-
2567
- @validate_call
2568
- def dataset_dataset_id_datapoints_texts_post_without_preload_content(
2569
- self,
2570
- dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to create the datapoint in.")],
2571
- create_datapoint_from_text_sources_model: Annotated[Optional[CreateDatapointFromTextSourcesModel], Field(description="The body of the request.")] = None,
2572
- _request_timeout: Union[
2573
- None,
2574
- Annotated[StrictFloat, Field(gt=0)],
2575
- Tuple[
2576
- Annotated[StrictFloat, Field(gt=0)],
2577
- Annotated[StrictFloat, Field(gt=0)]
2578
- ]
2579
- ] = None,
2580
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2581
- _content_type: Optional[StrictStr] = None,
2582
- _headers: Optional[Dict[StrictStr, Any]] = None,
2583
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2584
- ) -> RESTResponseType:
2585
- """Creates a single datapoint from text sources.
2586
-
2587
- If multiple text sources are uploaded, a multi asset datapoint will be created.
2588
-
2589
- :param dataset_id: The id of the dataset to create the datapoint in. (required)
2590
- :type dataset_id: str
2591
- :param create_datapoint_from_text_sources_model: The body of the request.
2592
- :type create_datapoint_from_text_sources_model: CreateDatapointFromTextSourcesModel
2593
- :param _request_timeout: timeout setting for this request. If one
2594
- number provided, it will be total request
2595
- timeout. It can also be a pair (tuple) of
2596
- (connection, read) timeouts.
2597
- :type _request_timeout: int, tuple(int, int), optional
2598
- :param _request_auth: set to override the auth_settings for an a single
2599
- request; this effectively ignores the
2600
- authentication in the spec for a single request.
2601
- :type _request_auth: dict, optional
2602
- :param _content_type: force content-type for the request.
2603
- :type _content_type: str, Optional
2604
- :param _headers: set to override the headers for a single
2605
- request; this effectively ignores the headers
2606
- in the spec for a single request.
2607
- :type _headers: dict, optional
2608
- :param _host_index: set to override the host_index for a single
2609
- request; this effectively ignores the host_index
2610
- in the spec for a single request.
2611
- :type _host_index: int, optional
2612
- :return: Returns the result object.
2613
- """ # noqa: E501
2614
-
2615
- _param = self._dataset_dataset_id_datapoints_texts_post_serialize(
2616
- dataset_id=dataset_id,
2617
- create_datapoint_from_text_sources_model=create_datapoint_from_text_sources_model,
2618
- _request_auth=_request_auth,
2619
- _content_type=_content_type,
2620
- _headers=_headers,
2621
- _host_index=_host_index
2622
- )
2623
-
2624
- _response_types_map: Dict[str, Optional[str]] = {
2625
- '200': "CreateDatapointResult",
2626
- }
2627
- response_data = self.api_client.call_api(
2628
- *_param,
2629
- _request_timeout=_request_timeout
2630
- )
2631
- return response_data.response
2632
-
2633
-
2634
- def _dataset_dataset_id_datapoints_texts_post_serialize(
2635
- self,
2636
- dataset_id,
2637
- create_datapoint_from_text_sources_model,
2638
- _request_auth,
2639
- _content_type,
2640
- _headers,
2641
- _host_index,
2642
- ) -> RequestSerialized:
2643
-
2644
- _host = None
2645
-
2646
- _collection_formats: Dict[str, str] = {
2647
- }
2648
-
2649
- _path_params: Dict[str, str] = {}
2650
- _query_params: List[Tuple[str, str]] = []
2651
- _header_params: Dict[str, Optional[str]] = _headers or {}
2652
- _form_params: List[Tuple[str, str]] = []
2653
- _files: Dict[
2654
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2655
- ] = {}
2656
- _body_params: Optional[bytes] = None
2657
-
2658
- # process the path parameters
2659
- if dataset_id is not None:
2660
- _path_params['datasetId'] = dataset_id
2661
- # process the query parameters
2662
- # process the header parameters
2663
- # process the form parameters
2664
- # process the body parameter
2665
- if create_datapoint_from_text_sources_model is not None:
2666
- _body_params = create_datapoint_from_text_sources_model
2667
-
2668
-
2669
- # set the HTTP header `Accept`
2670
- if 'Accept' not in _header_params:
2671
- _header_params['Accept'] = self.api_client.select_header_accept(
2672
- [
2673
- 'text/plain',
2674
- 'application/json',
2675
- 'text/json'
2676
- ]
2677
- )
2678
-
2679
- # set the HTTP header `Content-Type`
2680
- if _content_type:
2681
- _header_params['Content-Type'] = _content_type
2682
- else:
2683
- _default_content_type = (
2684
- self.api_client.select_header_content_type(
2685
- [
2686
- 'application/json',
2687
- 'text/json',
2688
- 'application/*+json'
2689
- ]
2690
- )
2691
- )
2692
- if _default_content_type is not None:
2693
- _header_params['Content-Type'] = _default_content_type
2694
-
2695
- # authentication setting
2696
- _auth_settings: List[str] = [
2697
- 'bearer',
2698
- 'oauth2'
2699
- ]
2700
-
2701
- return self.api_client.param_serialize(
2702
- method='POST',
2703
- resource_path='/dataset/{datasetId}/datapoints/texts',
2704
- path_params=_path_params,
2705
- query_params=_query_params,
2706
- header_params=_header_params,
2707
- body=_body_params,
2708
- post_params=_form_params,
2709
- files=_files,
2710
- auth_settings=_auth_settings,
2711
- collection_formats=_collection_formats,
2712
- _host=_host,
2713
- _request_auth=_request_auth
2714
- )
2715
-
2716
-
2717
-
2718
-
2719
- @validate_call
2720
- def dataset_dataset_id_datapoints_urls_post(
2721
- self,
2722
- dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to create the datapoint in.")],
2723
- create_datapoint_from_urls_model: Annotated[Optional[CreateDatapointFromUrlsModel], Field(description="The body of the request.")] = None,
2724
- _request_timeout: Union[
2725
- None,
2726
- Annotated[StrictFloat, Field(gt=0)],
2727
- Tuple[
2728
- Annotated[StrictFloat, Field(gt=0)],
2729
- Annotated[StrictFloat, Field(gt=0)]
2730
- ]
2731
- ] = None,
2732
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2733
- _content_type: Optional[StrictStr] = None,
2734
- _headers: Optional[Dict[StrictStr, Any]] = None,
2735
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2736
- ) -> CreateDatapointResult:
2737
- """Creates a single datapoint where the assets are fetched from the specified urls.
2738
-
2739
- Passing in multiple urls will create a single datapoint with a MultiAsset. Each url will be fetched and stored as a sub-asset of the MultiAsset. <para /> If any of the urls are not accessible, the request will fail.
2740
-
2741
- :param dataset_id: The id of the dataset to create the datapoint in. (required)
2742
- :type dataset_id: str
2743
- :param create_datapoint_from_urls_model: The body of the request.
2744
- :type create_datapoint_from_urls_model: CreateDatapointFromUrlsModel
2745
- :param _request_timeout: timeout setting for this request. If one
2746
- number provided, it will be total request
2747
- timeout. It can also be a pair (tuple) of
2748
- (connection, read) timeouts.
2749
- :type _request_timeout: int, tuple(int, int), optional
2750
- :param _request_auth: set to override the auth_settings for an a single
2751
- request; this effectively ignores the
2752
- authentication in the spec for a single request.
2753
- :type _request_auth: dict, optional
2754
- :param _content_type: force content-type for the request.
2755
- :type _content_type: str, Optional
2756
- :param _headers: set to override the headers for a single
2757
- request; this effectively ignores the headers
2758
- in the spec for a single request.
2759
- :type _headers: dict, optional
2760
- :param _host_index: set to override the host_index for a single
2761
- request; this effectively ignores the host_index
2762
- in the spec for a single request.
2763
- :type _host_index: int, optional
2764
- :return: Returns the result object.
2765
- """ # noqa: E501
2766
-
2767
- _param = self._dataset_dataset_id_datapoints_urls_post_serialize(
2768
- dataset_id=dataset_id,
2769
- create_datapoint_from_urls_model=create_datapoint_from_urls_model,
2770
- _request_auth=_request_auth,
2771
- _content_type=_content_type,
2772
- _headers=_headers,
2773
- _host_index=_host_index
2774
- )
2775
-
2776
- _response_types_map: Dict[str, Optional[str]] = {
2777
- '200': "CreateDatapointResult",
2778
- }
2779
- response_data = self.api_client.call_api(
2780
- *_param,
2781
- _request_timeout=_request_timeout
2782
- )
2783
- response_data.read()
2784
- return self.api_client.response_deserialize(
2785
- response_data=response_data,
2786
- response_types_map=_response_types_map,
2787
- ).data
2788
-
2789
-
2790
- @validate_call
2791
- def dataset_dataset_id_datapoints_urls_post_with_http_info(
2792
- self,
2793
- dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to create the datapoint in.")],
2794
- create_datapoint_from_urls_model: Annotated[Optional[CreateDatapointFromUrlsModel], Field(description="The body of the request.")] = None,
2795
- _request_timeout: Union[
2796
- None,
2797
- Annotated[StrictFloat, Field(gt=0)],
2798
- Tuple[
2799
- Annotated[StrictFloat, Field(gt=0)],
2800
- Annotated[StrictFloat, Field(gt=0)]
2801
- ]
2802
- ] = None,
2803
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2804
- _content_type: Optional[StrictStr] = None,
2805
- _headers: Optional[Dict[StrictStr, Any]] = None,
2806
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2807
- ) -> ApiResponse[CreateDatapointResult]:
2808
- """Creates a single datapoint where the assets are fetched from the specified urls.
2809
-
2810
- Passing in multiple urls will create a single datapoint with a MultiAsset. Each url will be fetched and stored as a sub-asset of the MultiAsset. <para /> If any of the urls are not accessible, the request will fail.
2811
-
2812
- :param dataset_id: The id of the dataset to create the datapoint in. (required)
2813
- :type dataset_id: str
2814
- :param create_datapoint_from_urls_model: The body of the request.
2815
- :type create_datapoint_from_urls_model: CreateDatapointFromUrlsModel
2816
- :param _request_timeout: timeout setting for this request. If one
2817
- number provided, it will be total request
2818
- timeout. It can also be a pair (tuple) of
2819
- (connection, read) timeouts.
2820
- :type _request_timeout: int, tuple(int, int), optional
2821
- :param _request_auth: set to override the auth_settings for an a single
2822
- request; this effectively ignores the
2823
- authentication in the spec for a single request.
2824
- :type _request_auth: dict, optional
2825
- :param _content_type: force content-type for the request.
2826
- :type _content_type: str, Optional
2827
- :param _headers: set to override the headers for a single
2828
- request; this effectively ignores the headers
2829
- in the spec for a single request.
2830
- :type _headers: dict, optional
2831
- :param _host_index: set to override the host_index for a single
2832
- request; this effectively ignores the host_index
2833
- in the spec for a single request.
2834
- :type _host_index: int, optional
2835
- :return: Returns the result object.
2836
- """ # noqa: E501
2837
-
2838
- _param = self._dataset_dataset_id_datapoints_urls_post_serialize(
2839
- dataset_id=dataset_id,
2840
- create_datapoint_from_urls_model=create_datapoint_from_urls_model,
2841
- _request_auth=_request_auth,
2842
- _content_type=_content_type,
2843
- _headers=_headers,
2844
- _host_index=_host_index
2845
- )
2846
-
2847
- _response_types_map: Dict[str, Optional[str]] = {
2848
- '200': "CreateDatapointResult",
2849
- }
2850
- response_data = self.api_client.call_api(
2851
- *_param,
2852
- _request_timeout=_request_timeout
2853
- )
2854
- response_data.read()
2855
- return self.api_client.response_deserialize(
2856
- response_data=response_data,
2857
- response_types_map=_response_types_map,
2858
- )
2859
-
2860
-
2861
- @validate_call
2862
- def dataset_dataset_id_datapoints_urls_post_without_preload_content(
2863
- self,
2864
- dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to create the datapoint in.")],
2865
- create_datapoint_from_urls_model: Annotated[Optional[CreateDatapointFromUrlsModel], Field(description="The body of the request.")] = None,
2866
- _request_timeout: Union[
2867
- None,
2868
- Annotated[StrictFloat, Field(gt=0)],
2869
- Tuple[
2870
- Annotated[StrictFloat, Field(gt=0)],
2871
- Annotated[StrictFloat, Field(gt=0)]
2872
- ]
2873
- ] = None,
2874
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2875
- _content_type: Optional[StrictStr] = None,
2876
- _headers: Optional[Dict[StrictStr, Any]] = None,
2877
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2878
- ) -> RESTResponseType:
2879
- """Creates a single datapoint where the assets are fetched from the specified urls.
2880
-
2881
- Passing in multiple urls will create a single datapoint with a MultiAsset. Each url will be fetched and stored as a sub-asset of the MultiAsset. <para /> If any of the urls are not accessible, the request will fail.
2882
-
2883
- :param dataset_id: The id of the dataset to create the datapoint in. (required)
2884
- :type dataset_id: str
2885
- :param create_datapoint_from_urls_model: The body of the request.
2886
- :type create_datapoint_from_urls_model: CreateDatapointFromUrlsModel
2887
- :param _request_timeout: timeout setting for this request. If one
2888
- number provided, it will be total request
2889
- timeout. It can also be a pair (tuple) of
2890
- (connection, read) timeouts.
2891
- :type _request_timeout: int, tuple(int, int), optional
2892
- :param _request_auth: set to override the auth_settings for an a single
2893
- request; this effectively ignores the
2894
- authentication in the spec for a single request.
2895
- :type _request_auth: dict, optional
2896
- :param _content_type: force content-type for the request.
2897
- :type _content_type: str, Optional
2898
- :param _headers: set to override the headers for a single
2899
- request; this effectively ignores the headers
2900
- in the spec for a single request.
2901
- :type _headers: dict, optional
2902
- :param _host_index: set to override the host_index for a single
2903
- request; this effectively ignores the host_index
2904
- in the spec for a single request.
2905
- :type _host_index: int, optional
2906
- :return: Returns the result object.
2907
- """ # noqa: E501
2908
-
2909
- _param = self._dataset_dataset_id_datapoints_urls_post_serialize(
2910
- dataset_id=dataset_id,
2911
- create_datapoint_from_urls_model=create_datapoint_from_urls_model,
2912
- _request_auth=_request_auth,
2913
- _content_type=_content_type,
2914
- _headers=_headers,
2915
- _host_index=_host_index
2916
- )
2917
-
2918
- _response_types_map: Dict[str, Optional[str]] = {
2919
- '200': "CreateDatapointResult",
2920
- }
2921
- response_data = self.api_client.call_api(
2922
- *_param,
2923
- _request_timeout=_request_timeout
2924
- )
2925
- return response_data.response
2926
-
2927
-
2928
- def _dataset_dataset_id_datapoints_urls_post_serialize(
2929
- self,
2930
- dataset_id,
2931
- create_datapoint_from_urls_model,
2932
- _request_auth,
2933
- _content_type,
2934
- _headers,
2935
- _host_index,
2936
- ) -> RequestSerialized:
2937
-
2938
- _host = None
2939
-
2940
- _collection_formats: Dict[str, str] = {
2941
- }
2942
-
2943
- _path_params: Dict[str, str] = {}
2944
- _query_params: List[Tuple[str, str]] = []
2945
- _header_params: Dict[str, Optional[str]] = _headers or {}
2946
- _form_params: List[Tuple[str, str]] = []
2947
- _files: Dict[
2948
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2949
- ] = {}
2950
- _body_params: Optional[bytes] = None
2951
-
2952
- # process the path parameters
2953
- if dataset_id is not None:
2954
- _path_params['datasetId'] = dataset_id
2955
- # process the query parameters
2956
- # process the header parameters
2957
- # process the form parameters
2958
- # process the body parameter
2959
- if create_datapoint_from_urls_model is not None:
2960
- _body_params = create_datapoint_from_urls_model
2961
-
2962
-
2963
- # set the HTTP header `Accept`
2964
- if 'Accept' not in _header_params:
2965
- _header_params['Accept'] = self.api_client.select_header_accept(
2966
- [
2967
- 'text/plain',
2968
- 'application/json',
2969
- 'text/json'
2970
- ]
2971
- )
2972
-
2973
- # set the HTTP header `Content-Type`
2974
- if _content_type:
2975
- _header_params['Content-Type'] = _content_type
2976
- else:
2977
- _default_content_type = (
2978
- self.api_client.select_header_content_type(
2979
- [
2980
- 'application/json',
2981
- 'text/json',
2982
- 'application/*+json'
2983
- ]
2984
- )
2985
- )
2986
- if _default_content_type is not None:
2987
- _header_params['Content-Type'] = _default_content_type
2988
-
2989
- # authentication setting
2990
- _auth_settings: List[str] = [
2991
- 'bearer',
2992
- 'oauth2'
2993
- ]
2994
-
2995
- return self.api_client.param_serialize(
2996
- method='POST',
2997
- resource_path='/dataset/{datasetId}/datapoints/urls',
2998
- path_params=_path_params,
2999
- query_params=_query_params,
3000
- header_params=_header_params,
3001
- body=_body_params,
3002
- post_params=_form_params,
3003
- files=_files,
3004
- auth_settings=_auth_settings,
3005
- collection_formats=_collection_formats,
3006
- _host=_host,
3007
- _request_auth=_request_auth
3008
- )
3009
-
3010
-
3011
-
3012
-
3013
- @validate_call
3014
- def dataset_dataset_id_get(
3015
- self,
3016
- dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get.")],
3017
- _request_timeout: Union[
3018
- None,
3019
- Annotated[StrictFloat, Field(gt=0)],
3020
- Tuple[
3021
- Annotated[StrictFloat, Field(gt=0)],
3022
- Annotated[StrictFloat, Field(gt=0)]
3023
- ]
3024
- ] = None,
3025
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
3026
- _content_type: Optional[StrictStr] = None,
3027
- _headers: Optional[Dict[StrictStr, Any]] = None,
3028
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3029
- ) -> GetDatasetByIdResult:
3030
- """Gets a dataset by its id.
3031
-
3032
-
3033
- :param dataset_id: The id of the dataset to get. (required)
3034
- :type dataset_id: str
3035
- :param _request_timeout: timeout setting for this request. If one
3036
- number provided, it will be total request
3037
- timeout. It can also be a pair (tuple) of
3038
- (connection, read) timeouts.
3039
- :type _request_timeout: int, tuple(int, int), optional
3040
- :param _request_auth: set to override the auth_settings for an a single
3041
- request; this effectively ignores the
3042
- authentication in the spec for a single request.
3043
- :type _request_auth: dict, optional
3044
- :param _content_type: force content-type for the request.
3045
- :type _content_type: str, Optional
3046
- :param _headers: set to override the headers for a single
3047
- request; this effectively ignores the headers
3048
- in the spec for a single request.
3049
- :type _headers: dict, optional
3050
- :param _host_index: set to override the host_index for a single
3051
- request; this effectively ignores the host_index
3052
- in the spec for a single request.
3053
- :type _host_index: int, optional
3054
- :return: Returns the result object.
3055
- """ # noqa: E501
3056
-
3057
- _param = self._dataset_dataset_id_get_serialize(
3058
- dataset_id=dataset_id,
3059
- _request_auth=_request_auth,
3060
- _content_type=_content_type,
3061
- _headers=_headers,
3062
- _host_index=_host_index
3063
- )
3064
-
3065
- _response_types_map: Dict[str, Optional[str]] = {
3066
- '200': "GetDatasetByIdResult",
3067
- }
3068
- response_data = self.api_client.call_api(
3069
- *_param,
3070
- _request_timeout=_request_timeout
3071
- )
3072
- response_data.read()
3073
- return self.api_client.response_deserialize(
3074
- response_data=response_data,
3075
- response_types_map=_response_types_map,
3076
- ).data
3077
-
3078
-
3079
- @validate_call
3080
- def dataset_dataset_id_get_with_http_info(
3081
- self,
3082
- dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get.")],
3083
- _request_timeout: Union[
3084
- None,
3085
- Annotated[StrictFloat, Field(gt=0)],
3086
- Tuple[
3087
- Annotated[StrictFloat, Field(gt=0)],
3088
- Annotated[StrictFloat, Field(gt=0)]
3089
- ]
3090
- ] = None,
3091
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
3092
- _content_type: Optional[StrictStr] = None,
3093
- _headers: Optional[Dict[StrictStr, Any]] = None,
3094
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3095
- ) -> ApiResponse[GetDatasetByIdResult]:
3096
- """Gets a dataset by its id.
3097
-
3098
-
3099
- :param dataset_id: The id of the dataset to get. (required)
1307
+ :param dataset_id: The id of the dataset (required)
3100
1308
  :type dataset_id: str
1309
+ :param file: The files to upload from the local storage. Must be either images or videos.
1310
+ :type file: List[bytearray]
1311
+ :param text: The texts to upload. The length limit is set at 256 characters per text.
1312
+ :type text: List[str]
1313
+ :param url: Creates an asset from a url. The url needs to point to a publicly accessible resource. The server will download the resource and store it as an asset in the background. <remarks> Additionally, to the urls having to be publicly accessible, they need to support HTTP HEAD requests. </remarks>
1314
+ :type url: List[str]
1315
+ :param metadata: Optional metadata to attach to the datapoint.
1316
+ :type metadata: List[DatasetDatasetIdDatapointsPostRequestMetadataInner]
1317
+ :param sort_index: The index will be used to keep the datapoints in order. Useful if upload is parallelized
1318
+ :type sort_index: int
3101
1319
  :param _request_timeout: timeout setting for this request. If one
3102
1320
  number provided, it will be total request
3103
1321
  timeout. It can also be a pair (tuple) of
@@ -3120,8 +1338,13 @@ class DatasetApi:
3120
1338
  :return: Returns the result object.
3121
1339
  """ # noqa: E501
3122
1340
 
3123
- _param = self._dataset_dataset_id_get_serialize(
1341
+ _param = self._dataset_dataset_id_datapoints_post_serialize(
3124
1342
  dataset_id=dataset_id,
1343
+ file=file,
1344
+ text=text,
1345
+ url=url,
1346
+ metadata=metadata,
1347
+ sort_index=sort_index,
3125
1348
  _request_auth=_request_auth,
3126
1349
  _content_type=_content_type,
3127
1350
  _headers=_headers,
@@ -3129,7 +1352,7 @@ class DatasetApi:
3129
1352
  )
3130
1353
 
3131
1354
  _response_types_map: Dict[str, Optional[str]] = {
3132
- '200': "GetDatasetByIdResult",
1355
+ '200': "CreateDatapointResult",
3133
1356
  }
3134
1357
  response_data = self.api_client.call_api(
3135
1358
  *_param,
@@ -3143,9 +1366,14 @@ class DatasetApi:
3143
1366
 
3144
1367
 
3145
1368
  @validate_call
3146
- def dataset_dataset_id_get_without_preload_content(
1369
+ def dataset_dataset_id_datapoints_post_without_preload_content(
3147
1370
  self,
3148
- dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get.")],
1371
+ dataset_id: Annotated[StrictStr, Field(description="The id of the dataset")],
1372
+ file: Annotated[Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]], Field(description="The files to upload from the local storage. Must be either images or videos.")] = None,
1373
+ text: Annotated[Optional[List[StrictStr]], Field(description="The texts to upload. The length limit is set at 256 characters per text.")] = None,
1374
+ url: Annotated[Optional[List[StrictStr]], Field(description="Creates an asset from a url. The url needs to point to a publicly accessible resource. The server will download the resource and store it as an asset in the background. <remarks> Additionally, to the urls having to be publicly accessible, they need to support HTTP HEAD requests. </remarks>")] = None,
1375
+ metadata: Annotated[Optional[List[DatasetDatasetIdDatapointsPostRequestMetadataInner]], Field(description="Optional metadata to attach to the datapoint.")] = None,
1376
+ sort_index: Annotated[Optional[StrictInt], Field(description="The index will be used to keep the datapoints in order. Useful if upload is parallelized")] = None,
3149
1377
  _request_timeout: Union[
3150
1378
  None,
3151
1379
  Annotated[StrictFloat, Field(gt=0)],
@@ -3159,11 +1387,22 @@ class DatasetApi:
3159
1387
  _headers: Optional[Dict[StrictStr, Any]] = None,
3160
1388
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3161
1389
  ) -> RESTResponseType:
3162
- """Gets a dataset by its id.
1390
+ """Creates a new datapoint from multiple possible sources.
3163
1391
 
1392
+ Multiple files, texts, and urls can be provided. If multiple files are provided, a multi-asset datapoint will be created, meaning that all sources provided will be stored as sub-assets of the datapoint. If multiple datapoints are desired, one should not pass in multiple files, texts, or urls, instead, one should call this endpoint multiple times with the desired file, text, or url per datapoint. The request must be a multipart form request, where each parameter is sent as a separate part. The files, texts, and urls can be mixed and matched as needed, however, at least one of them must be provided, and one should make sure that mixing them makes sense for the dataset.
3164
1393
 
3165
- :param dataset_id: The id of the dataset to get. (required)
1394
+ :param dataset_id: The id of the dataset (required)
3166
1395
  :type dataset_id: str
1396
+ :param file: The files to upload from the local storage. Must be either images or videos.
1397
+ :type file: List[bytearray]
1398
+ :param text: The texts to upload. The length limit is set at 256 characters per text.
1399
+ :type text: List[str]
1400
+ :param url: Creates an asset from a url. The url needs to point to a publicly accessible resource. The server will download the resource and store it as an asset in the background. <remarks> Additionally, to the urls having to be publicly accessible, they need to support HTTP HEAD requests. </remarks>
1401
+ :type url: List[str]
1402
+ :param metadata: Optional metadata to attach to the datapoint.
1403
+ :type metadata: List[DatasetDatasetIdDatapointsPostRequestMetadataInner]
1404
+ :param sort_index: The index will be used to keep the datapoints in order. Useful if upload is parallelized
1405
+ :type sort_index: int
3167
1406
  :param _request_timeout: timeout setting for this request. If one
3168
1407
  number provided, it will be total request
3169
1408
  timeout. It can also be a pair (tuple) of
@@ -3186,8 +1425,13 @@ class DatasetApi:
3186
1425
  :return: Returns the result object.
3187
1426
  """ # noqa: E501
3188
1427
 
3189
- _param = self._dataset_dataset_id_get_serialize(
1428
+ _param = self._dataset_dataset_id_datapoints_post_serialize(
3190
1429
  dataset_id=dataset_id,
1430
+ file=file,
1431
+ text=text,
1432
+ url=url,
1433
+ metadata=metadata,
1434
+ sort_index=sort_index,
3191
1435
  _request_auth=_request_auth,
3192
1436
  _content_type=_content_type,
3193
1437
  _headers=_headers,
@@ -3195,7 +1439,7 @@ class DatasetApi:
3195
1439
  )
3196
1440
 
3197
1441
  _response_types_map: Dict[str, Optional[str]] = {
3198
- '200': "GetDatasetByIdResult",
1442
+ '200': "CreateDatapointResult",
3199
1443
  }
3200
1444
  response_data = self.api_client.call_api(
3201
1445
  *_param,
@@ -3204,9 +1448,14 @@ class DatasetApi:
3204
1448
  return response_data.response
3205
1449
 
3206
1450
 
3207
- def _dataset_dataset_id_get_serialize(
1451
+ def _dataset_dataset_id_datapoints_post_serialize(
3208
1452
  self,
3209
1453
  dataset_id,
1454
+ file,
1455
+ text,
1456
+ url,
1457
+ metadata,
1458
+ sort_index,
3210
1459
  _request_auth,
3211
1460
  _content_type,
3212
1461
  _headers,
@@ -3216,6 +1465,10 @@ class DatasetApi:
3216
1465
  _host = None
3217
1466
 
3218
1467
  _collection_formats: Dict[str, str] = {
1468
+ 'file': 'csv',
1469
+ 'text': 'multi',
1470
+ 'url': 'multi',
1471
+ 'metadata': 'multi',
3219
1472
  }
3220
1473
 
3221
1474
  _path_params: Dict[str, str] = {}
@@ -3233,6 +1486,16 @@ class DatasetApi:
3233
1486
  # process the query parameters
3234
1487
  # process the header parameters
3235
1488
  # process the form parameters
1489
+ if file is not None:
1490
+ _files['file'] = file
1491
+ if text is not None:
1492
+ _form_params.append(('text', text))
1493
+ if url is not None:
1494
+ _form_params.append(('url', url))
1495
+ if metadata is not None:
1496
+ _form_params.append(('metadata', metadata))
1497
+ if sort_index is not None:
1498
+ _form_params.append(('sortIndex', sort_index))
3236
1499
  # process the body parameter
3237
1500
 
3238
1501
 
@@ -3246,6 +1509,19 @@ class DatasetApi:
3246
1509
  ]
3247
1510
  )
3248
1511
 
1512
+ # set the HTTP header `Content-Type`
1513
+ if _content_type:
1514
+ _header_params['Content-Type'] = _content_type
1515
+ else:
1516
+ _default_content_type = (
1517
+ self.api_client.select_header_content_type(
1518
+ [
1519
+ 'multipart/form-data'
1520
+ ]
1521
+ )
1522
+ )
1523
+ if _default_content_type is not None:
1524
+ _header_params['Content-Type'] = _default_content_type
3249
1525
 
3250
1526
  # authentication setting
3251
1527
  _auth_settings: List[str] = [
@@ -3254,8 +1530,8 @@ class DatasetApi:
3254
1530
  ]
3255
1531
 
3256
1532
  return self.api_client.param_serialize(
3257
- method='GET',
3258
- resource_path='/dataset/{datasetId}',
1533
+ method='POST',
1534
+ resource_path='/dataset/{datasetId}/datapoints',
3259
1535
  path_params=_path_params,
3260
1536
  query_params=_query_params,
3261
1537
  header_params=_header_params,
@@ -3272,10 +1548,10 @@ class DatasetApi:
3272
1548
 
3273
1549
 
3274
1550
  @validate_call
3275
- def dataset_dataset_id_name_patch(
1551
+ def dataset_dataset_id_datapoints_s3_post(
3276
1552
  self,
3277
- dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to update.")],
3278
- update_dataset_name_model: Annotated[Optional[UpdateDatasetNameModel], Field(description="The body of the request.")] = None,
1553
+ dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to upload the files to.")],
1554
+ create_datapoints_from_s3_bucket_model: Annotated[Optional[CreateDatapointsFromS3BucketModel], Field(description="The body of the request.")] = None,
3279
1555
  _request_timeout: Union[
3280
1556
  None,
3281
1557
  Annotated[StrictFloat, Field(gt=0)],
@@ -3288,14 +1564,15 @@ class DatasetApi:
3288
1564
  _content_type: Optional[StrictStr] = None,
3289
1565
  _headers: Optional[Dict[StrictStr, Any]] = None,
3290
1566
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3291
- ) -> None:
3292
- """Updates the name of a dataset.
1567
+ ) -> UploadFromS3Result:
1568
+ """Uploads files from an S3 bucket to a dataset.
3293
1569
 
1570
+ A new datapoint will be created for each file in the bucket.
3294
1571
 
3295
- :param dataset_id: The id of the dataset to update. (required)
1572
+ :param dataset_id: The id of the dataset to upload the files to. (required)
3296
1573
  :type dataset_id: str
3297
- :param update_dataset_name_model: The body of the request.
3298
- :type update_dataset_name_model: UpdateDatasetNameModel
1574
+ :param create_datapoints_from_s3_bucket_model: The body of the request.
1575
+ :type create_datapoints_from_s3_bucket_model: CreateDatapointsFromS3BucketModel
3299
1576
  :param _request_timeout: timeout setting for this request. If one
3300
1577
  number provided, it will be total request
3301
1578
  timeout. It can also be a pair (tuple) of
@@ -3318,9 +1595,9 @@ class DatasetApi:
3318
1595
  :return: Returns the result object.
3319
1596
  """ # noqa: E501
3320
1597
 
3321
- _param = self._dataset_dataset_id_name_patch_serialize(
1598
+ _param = self._dataset_dataset_id_datapoints_s3_post_serialize(
3322
1599
  dataset_id=dataset_id,
3323
- update_dataset_name_model=update_dataset_name_model,
1600
+ create_datapoints_from_s3_bucket_model=create_datapoints_from_s3_bucket_model,
3324
1601
  _request_auth=_request_auth,
3325
1602
  _content_type=_content_type,
3326
1603
  _headers=_headers,
@@ -3328,7 +1605,7 @@ class DatasetApi:
3328
1605
  )
3329
1606
 
3330
1607
  _response_types_map: Dict[str, Optional[str]] = {
3331
- '204': None,
1608
+ '200': "UploadFromS3Result",
3332
1609
  }
3333
1610
  response_data = self.api_client.call_api(
3334
1611
  *_param,
@@ -3342,10 +1619,10 @@ class DatasetApi:
3342
1619
 
3343
1620
 
3344
1621
  @validate_call
3345
- def dataset_dataset_id_name_patch_with_http_info(
1622
+ def dataset_dataset_id_datapoints_s3_post_with_http_info(
3346
1623
  self,
3347
- dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to update.")],
3348
- update_dataset_name_model: Annotated[Optional[UpdateDatasetNameModel], Field(description="The body of the request.")] = None,
1624
+ dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to upload the files to.")],
1625
+ create_datapoints_from_s3_bucket_model: Annotated[Optional[CreateDatapointsFromS3BucketModel], Field(description="The body of the request.")] = None,
3349
1626
  _request_timeout: Union[
3350
1627
  None,
3351
1628
  Annotated[StrictFloat, Field(gt=0)],
@@ -3358,14 +1635,15 @@ class DatasetApi:
3358
1635
  _content_type: Optional[StrictStr] = None,
3359
1636
  _headers: Optional[Dict[StrictStr, Any]] = None,
3360
1637
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3361
- ) -> ApiResponse[None]:
3362
- """Updates the name of a dataset.
1638
+ ) -> ApiResponse[UploadFromS3Result]:
1639
+ """Uploads files from an S3 bucket to a dataset.
3363
1640
 
1641
+ A new datapoint will be created for each file in the bucket.
3364
1642
 
3365
- :param dataset_id: The id of the dataset to update. (required)
1643
+ :param dataset_id: The id of the dataset to upload the files to. (required)
3366
1644
  :type dataset_id: str
3367
- :param update_dataset_name_model: The body of the request.
3368
- :type update_dataset_name_model: UpdateDatasetNameModel
1645
+ :param create_datapoints_from_s3_bucket_model: The body of the request.
1646
+ :type create_datapoints_from_s3_bucket_model: CreateDatapointsFromS3BucketModel
3369
1647
  :param _request_timeout: timeout setting for this request. If one
3370
1648
  number provided, it will be total request
3371
1649
  timeout. It can also be a pair (tuple) of
@@ -3388,9 +1666,9 @@ class DatasetApi:
3388
1666
  :return: Returns the result object.
3389
1667
  """ # noqa: E501
3390
1668
 
3391
- _param = self._dataset_dataset_id_name_patch_serialize(
1669
+ _param = self._dataset_dataset_id_datapoints_s3_post_serialize(
3392
1670
  dataset_id=dataset_id,
3393
- update_dataset_name_model=update_dataset_name_model,
1671
+ create_datapoints_from_s3_bucket_model=create_datapoints_from_s3_bucket_model,
3394
1672
  _request_auth=_request_auth,
3395
1673
  _content_type=_content_type,
3396
1674
  _headers=_headers,
@@ -3398,7 +1676,7 @@ class DatasetApi:
3398
1676
  )
3399
1677
 
3400
1678
  _response_types_map: Dict[str, Optional[str]] = {
3401
- '204': None,
1679
+ '200': "UploadFromS3Result",
3402
1680
  }
3403
1681
  response_data = self.api_client.call_api(
3404
1682
  *_param,
@@ -3412,10 +1690,10 @@ class DatasetApi:
3412
1690
 
3413
1691
 
3414
1692
  @validate_call
3415
- def dataset_dataset_id_name_patch_without_preload_content(
1693
+ def dataset_dataset_id_datapoints_s3_post_without_preload_content(
3416
1694
  self,
3417
- dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to update.")],
3418
- update_dataset_name_model: Annotated[Optional[UpdateDatasetNameModel], Field(description="The body of the request.")] = None,
1695
+ dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to upload the files to.")],
1696
+ create_datapoints_from_s3_bucket_model: Annotated[Optional[CreateDatapointsFromS3BucketModel], Field(description="The body of the request.")] = None,
3419
1697
  _request_timeout: Union[
3420
1698
  None,
3421
1699
  Annotated[StrictFloat, Field(gt=0)],
@@ -3429,13 +1707,14 @@ class DatasetApi:
3429
1707
  _headers: Optional[Dict[StrictStr, Any]] = None,
3430
1708
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3431
1709
  ) -> RESTResponseType:
3432
- """Updates the name of a dataset.
1710
+ """Uploads files from an S3 bucket to a dataset.
3433
1711
 
1712
+ A new datapoint will be created for each file in the bucket.
3434
1713
 
3435
- :param dataset_id: The id of the dataset to update. (required)
1714
+ :param dataset_id: The id of the dataset to upload the files to. (required)
3436
1715
  :type dataset_id: str
3437
- :param update_dataset_name_model: The body of the request.
3438
- :type update_dataset_name_model: UpdateDatasetNameModel
1716
+ :param create_datapoints_from_s3_bucket_model: The body of the request.
1717
+ :type create_datapoints_from_s3_bucket_model: CreateDatapointsFromS3BucketModel
3439
1718
  :param _request_timeout: timeout setting for this request. If one
3440
1719
  number provided, it will be total request
3441
1720
  timeout. It can also be a pair (tuple) of
@@ -3458,9 +1737,9 @@ class DatasetApi:
3458
1737
  :return: Returns the result object.
3459
1738
  """ # noqa: E501
3460
1739
 
3461
- _param = self._dataset_dataset_id_name_patch_serialize(
1740
+ _param = self._dataset_dataset_id_datapoints_s3_post_serialize(
3462
1741
  dataset_id=dataset_id,
3463
- update_dataset_name_model=update_dataset_name_model,
1742
+ create_datapoints_from_s3_bucket_model=create_datapoints_from_s3_bucket_model,
3464
1743
  _request_auth=_request_auth,
3465
1744
  _content_type=_content_type,
3466
1745
  _headers=_headers,
@@ -3468,7 +1747,7 @@ class DatasetApi:
3468
1747
  )
3469
1748
 
3470
1749
  _response_types_map: Dict[str, Optional[str]] = {
3471
- '204': None,
1750
+ '200': "UploadFromS3Result",
3472
1751
  }
3473
1752
  response_data = self.api_client.call_api(
3474
1753
  *_param,
@@ -3477,10 +1756,10 @@ class DatasetApi:
3477
1756
  return response_data.response
3478
1757
 
3479
1758
 
3480
- def _dataset_dataset_id_name_patch_serialize(
1759
+ def _dataset_dataset_id_datapoints_s3_post_serialize(
3481
1760
  self,
3482
1761
  dataset_id,
3483
- update_dataset_name_model,
1762
+ create_datapoints_from_s3_bucket_model,
3484
1763
  _request_auth,
3485
1764
  _content_type,
3486
1765
  _headers,
@@ -3508,10 +1787,19 @@ class DatasetApi:
3508
1787
  # process the header parameters
3509
1788
  # process the form parameters
3510
1789
  # process the body parameter
3511
- if update_dataset_name_model is not None:
3512
- _body_params = update_dataset_name_model
1790
+ if create_datapoints_from_s3_bucket_model is not None:
1791
+ _body_params = create_datapoints_from_s3_bucket_model
3513
1792
 
3514
1793
 
1794
+ # set the HTTP header `Accept`
1795
+ if 'Accept' not in _header_params:
1796
+ _header_params['Accept'] = self.api_client.select_header_accept(
1797
+ [
1798
+ 'text/plain',
1799
+ 'application/json',
1800
+ 'text/json'
1801
+ ]
1802
+ )
3515
1803
 
3516
1804
  # set the HTTP header `Content-Type`
3517
1805
  if _content_type:
@@ -3536,8 +1824,8 @@ class DatasetApi:
3536
1824
  ]
3537
1825
 
3538
1826
  return self.api_client.param_serialize(
3539
- method='PATCH',
3540
- resource_path='/dataset/{datasetId}/name',
1827
+ method='POST',
1828
+ resource_path='/dataset/{datasetId}/datapoints/s3',
3541
1829
  path_params=_path_params,
3542
1830
  query_params=_query_params,
3543
1831
  header_params=_header_params,
@@ -3554,9 +1842,10 @@ class DatasetApi:
3554
1842
 
3555
1843
 
3556
1844
  @validate_call
3557
- def dataset_dataset_id_progress_get(
1845
+ def dataset_dataset_id_datapoints_texts_post(
3558
1846
  self,
3559
- dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get the progress of.")],
1847
+ dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to create the datapoint in.")],
1848
+ create_datapoint_from_text_sources_model: Annotated[Optional[CreateDatapointFromTextSourcesModel], Field(description="The body of the request.")] = None,
3560
1849
  _request_timeout: Union[
3561
1850
  None,
3562
1851
  Annotated[StrictFloat, Field(gt=0)],
@@ -3569,12 +1858,15 @@ class DatasetApi:
3569
1858
  _content_type: Optional[StrictStr] = None,
3570
1859
  _headers: Optional[Dict[StrictStr, Any]] = None,
3571
1860
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3572
- ) -> GetDatasetProgressResult:
3573
- """Gets the upload progress of a dataset.
1861
+ ) -> CreateDatapointResult:
1862
+ """Creates a single datapoint from text sources.
3574
1863
 
1864
+ If multiple text sources are uploaded, a multi asset datapoint will be created.
3575
1865
 
3576
- :param dataset_id: The id of the dataset to get the progress of. (required)
1866
+ :param dataset_id: The id of the dataset to create the datapoint in. (required)
3577
1867
  :type dataset_id: str
1868
+ :param create_datapoint_from_text_sources_model: The body of the request.
1869
+ :type create_datapoint_from_text_sources_model: CreateDatapointFromTextSourcesModel
3578
1870
  :param _request_timeout: timeout setting for this request. If one
3579
1871
  number provided, it will be total request
3580
1872
  timeout. It can also be a pair (tuple) of
@@ -3597,8 +1889,9 @@ class DatasetApi:
3597
1889
  :return: Returns the result object.
3598
1890
  """ # noqa: E501
3599
1891
 
3600
- _param = self._dataset_dataset_id_progress_get_serialize(
1892
+ _param = self._dataset_dataset_id_datapoints_texts_post_serialize(
3601
1893
  dataset_id=dataset_id,
1894
+ create_datapoint_from_text_sources_model=create_datapoint_from_text_sources_model,
3602
1895
  _request_auth=_request_auth,
3603
1896
  _content_type=_content_type,
3604
1897
  _headers=_headers,
@@ -3606,7 +1899,7 @@ class DatasetApi:
3606
1899
  )
3607
1900
 
3608
1901
  _response_types_map: Dict[str, Optional[str]] = {
3609
- '200': "GetDatasetProgressResult",
1902
+ '200': "CreateDatapointResult",
3610
1903
  }
3611
1904
  response_data = self.api_client.call_api(
3612
1905
  *_param,
@@ -3620,9 +1913,10 @@ class DatasetApi:
3620
1913
 
3621
1914
 
3622
1915
  @validate_call
3623
- def dataset_dataset_id_progress_get_with_http_info(
1916
+ def dataset_dataset_id_datapoints_texts_post_with_http_info(
3624
1917
  self,
3625
- dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get the progress of.")],
1918
+ dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to create the datapoint in.")],
1919
+ create_datapoint_from_text_sources_model: Annotated[Optional[CreateDatapointFromTextSourcesModel], Field(description="The body of the request.")] = None,
3626
1920
  _request_timeout: Union[
3627
1921
  None,
3628
1922
  Annotated[StrictFloat, Field(gt=0)],
@@ -3635,12 +1929,15 @@ class DatasetApi:
3635
1929
  _content_type: Optional[StrictStr] = None,
3636
1930
  _headers: Optional[Dict[StrictStr, Any]] = None,
3637
1931
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3638
- ) -> ApiResponse[GetDatasetProgressResult]:
3639
- """Gets the upload progress of a dataset.
1932
+ ) -> ApiResponse[CreateDatapointResult]:
1933
+ """Creates a single datapoint from text sources.
3640
1934
 
1935
+ If multiple text sources are uploaded, a multi asset datapoint will be created.
3641
1936
 
3642
- :param dataset_id: The id of the dataset to get the progress of. (required)
1937
+ :param dataset_id: The id of the dataset to create the datapoint in. (required)
3643
1938
  :type dataset_id: str
1939
+ :param create_datapoint_from_text_sources_model: The body of the request.
1940
+ :type create_datapoint_from_text_sources_model: CreateDatapointFromTextSourcesModel
3644
1941
  :param _request_timeout: timeout setting for this request. If one
3645
1942
  number provided, it will be total request
3646
1943
  timeout. It can also be a pair (tuple) of
@@ -3663,8 +1960,9 @@ class DatasetApi:
3663
1960
  :return: Returns the result object.
3664
1961
  """ # noqa: E501
3665
1962
 
3666
- _param = self._dataset_dataset_id_progress_get_serialize(
1963
+ _param = self._dataset_dataset_id_datapoints_texts_post_serialize(
3667
1964
  dataset_id=dataset_id,
1965
+ create_datapoint_from_text_sources_model=create_datapoint_from_text_sources_model,
3668
1966
  _request_auth=_request_auth,
3669
1967
  _content_type=_content_type,
3670
1968
  _headers=_headers,
@@ -3672,7 +1970,7 @@ class DatasetApi:
3672
1970
  )
3673
1971
 
3674
1972
  _response_types_map: Dict[str, Optional[str]] = {
3675
- '200': "GetDatasetProgressResult",
1973
+ '200': "CreateDatapointResult",
3676
1974
  }
3677
1975
  response_data = self.api_client.call_api(
3678
1976
  *_param,
@@ -3686,9 +1984,10 @@ class DatasetApi:
3686
1984
 
3687
1985
 
3688
1986
  @validate_call
3689
- def dataset_dataset_id_progress_get_without_preload_content(
1987
+ def dataset_dataset_id_datapoints_texts_post_without_preload_content(
3690
1988
  self,
3691
- dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get the progress of.")],
1989
+ dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to create the datapoint in.")],
1990
+ create_datapoint_from_text_sources_model: Annotated[Optional[CreateDatapointFromTextSourcesModel], Field(description="The body of the request.")] = None,
3692
1991
  _request_timeout: Union[
3693
1992
  None,
3694
1993
  Annotated[StrictFloat, Field(gt=0)],
@@ -3702,11 +2001,14 @@ class DatasetApi:
3702
2001
  _headers: Optional[Dict[StrictStr, Any]] = None,
3703
2002
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3704
2003
  ) -> RESTResponseType:
3705
- """Gets the upload progress of a dataset.
2004
+ """Creates a single datapoint from text sources.
3706
2005
 
2006
+ If multiple text sources are uploaded, a multi asset datapoint will be created.
3707
2007
 
3708
- :param dataset_id: The id of the dataset to get the progress of. (required)
2008
+ :param dataset_id: The id of the dataset to create the datapoint in. (required)
3709
2009
  :type dataset_id: str
2010
+ :param create_datapoint_from_text_sources_model: The body of the request.
2011
+ :type create_datapoint_from_text_sources_model: CreateDatapointFromTextSourcesModel
3710
2012
  :param _request_timeout: timeout setting for this request. If one
3711
2013
  number provided, it will be total request
3712
2014
  timeout. It can also be a pair (tuple) of
@@ -3729,8 +2031,9 @@ class DatasetApi:
3729
2031
  :return: Returns the result object.
3730
2032
  """ # noqa: E501
3731
2033
 
3732
- _param = self._dataset_dataset_id_progress_get_serialize(
2034
+ _param = self._dataset_dataset_id_datapoints_texts_post_serialize(
3733
2035
  dataset_id=dataset_id,
2036
+ create_datapoint_from_text_sources_model=create_datapoint_from_text_sources_model,
3734
2037
  _request_auth=_request_auth,
3735
2038
  _content_type=_content_type,
3736
2039
  _headers=_headers,
@@ -3738,7 +2041,7 @@ class DatasetApi:
3738
2041
  )
3739
2042
 
3740
2043
  _response_types_map: Dict[str, Optional[str]] = {
3741
- '200': "GetDatasetProgressResult",
2044
+ '200': "CreateDatapointResult",
3742
2045
  }
3743
2046
  response_data = self.api_client.call_api(
3744
2047
  *_param,
@@ -3747,9 +2050,10 @@ class DatasetApi:
3747
2050
  return response_data.response
3748
2051
 
3749
2052
 
3750
- def _dataset_dataset_id_progress_get_serialize(
2053
+ def _dataset_dataset_id_datapoints_texts_post_serialize(
3751
2054
  self,
3752
2055
  dataset_id,
2056
+ create_datapoint_from_text_sources_model,
3753
2057
  _request_auth,
3754
2058
  _content_type,
3755
2059
  _headers,
@@ -3777,6 +2081,8 @@ class DatasetApi:
3777
2081
  # process the header parameters
3778
2082
  # process the form parameters
3779
2083
  # process the body parameter
2084
+ if create_datapoint_from_text_sources_model is not None:
2085
+ _body_params = create_datapoint_from_text_sources_model
3780
2086
 
3781
2087
 
3782
2088
  # set the HTTP header `Accept`
@@ -3789,6 +2095,21 @@ class DatasetApi:
3789
2095
  ]
3790
2096
  )
3791
2097
 
2098
+ # set the HTTP header `Content-Type`
2099
+ if _content_type:
2100
+ _header_params['Content-Type'] = _content_type
2101
+ else:
2102
+ _default_content_type = (
2103
+ self.api_client.select_header_content_type(
2104
+ [
2105
+ 'application/json',
2106
+ 'text/json',
2107
+ 'application/*+json'
2108
+ ]
2109
+ )
2110
+ )
2111
+ if _default_content_type is not None:
2112
+ _header_params['Content-Type'] = _default_content_type
3792
2113
 
3793
2114
  # authentication setting
3794
2115
  _auth_settings: List[str] = [
@@ -3797,8 +2118,8 @@ class DatasetApi:
3797
2118
  ]
3798
2119
 
3799
2120
  return self.api_client.param_serialize(
3800
- method='GET',
3801
- resource_path='/dataset/{datasetId}/progress',
2121
+ method='POST',
2122
+ resource_path='/dataset/{datasetId}/datapoints/texts',
3802
2123
  path_params=_path_params,
3803
2124
  query_params=_query_params,
3804
2125
  header_params=_header_params,
@@ -3815,9 +2136,10 @@ class DatasetApi:
3815
2136
 
3816
2137
 
3817
2138
  @validate_call
3818
- def dataset_getbyid_get(
2139
+ def dataset_dataset_id_datapoints_urls_post(
3819
2140
  self,
3820
- id: Annotated[Optional[StrictStr], Field(description="The id of the dataset to get.")] = None,
2141
+ dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to create the datapoint in.")],
2142
+ create_datapoint_from_urls_model: Annotated[Optional[CreateDatapointFromUrlsModel], Field(description="The body of the request.")] = None,
3821
2143
  _request_timeout: Union[
3822
2144
  None,
3823
2145
  Annotated[StrictFloat, Field(gt=0)],
@@ -3830,12 +2152,15 @@ class DatasetApi:
3830
2152
  _content_type: Optional[StrictStr] = None,
3831
2153
  _headers: Optional[Dict[StrictStr, Any]] = None,
3832
2154
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3833
- ) -> GetDatasetByIdResult:
3834
- """(Deprecated) Gets a dataset by its id.
2155
+ ) -> CreateDatapointResult:
2156
+ """Creates a single datapoint where the assets are fetched from the specified urls.
3835
2157
 
2158
+ Passing in multiple urls will create a single datapoint with a MultiAsset. Each url will be fetched and stored as a sub-asset of the MultiAsset. <para /> If any of the urls are not accessible, the request will fail.
3836
2159
 
3837
- :param id: The id of the dataset to get.
3838
- :type id: str
2160
+ :param dataset_id: The id of the dataset to create the datapoint in. (required)
2161
+ :type dataset_id: str
2162
+ :param create_datapoint_from_urls_model: The body of the request.
2163
+ :type create_datapoint_from_urls_model: CreateDatapointFromUrlsModel
3839
2164
  :param _request_timeout: timeout setting for this request. If one
3840
2165
  number provided, it will be total request
3841
2166
  timeout. It can also be a pair (tuple) of
@@ -3857,10 +2182,10 @@ class DatasetApi:
3857
2182
  :type _host_index: int, optional
3858
2183
  :return: Returns the result object.
3859
2184
  """ # noqa: E501
3860
- warnings.warn("GET /dataset/getbyid is deprecated.", DeprecationWarning)
3861
2185
 
3862
- _param = self._dataset_getbyid_get_serialize(
3863
- id=id,
2186
+ _param = self._dataset_dataset_id_datapoints_urls_post_serialize(
2187
+ dataset_id=dataset_id,
2188
+ create_datapoint_from_urls_model=create_datapoint_from_urls_model,
3864
2189
  _request_auth=_request_auth,
3865
2190
  _content_type=_content_type,
3866
2191
  _headers=_headers,
@@ -3868,7 +2193,7 @@ class DatasetApi:
3868
2193
  )
3869
2194
 
3870
2195
  _response_types_map: Dict[str, Optional[str]] = {
3871
- '200': "GetDatasetByIdResult",
2196
+ '200': "CreateDatapointResult",
3872
2197
  }
3873
2198
  response_data = self.api_client.call_api(
3874
2199
  *_param,
@@ -3882,9 +2207,10 @@ class DatasetApi:
3882
2207
 
3883
2208
 
3884
2209
  @validate_call
3885
- def dataset_getbyid_get_with_http_info(
2210
+ def dataset_dataset_id_datapoints_urls_post_with_http_info(
3886
2211
  self,
3887
- id: Annotated[Optional[StrictStr], Field(description="The id of the dataset to get.")] = None,
2212
+ dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to create the datapoint in.")],
2213
+ create_datapoint_from_urls_model: Annotated[Optional[CreateDatapointFromUrlsModel], Field(description="The body of the request.")] = None,
3888
2214
  _request_timeout: Union[
3889
2215
  None,
3890
2216
  Annotated[StrictFloat, Field(gt=0)],
@@ -3897,12 +2223,15 @@ class DatasetApi:
3897
2223
  _content_type: Optional[StrictStr] = None,
3898
2224
  _headers: Optional[Dict[StrictStr, Any]] = None,
3899
2225
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3900
- ) -> ApiResponse[GetDatasetByIdResult]:
3901
- """(Deprecated) Gets a dataset by its id.
2226
+ ) -> ApiResponse[CreateDatapointResult]:
2227
+ """Creates a single datapoint where the assets are fetched from the specified urls.
3902
2228
 
2229
+ Passing in multiple urls will create a single datapoint with a MultiAsset. Each url will be fetched and stored as a sub-asset of the MultiAsset. <para /> If any of the urls are not accessible, the request will fail.
3903
2230
 
3904
- :param id: The id of the dataset to get.
3905
- :type id: str
2231
+ :param dataset_id: The id of the dataset to create the datapoint in. (required)
2232
+ :type dataset_id: str
2233
+ :param create_datapoint_from_urls_model: The body of the request.
2234
+ :type create_datapoint_from_urls_model: CreateDatapointFromUrlsModel
3906
2235
  :param _request_timeout: timeout setting for this request. If one
3907
2236
  number provided, it will be total request
3908
2237
  timeout. It can also be a pair (tuple) of
@@ -3924,10 +2253,10 @@ class DatasetApi:
3924
2253
  :type _host_index: int, optional
3925
2254
  :return: Returns the result object.
3926
2255
  """ # noqa: E501
3927
- warnings.warn("GET /dataset/getbyid is deprecated.", DeprecationWarning)
3928
2256
 
3929
- _param = self._dataset_getbyid_get_serialize(
3930
- id=id,
2257
+ _param = self._dataset_dataset_id_datapoints_urls_post_serialize(
2258
+ dataset_id=dataset_id,
2259
+ create_datapoint_from_urls_model=create_datapoint_from_urls_model,
3931
2260
  _request_auth=_request_auth,
3932
2261
  _content_type=_content_type,
3933
2262
  _headers=_headers,
@@ -3935,7 +2264,7 @@ class DatasetApi:
3935
2264
  )
3936
2265
 
3937
2266
  _response_types_map: Dict[str, Optional[str]] = {
3938
- '200': "GetDatasetByIdResult",
2267
+ '200': "CreateDatapointResult",
3939
2268
  }
3940
2269
  response_data = self.api_client.call_api(
3941
2270
  *_param,
@@ -3949,9 +2278,10 @@ class DatasetApi:
3949
2278
 
3950
2279
 
3951
2280
  @validate_call
3952
- def dataset_getbyid_get_without_preload_content(
2281
+ def dataset_dataset_id_datapoints_urls_post_without_preload_content(
3953
2282
  self,
3954
- id: Annotated[Optional[StrictStr], Field(description="The id of the dataset to get.")] = None,
2283
+ dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to create the datapoint in.")],
2284
+ create_datapoint_from_urls_model: Annotated[Optional[CreateDatapointFromUrlsModel], Field(description="The body of the request.")] = None,
3955
2285
  _request_timeout: Union[
3956
2286
  None,
3957
2287
  Annotated[StrictFloat, Field(gt=0)],
@@ -3965,11 +2295,14 @@ class DatasetApi:
3965
2295
  _headers: Optional[Dict[StrictStr, Any]] = None,
3966
2296
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3967
2297
  ) -> RESTResponseType:
3968
- """(Deprecated) Gets a dataset by its id.
2298
+ """Creates a single datapoint where the assets are fetched from the specified urls.
3969
2299
 
2300
+ Passing in multiple urls will create a single datapoint with a MultiAsset. Each url will be fetched and stored as a sub-asset of the MultiAsset. <para /> If any of the urls are not accessible, the request will fail.
3970
2301
 
3971
- :param id: The id of the dataset to get.
3972
- :type id: str
2302
+ :param dataset_id: The id of the dataset to create the datapoint in. (required)
2303
+ :type dataset_id: str
2304
+ :param create_datapoint_from_urls_model: The body of the request.
2305
+ :type create_datapoint_from_urls_model: CreateDatapointFromUrlsModel
3973
2306
  :param _request_timeout: timeout setting for this request. If one
3974
2307
  number provided, it will be total request
3975
2308
  timeout. It can also be a pair (tuple) of
@@ -3991,10 +2324,10 @@ class DatasetApi:
3991
2324
  :type _host_index: int, optional
3992
2325
  :return: Returns the result object.
3993
2326
  """ # noqa: E501
3994
- warnings.warn("GET /dataset/getbyid is deprecated.", DeprecationWarning)
3995
2327
 
3996
- _param = self._dataset_getbyid_get_serialize(
3997
- id=id,
2328
+ _param = self._dataset_dataset_id_datapoints_urls_post_serialize(
2329
+ dataset_id=dataset_id,
2330
+ create_datapoint_from_urls_model=create_datapoint_from_urls_model,
3998
2331
  _request_auth=_request_auth,
3999
2332
  _content_type=_content_type,
4000
2333
  _headers=_headers,
@@ -4002,7 +2335,7 @@ class DatasetApi:
4002
2335
  )
4003
2336
 
4004
2337
  _response_types_map: Dict[str, Optional[str]] = {
4005
- '200': "GetDatasetByIdResult",
2338
+ '200': "CreateDatapointResult",
4006
2339
  }
4007
2340
  response_data = self.api_client.call_api(
4008
2341
  *_param,
@@ -4011,9 +2344,10 @@ class DatasetApi:
4011
2344
  return response_data.response
4012
2345
 
4013
2346
 
4014
- def _dataset_getbyid_get_serialize(
2347
+ def _dataset_dataset_id_datapoints_urls_post_serialize(
4015
2348
  self,
4016
- id,
2349
+ dataset_id,
2350
+ create_datapoint_from_urls_model,
4017
2351
  _request_auth,
4018
2352
  _content_type,
4019
2353
  _headers,
@@ -4035,14 +2369,14 @@ class DatasetApi:
4035
2369
  _body_params: Optional[bytes] = None
4036
2370
 
4037
2371
  # process the path parameters
2372
+ if dataset_id is not None:
2373
+ _path_params['datasetId'] = dataset_id
4038
2374
  # process the query parameters
4039
- if id is not None:
4040
-
4041
- _query_params.append(('id', id))
4042
-
4043
2375
  # process the header parameters
4044
2376
  # process the form parameters
4045
2377
  # process the body parameter
2378
+ if create_datapoint_from_urls_model is not None:
2379
+ _body_params = create_datapoint_from_urls_model
4046
2380
 
4047
2381
 
4048
2382
  # set the HTTP header `Accept`
@@ -4055,6 +2389,21 @@ class DatasetApi:
4055
2389
  ]
4056
2390
  )
4057
2391
 
2392
+ # set the HTTP header `Content-Type`
2393
+ if _content_type:
2394
+ _header_params['Content-Type'] = _content_type
2395
+ else:
2396
+ _default_content_type = (
2397
+ self.api_client.select_header_content_type(
2398
+ [
2399
+ 'application/json',
2400
+ 'text/json',
2401
+ 'application/*+json'
2402
+ ]
2403
+ )
2404
+ )
2405
+ if _default_content_type is not None:
2406
+ _header_params['Content-Type'] = _default_content_type
4058
2407
 
4059
2408
  # authentication setting
4060
2409
  _auth_settings: List[str] = [
@@ -4063,8 +2412,8 @@ class DatasetApi:
4063
2412
  ]
4064
2413
 
4065
2414
  return self.api_client.param_serialize(
4066
- method='GET',
4067
- resource_path='/dataset/getbyid',
2415
+ method='POST',
2416
+ resource_path='/dataset/{datasetId}/datapoints/urls',
4068
2417
  path_params=_path_params,
4069
2418
  query_params=_query_params,
4070
2419
  header_params=_header_params,
@@ -4081,10 +2430,9 @@ class DatasetApi:
4081
2430
 
4082
2431
 
4083
2432
  @validate_call
4084
- def dataset_import_post(
2433
+ def dataset_dataset_id_get(
4085
2434
  self,
4086
- dataset_id: Annotated[Optional[StrictStr], Field(description="The id of the dataset to import the datapoints to.")] = None,
4087
- file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The csv file to import.")] = None,
2435
+ dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get.")],
4088
2436
  _request_timeout: Union[
4089
2437
  None,
4090
2438
  Annotated[StrictFloat, Field(gt=0)],
@@ -4097,14 +2445,12 @@ class DatasetApi:
4097
2445
  _content_type: Optional[StrictStr] = None,
4098
2446
  _headers: Optional[Dict[StrictStr, Any]] = None,
4099
2447
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4100
- ) -> ImportFromFileResult:
4101
- """(Deprecated) Imports datapoints from a csv file.
2448
+ ) -> GetDatasetByIdResult:
2449
+ """Gets a dataset by its id.
4102
2450
 
4103
2451
 
4104
- :param dataset_id: The id of the dataset to import the datapoints to.
2452
+ :param dataset_id: The id of the dataset to get. (required)
4105
2453
  :type dataset_id: str
4106
- :param file: The csv file to import.
4107
- :type file: bytearray
4108
2454
  :param _request_timeout: timeout setting for this request. If one
4109
2455
  number provided, it will be total request
4110
2456
  timeout. It can also be a pair (tuple) of
@@ -4126,11 +2472,9 @@ class DatasetApi:
4126
2472
  :type _host_index: int, optional
4127
2473
  :return: Returns the result object.
4128
2474
  """ # noqa: E501
4129
- warnings.warn("POST /dataset/import is deprecated.", DeprecationWarning)
4130
2475
 
4131
- _param = self._dataset_import_post_serialize(
2476
+ _param = self._dataset_dataset_id_get_serialize(
4132
2477
  dataset_id=dataset_id,
4133
- file=file,
4134
2478
  _request_auth=_request_auth,
4135
2479
  _content_type=_content_type,
4136
2480
  _headers=_headers,
@@ -4138,7 +2482,7 @@ class DatasetApi:
4138
2482
  )
4139
2483
 
4140
2484
  _response_types_map: Dict[str, Optional[str]] = {
4141
- '200': "ImportFromFileResult",
2485
+ '200': "GetDatasetByIdResult",
4142
2486
  }
4143
2487
  response_data = self.api_client.call_api(
4144
2488
  *_param,
@@ -4152,10 +2496,9 @@ class DatasetApi:
4152
2496
 
4153
2497
 
4154
2498
  @validate_call
4155
- def dataset_import_post_with_http_info(
2499
+ def dataset_dataset_id_get_with_http_info(
4156
2500
  self,
4157
- dataset_id: Annotated[Optional[StrictStr], Field(description="The id of the dataset to import the datapoints to.")] = None,
4158
- file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The csv file to import.")] = None,
2501
+ dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get.")],
4159
2502
  _request_timeout: Union[
4160
2503
  None,
4161
2504
  Annotated[StrictFloat, Field(gt=0)],
@@ -4168,14 +2511,12 @@ class DatasetApi:
4168
2511
  _content_type: Optional[StrictStr] = None,
4169
2512
  _headers: Optional[Dict[StrictStr, Any]] = None,
4170
2513
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4171
- ) -> ApiResponse[ImportFromFileResult]:
4172
- """(Deprecated) Imports datapoints from a csv file.
2514
+ ) -> ApiResponse[GetDatasetByIdResult]:
2515
+ """Gets a dataset by its id.
4173
2516
 
4174
2517
 
4175
- :param dataset_id: The id of the dataset to import the datapoints to.
2518
+ :param dataset_id: The id of the dataset to get. (required)
4176
2519
  :type dataset_id: str
4177
- :param file: The csv file to import.
4178
- :type file: bytearray
4179
2520
  :param _request_timeout: timeout setting for this request. If one
4180
2521
  number provided, it will be total request
4181
2522
  timeout. It can also be a pair (tuple) of
@@ -4197,11 +2538,9 @@ class DatasetApi:
4197
2538
  :type _host_index: int, optional
4198
2539
  :return: Returns the result object.
4199
2540
  """ # noqa: E501
4200
- warnings.warn("POST /dataset/import is deprecated.", DeprecationWarning)
4201
2541
 
4202
- _param = self._dataset_import_post_serialize(
2542
+ _param = self._dataset_dataset_id_get_serialize(
4203
2543
  dataset_id=dataset_id,
4204
- file=file,
4205
2544
  _request_auth=_request_auth,
4206
2545
  _content_type=_content_type,
4207
2546
  _headers=_headers,
@@ -4209,7 +2548,7 @@ class DatasetApi:
4209
2548
  )
4210
2549
 
4211
2550
  _response_types_map: Dict[str, Optional[str]] = {
4212
- '200': "ImportFromFileResult",
2551
+ '200': "GetDatasetByIdResult",
4213
2552
  }
4214
2553
  response_data = self.api_client.call_api(
4215
2554
  *_param,
@@ -4223,10 +2562,9 @@ class DatasetApi:
4223
2562
 
4224
2563
 
4225
2564
  @validate_call
4226
- def dataset_import_post_without_preload_content(
2565
+ def dataset_dataset_id_get_without_preload_content(
4227
2566
  self,
4228
- dataset_id: Annotated[Optional[StrictStr], Field(description="The id of the dataset to import the datapoints to.")] = None,
4229
- file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The csv file to import.")] = None,
2567
+ dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get.")],
4230
2568
  _request_timeout: Union[
4231
2569
  None,
4232
2570
  Annotated[StrictFloat, Field(gt=0)],
@@ -4240,13 +2578,11 @@ class DatasetApi:
4240
2578
  _headers: Optional[Dict[StrictStr, Any]] = None,
4241
2579
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4242
2580
  ) -> RESTResponseType:
4243
- """(Deprecated) Imports datapoints from a csv file.
2581
+ """Gets a dataset by its id.
4244
2582
 
4245
2583
 
4246
- :param dataset_id: The id of the dataset to import the datapoints to.
2584
+ :param dataset_id: The id of the dataset to get. (required)
4247
2585
  :type dataset_id: str
4248
- :param file: The csv file to import.
4249
- :type file: bytearray
4250
2586
  :param _request_timeout: timeout setting for this request. If one
4251
2587
  number provided, it will be total request
4252
2588
  timeout. It can also be a pair (tuple) of
@@ -4268,11 +2604,9 @@ class DatasetApi:
4268
2604
  :type _host_index: int, optional
4269
2605
  :return: Returns the result object.
4270
2606
  """ # noqa: E501
4271
- warnings.warn("POST /dataset/import is deprecated.", DeprecationWarning)
4272
2607
 
4273
- _param = self._dataset_import_post_serialize(
2608
+ _param = self._dataset_dataset_id_get_serialize(
4274
2609
  dataset_id=dataset_id,
4275
- file=file,
4276
2610
  _request_auth=_request_auth,
4277
2611
  _content_type=_content_type,
4278
2612
  _headers=_headers,
@@ -4280,7 +2614,7 @@ class DatasetApi:
4280
2614
  )
4281
2615
 
4282
2616
  _response_types_map: Dict[str, Optional[str]] = {
4283
- '200': "ImportFromFileResult",
2617
+ '200': "GetDatasetByIdResult",
4284
2618
  }
4285
2619
  response_data = self.api_client.call_api(
4286
2620
  *_param,
@@ -4289,10 +2623,9 @@ class DatasetApi:
4289
2623
  return response_data.response
4290
2624
 
4291
2625
 
4292
- def _dataset_import_post_serialize(
2626
+ def _dataset_dataset_id_get_serialize(
4293
2627
  self,
4294
2628
  dataset_id,
4295
- file,
4296
2629
  _request_auth,
4297
2630
  _content_type,
4298
2631
  _headers,
@@ -4314,15 +2647,11 @@ class DatasetApi:
4314
2647
  _body_params: Optional[bytes] = None
4315
2648
 
4316
2649
  # process the path parameters
4317
- # process the query parameters
4318
2650
  if dataset_id is not None:
4319
-
4320
- _query_params.append(('datasetId', dataset_id))
4321
-
2651
+ _path_params['datasetId'] = dataset_id
2652
+ # process the query parameters
4322
2653
  # process the header parameters
4323
2654
  # process the form parameters
4324
- if file is not None:
4325
- _files['file'] = file
4326
2655
  # process the body parameter
4327
2656
 
4328
2657
 
@@ -4336,19 +2665,6 @@ class DatasetApi:
4336
2665
  ]
4337
2666
  )
4338
2667
 
4339
- # set the HTTP header `Content-Type`
4340
- if _content_type:
4341
- _header_params['Content-Type'] = _content_type
4342
- else:
4343
- _default_content_type = (
4344
- self.api_client.select_header_content_type(
4345
- [
4346
- 'multipart/form-data'
4347
- ]
4348
- )
4349
- )
4350
- if _default_content_type is not None:
4351
- _header_params['Content-Type'] = _default_content_type
4352
2668
 
4353
2669
  # authentication setting
4354
2670
  _auth_settings: List[str] = [
@@ -4357,8 +2673,8 @@ class DatasetApi:
4357
2673
  ]
4358
2674
 
4359
2675
  return self.api_client.param_serialize(
4360
- method='POST',
4361
- resource_path='/dataset/import',
2676
+ method='GET',
2677
+ resource_path='/dataset/{datasetId}',
4362
2678
  path_params=_path_params,
4363
2679
  query_params=_query_params,
4364
2680
  header_params=_header_params,
@@ -4375,10 +2691,10 @@ class DatasetApi:
4375
2691
 
4376
2692
 
4377
2693
  @validate_call
4378
- def dataset_updatename_post(
2694
+ def dataset_dataset_id_name_patch(
4379
2695
  self,
4380
- id: Annotated[Optional[StrictStr], Field(description="The id of the dataset to update.")] = None,
4381
- name: Annotated[Optional[StrictStr], Field(description="The new name of the dataset.")] = None,
2696
+ dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to update.")],
2697
+ update_dataset_name_model: Annotated[Optional[UpdateDatasetNameModel], Field(description="The body of the request.")] = None,
4382
2698
  _request_timeout: Union[
4383
2699
  None,
4384
2700
  Annotated[StrictFloat, Field(gt=0)],
@@ -4392,13 +2708,13 @@ class DatasetApi:
4392
2708
  _headers: Optional[Dict[StrictStr, Any]] = None,
4393
2709
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4394
2710
  ) -> None:
4395
- """(Deprecated) Updates the name of a dataset.
2711
+ """Updates the name of a dataset.
4396
2712
 
4397
2713
 
4398
- :param id: The id of the dataset to update.
4399
- :type id: str
4400
- :param name: The new name of the dataset.
4401
- :type name: str
2714
+ :param dataset_id: The id of the dataset to update. (required)
2715
+ :type dataset_id: str
2716
+ :param update_dataset_name_model: The body of the request.
2717
+ :type update_dataset_name_model: UpdateDatasetNameModel
4402
2718
  :param _request_timeout: timeout setting for this request. If one
4403
2719
  number provided, it will be total request
4404
2720
  timeout. It can also be a pair (tuple) of
@@ -4420,11 +2736,10 @@ class DatasetApi:
4420
2736
  :type _host_index: int, optional
4421
2737
  :return: Returns the result object.
4422
2738
  """ # noqa: E501
4423
- warnings.warn("POST /dataset/updatename is deprecated.", DeprecationWarning)
4424
2739
 
4425
- _param = self._dataset_updatename_post_serialize(
4426
- id=id,
4427
- name=name,
2740
+ _param = self._dataset_dataset_id_name_patch_serialize(
2741
+ dataset_id=dataset_id,
2742
+ update_dataset_name_model=update_dataset_name_model,
4428
2743
  _request_auth=_request_auth,
4429
2744
  _content_type=_content_type,
4430
2745
  _headers=_headers,
@@ -4432,7 +2747,7 @@ class DatasetApi:
4432
2747
  )
4433
2748
 
4434
2749
  _response_types_map: Dict[str, Optional[str]] = {
4435
- '200': None,
2750
+ '204': None,
4436
2751
  }
4437
2752
  response_data = self.api_client.call_api(
4438
2753
  *_param,
@@ -4446,10 +2761,10 @@ class DatasetApi:
4446
2761
 
4447
2762
 
4448
2763
  @validate_call
4449
- def dataset_updatename_post_with_http_info(
2764
+ def dataset_dataset_id_name_patch_with_http_info(
4450
2765
  self,
4451
- id: Annotated[Optional[StrictStr], Field(description="The id of the dataset to update.")] = None,
4452
- name: Annotated[Optional[StrictStr], Field(description="The new name of the dataset.")] = None,
2766
+ dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to update.")],
2767
+ update_dataset_name_model: Annotated[Optional[UpdateDatasetNameModel], Field(description="The body of the request.")] = None,
4453
2768
  _request_timeout: Union[
4454
2769
  None,
4455
2770
  Annotated[StrictFloat, Field(gt=0)],
@@ -4463,13 +2778,13 @@ class DatasetApi:
4463
2778
  _headers: Optional[Dict[StrictStr, Any]] = None,
4464
2779
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4465
2780
  ) -> ApiResponse[None]:
4466
- """(Deprecated) Updates the name of a dataset.
2781
+ """Updates the name of a dataset.
4467
2782
 
4468
2783
 
4469
- :param id: The id of the dataset to update.
4470
- :type id: str
4471
- :param name: The new name of the dataset.
4472
- :type name: str
2784
+ :param dataset_id: The id of the dataset to update. (required)
2785
+ :type dataset_id: str
2786
+ :param update_dataset_name_model: The body of the request.
2787
+ :type update_dataset_name_model: UpdateDatasetNameModel
4473
2788
  :param _request_timeout: timeout setting for this request. If one
4474
2789
  number provided, it will be total request
4475
2790
  timeout. It can also be a pair (tuple) of
@@ -4491,11 +2806,10 @@ class DatasetApi:
4491
2806
  :type _host_index: int, optional
4492
2807
  :return: Returns the result object.
4493
2808
  """ # noqa: E501
4494
- warnings.warn("POST /dataset/updatename is deprecated.", DeprecationWarning)
4495
2809
 
4496
- _param = self._dataset_updatename_post_serialize(
4497
- id=id,
4498
- name=name,
2810
+ _param = self._dataset_dataset_id_name_patch_serialize(
2811
+ dataset_id=dataset_id,
2812
+ update_dataset_name_model=update_dataset_name_model,
4499
2813
  _request_auth=_request_auth,
4500
2814
  _content_type=_content_type,
4501
2815
  _headers=_headers,
@@ -4503,7 +2817,7 @@ class DatasetApi:
4503
2817
  )
4504
2818
 
4505
2819
  _response_types_map: Dict[str, Optional[str]] = {
4506
- '200': None,
2820
+ '204': None,
4507
2821
  }
4508
2822
  response_data = self.api_client.call_api(
4509
2823
  *_param,
@@ -4517,10 +2831,10 @@ class DatasetApi:
4517
2831
 
4518
2832
 
4519
2833
  @validate_call
4520
- def dataset_updatename_post_without_preload_content(
2834
+ def dataset_dataset_id_name_patch_without_preload_content(
4521
2835
  self,
4522
- id: Annotated[Optional[StrictStr], Field(description="The id of the dataset to update.")] = None,
4523
- name: Annotated[Optional[StrictStr], Field(description="The new name of the dataset.")] = None,
2836
+ dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to update.")],
2837
+ update_dataset_name_model: Annotated[Optional[UpdateDatasetNameModel], Field(description="The body of the request.")] = None,
4524
2838
  _request_timeout: Union[
4525
2839
  None,
4526
2840
  Annotated[StrictFloat, Field(gt=0)],
@@ -4534,13 +2848,13 @@ class DatasetApi:
4534
2848
  _headers: Optional[Dict[StrictStr, Any]] = None,
4535
2849
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4536
2850
  ) -> RESTResponseType:
4537
- """(Deprecated) Updates the name of a dataset.
2851
+ """Updates the name of a dataset.
4538
2852
 
4539
2853
 
4540
- :param id: The id of the dataset to update.
4541
- :type id: str
4542
- :param name: The new name of the dataset.
4543
- :type name: str
2854
+ :param dataset_id: The id of the dataset to update. (required)
2855
+ :type dataset_id: str
2856
+ :param update_dataset_name_model: The body of the request.
2857
+ :type update_dataset_name_model: UpdateDatasetNameModel
4544
2858
  :param _request_timeout: timeout setting for this request. If one
4545
2859
  number provided, it will be total request
4546
2860
  timeout. It can also be a pair (tuple) of
@@ -4562,11 +2876,10 @@ class DatasetApi:
4562
2876
  :type _host_index: int, optional
4563
2877
  :return: Returns the result object.
4564
2878
  """ # noqa: E501
4565
- warnings.warn("POST /dataset/updatename is deprecated.", DeprecationWarning)
4566
2879
 
4567
- _param = self._dataset_updatename_post_serialize(
4568
- id=id,
4569
- name=name,
2880
+ _param = self._dataset_dataset_id_name_patch_serialize(
2881
+ dataset_id=dataset_id,
2882
+ update_dataset_name_model=update_dataset_name_model,
4570
2883
  _request_auth=_request_auth,
4571
2884
  _content_type=_content_type,
4572
2885
  _headers=_headers,
@@ -4574,7 +2887,7 @@ class DatasetApi:
4574
2887
  )
4575
2888
 
4576
2889
  _response_types_map: Dict[str, Optional[str]] = {
4577
- '200': None,
2890
+ '204': None,
4578
2891
  }
4579
2892
  response_data = self.api_client.call_api(
4580
2893
  *_param,
@@ -4583,10 +2896,10 @@ class DatasetApi:
4583
2896
  return response_data.response
4584
2897
 
4585
2898
 
4586
- def _dataset_updatename_post_serialize(
2899
+ def _dataset_dataset_id_name_patch_serialize(
4587
2900
  self,
4588
- id,
4589
- name,
2901
+ dataset_id,
2902
+ update_dataset_name_model,
4590
2903
  _request_auth,
4591
2904
  _content_type,
4592
2905
  _headers,
@@ -4608,21 +2921,32 @@ class DatasetApi:
4608
2921
  _body_params: Optional[bytes] = None
4609
2922
 
4610
2923
  # process the path parameters
2924
+ if dataset_id is not None:
2925
+ _path_params['datasetId'] = dataset_id
4611
2926
  # process the query parameters
4612
- if id is not None:
4613
-
4614
- _query_params.append(('id', id))
4615
-
4616
- if name is not None:
4617
-
4618
- _query_params.append(('name', name))
4619
-
4620
2927
  # process the header parameters
4621
2928
  # process the form parameters
4622
2929
  # process the body parameter
2930
+ if update_dataset_name_model is not None:
2931
+ _body_params = update_dataset_name_model
4623
2932
 
4624
2933
 
4625
2934
 
2935
+ # set the HTTP header `Content-Type`
2936
+ if _content_type:
2937
+ _header_params['Content-Type'] = _content_type
2938
+ else:
2939
+ _default_content_type = (
2940
+ self.api_client.select_header_content_type(
2941
+ [
2942
+ 'application/json',
2943
+ 'text/json',
2944
+ 'application/*+json'
2945
+ ]
2946
+ )
2947
+ )
2948
+ if _default_content_type is not None:
2949
+ _header_params['Content-Type'] = _default_content_type
4626
2950
 
4627
2951
  # authentication setting
4628
2952
  _auth_settings: List[str] = [
@@ -4631,8 +2955,8 @@ class DatasetApi:
4631
2955
  ]
4632
2956
 
4633
2957
  return self.api_client.param_serialize(
4634
- method='POST',
4635
- resource_path='/dataset/updatename',
2958
+ method='PATCH',
2959
+ resource_path='/dataset/{datasetId}/name',
4636
2960
  path_params=_path_params,
4637
2961
  query_params=_query_params,
4638
2962
  header_params=_header_params,
@@ -4649,9 +2973,9 @@ class DatasetApi:
4649
2973
 
4650
2974
 
4651
2975
  @validate_call
4652
- def dataset_uploadfilesfroms3_post(
2976
+ def dataset_dataset_id_progress_get(
4653
2977
  self,
4654
- upload_files_from_s3_bucket_model: Annotated[Optional[UploadFilesFromS3BucketModel], Field(description="The body of the request.")] = None,
2978
+ dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get the progress of.")],
4655
2979
  _request_timeout: Union[
4656
2980
  None,
4657
2981
  Annotated[StrictFloat, Field(gt=0)],
@@ -4664,13 +2988,12 @@ class DatasetApi:
4664
2988
  _content_type: Optional[StrictStr] = None,
4665
2989
  _headers: Optional[Dict[StrictStr, Any]] = None,
4666
2990
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4667
- ) -> UploadFromS3Result:
4668
- """(Deprecated) Uploads files from an S3 bucket to a dataset.
2991
+ ) -> GetDatasetProgressResult:
2992
+ """Gets the upload progress of a dataset.
4669
2993
 
4670
- A new datapoint will be created for each file in the bucket.
4671
2994
 
4672
- :param upload_files_from_s3_bucket_model: The body of the request.
4673
- :type upload_files_from_s3_bucket_model: UploadFilesFromS3BucketModel
2995
+ :param dataset_id: The id of the dataset to get the progress of. (required)
2996
+ :type dataset_id: str
4674
2997
  :param _request_timeout: timeout setting for this request. If one
4675
2998
  number provided, it will be total request
4676
2999
  timeout. It can also be a pair (tuple) of
@@ -4692,10 +3015,9 @@ class DatasetApi:
4692
3015
  :type _host_index: int, optional
4693
3016
  :return: Returns the result object.
4694
3017
  """ # noqa: E501
4695
- warnings.warn("POST /dataset/uploadfilesfroms3 is deprecated.", DeprecationWarning)
4696
3018
 
4697
- _param = self._dataset_uploadfilesfroms3_post_serialize(
4698
- upload_files_from_s3_bucket_model=upload_files_from_s3_bucket_model,
3019
+ _param = self._dataset_dataset_id_progress_get_serialize(
3020
+ dataset_id=dataset_id,
4699
3021
  _request_auth=_request_auth,
4700
3022
  _content_type=_content_type,
4701
3023
  _headers=_headers,
@@ -4703,7 +3025,7 @@ class DatasetApi:
4703
3025
  )
4704
3026
 
4705
3027
  _response_types_map: Dict[str, Optional[str]] = {
4706
- '200': "UploadFromS3Result",
3028
+ '200': "GetDatasetProgressResult",
4707
3029
  }
4708
3030
  response_data = self.api_client.call_api(
4709
3031
  *_param,
@@ -4717,9 +3039,9 @@ class DatasetApi:
4717
3039
 
4718
3040
 
4719
3041
  @validate_call
4720
- def dataset_uploadfilesfroms3_post_with_http_info(
3042
+ def dataset_dataset_id_progress_get_with_http_info(
4721
3043
  self,
4722
- upload_files_from_s3_bucket_model: Annotated[Optional[UploadFilesFromS3BucketModel], Field(description="The body of the request.")] = None,
3044
+ dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get the progress of.")],
4723
3045
  _request_timeout: Union[
4724
3046
  None,
4725
3047
  Annotated[StrictFloat, Field(gt=0)],
@@ -4732,13 +3054,12 @@ class DatasetApi:
4732
3054
  _content_type: Optional[StrictStr] = None,
4733
3055
  _headers: Optional[Dict[StrictStr, Any]] = None,
4734
3056
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4735
- ) -> ApiResponse[UploadFromS3Result]:
4736
- """(Deprecated) Uploads files from an S3 bucket to a dataset.
3057
+ ) -> ApiResponse[GetDatasetProgressResult]:
3058
+ """Gets the upload progress of a dataset.
4737
3059
 
4738
- A new datapoint will be created for each file in the bucket.
4739
3060
 
4740
- :param upload_files_from_s3_bucket_model: The body of the request.
4741
- :type upload_files_from_s3_bucket_model: UploadFilesFromS3BucketModel
3061
+ :param dataset_id: The id of the dataset to get the progress of. (required)
3062
+ :type dataset_id: str
4742
3063
  :param _request_timeout: timeout setting for this request. If one
4743
3064
  number provided, it will be total request
4744
3065
  timeout. It can also be a pair (tuple) of
@@ -4760,10 +3081,9 @@ class DatasetApi:
4760
3081
  :type _host_index: int, optional
4761
3082
  :return: Returns the result object.
4762
3083
  """ # noqa: E501
4763
- warnings.warn("POST /dataset/uploadfilesfroms3 is deprecated.", DeprecationWarning)
4764
3084
 
4765
- _param = self._dataset_uploadfilesfroms3_post_serialize(
4766
- upload_files_from_s3_bucket_model=upload_files_from_s3_bucket_model,
3085
+ _param = self._dataset_dataset_id_progress_get_serialize(
3086
+ dataset_id=dataset_id,
4767
3087
  _request_auth=_request_auth,
4768
3088
  _content_type=_content_type,
4769
3089
  _headers=_headers,
@@ -4771,7 +3091,7 @@ class DatasetApi:
4771
3091
  )
4772
3092
 
4773
3093
  _response_types_map: Dict[str, Optional[str]] = {
4774
- '200': "UploadFromS3Result",
3094
+ '200': "GetDatasetProgressResult",
4775
3095
  }
4776
3096
  response_data = self.api_client.call_api(
4777
3097
  *_param,
@@ -4785,9 +3105,9 @@ class DatasetApi:
4785
3105
 
4786
3106
 
4787
3107
  @validate_call
4788
- def dataset_uploadfilesfroms3_post_without_preload_content(
3108
+ def dataset_dataset_id_progress_get_without_preload_content(
4789
3109
  self,
4790
- upload_files_from_s3_bucket_model: Annotated[Optional[UploadFilesFromS3BucketModel], Field(description="The body of the request.")] = None,
3110
+ dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get the progress of.")],
4791
3111
  _request_timeout: Union[
4792
3112
  None,
4793
3113
  Annotated[StrictFloat, Field(gt=0)],
@@ -4801,12 +3121,11 @@ class DatasetApi:
4801
3121
  _headers: Optional[Dict[StrictStr, Any]] = None,
4802
3122
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4803
3123
  ) -> RESTResponseType:
4804
- """(Deprecated) Uploads files from an S3 bucket to a dataset.
3124
+ """Gets the upload progress of a dataset.
4805
3125
 
4806
- A new datapoint will be created for each file in the bucket.
4807
3126
 
4808
- :param upload_files_from_s3_bucket_model: The body of the request.
4809
- :type upload_files_from_s3_bucket_model: UploadFilesFromS3BucketModel
3127
+ :param dataset_id: The id of the dataset to get the progress of. (required)
3128
+ :type dataset_id: str
4810
3129
  :param _request_timeout: timeout setting for this request. If one
4811
3130
  number provided, it will be total request
4812
3131
  timeout. It can also be a pair (tuple) of
@@ -4828,10 +3147,9 @@ class DatasetApi:
4828
3147
  :type _host_index: int, optional
4829
3148
  :return: Returns the result object.
4830
3149
  """ # noqa: E501
4831
- warnings.warn("POST /dataset/uploadfilesfroms3 is deprecated.", DeprecationWarning)
4832
3150
 
4833
- _param = self._dataset_uploadfilesfroms3_post_serialize(
4834
- upload_files_from_s3_bucket_model=upload_files_from_s3_bucket_model,
3151
+ _param = self._dataset_dataset_id_progress_get_serialize(
3152
+ dataset_id=dataset_id,
4835
3153
  _request_auth=_request_auth,
4836
3154
  _content_type=_content_type,
4837
3155
  _headers=_headers,
@@ -4839,7 +3157,7 @@ class DatasetApi:
4839
3157
  )
4840
3158
 
4841
3159
  _response_types_map: Dict[str, Optional[str]] = {
4842
- '200': "UploadFromS3Result",
3160
+ '200': "GetDatasetProgressResult",
4843
3161
  }
4844
3162
  response_data = self.api_client.call_api(
4845
3163
  *_param,
@@ -4848,9 +3166,9 @@ class DatasetApi:
4848
3166
  return response_data.response
4849
3167
 
4850
3168
 
4851
- def _dataset_uploadfilesfroms3_post_serialize(
3169
+ def _dataset_dataset_id_progress_get_serialize(
4852
3170
  self,
4853
- upload_files_from_s3_bucket_model,
3171
+ dataset_id,
4854
3172
  _request_auth,
4855
3173
  _content_type,
4856
3174
  _headers,
@@ -4872,12 +3190,12 @@ class DatasetApi:
4872
3190
  _body_params: Optional[bytes] = None
4873
3191
 
4874
3192
  # process the path parameters
3193
+ if dataset_id is not None:
3194
+ _path_params['datasetId'] = dataset_id
4875
3195
  # process the query parameters
4876
3196
  # process the header parameters
4877
3197
  # process the form parameters
4878
3198
  # process the body parameter
4879
- if upload_files_from_s3_bucket_model is not None:
4880
- _body_params = upload_files_from_s3_bucket_model
4881
3199
 
4882
3200
 
4883
3201
  # set the HTTP header `Accept`
@@ -4890,21 +3208,6 @@ class DatasetApi:
4890
3208
  ]
4891
3209
  )
4892
3210
 
4893
- # set the HTTP header `Content-Type`
4894
- if _content_type:
4895
- _header_params['Content-Type'] = _content_type
4896
- else:
4897
- _default_content_type = (
4898
- self.api_client.select_header_content_type(
4899
- [
4900
- 'application/json',
4901
- 'text/json',
4902
- 'application/*+json'
4903
- ]
4904
- )
4905
- )
4906
- if _default_content_type is not None:
4907
- _header_params['Content-Type'] = _default_content_type
4908
3211
 
4909
3212
  # authentication setting
4910
3213
  _auth_settings: List[str] = [
@@ -4913,8 +3216,8 @@ class DatasetApi:
4913
3216
  ]
4914
3217
 
4915
3218
  return self.api_client.param_serialize(
4916
- method='POST',
4917
- resource_path='/dataset/uploadfilesfroms3',
3219
+ method='GET',
3220
+ resource_path='/dataset/{datasetId}/progress',
4918
3221
  path_params=_path_params,
4919
3222
  query_params=_query_params,
4920
3223
  header_params=_header_params,