vectorize_client.api.uploads_api

Vectorize API (Beta)

API for Vectorize services

The version of the OpenAPI document: 0.0.1 Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.

  1# coding: utf-8
  2
  3"""
  4    Vectorize API (Beta)
  5
  6    API for Vectorize services
  7
  8    The version of the OpenAPI document: 0.0.1
  9    Generated by OpenAPI Generator (https://openapi-generator.tech)
 10
 11    Do not edit the class manually.
 12"""  # noqa: E501
 13
 14import warnings
 15from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
 16from typing import Any, Dict, List, Optional, Tuple, Union
 17from typing_extensions import Annotated
 18
 19from pydantic import StrictStr
 20from vectorize_client.models.delete_file_response import DeleteFileResponse
 21from vectorize_client.models.get_upload_files_response import GetUploadFilesResponse
 22from vectorize_client.models.start_file_upload_to_connector_request import StartFileUploadToConnectorRequest
 23from vectorize_client.models.start_file_upload_to_connector_response import StartFileUploadToConnectorResponse
 24
 25from vectorize_client.api_client import ApiClient, RequestSerialized
 26from vectorize_client.api_response import ApiResponse
 27from vectorize_client.rest import RESTResponseType
 28
 29
 30class UploadsApi:
 31    """NOTE: This class is auto generated by OpenAPI Generator
 32    Ref: https://openapi-generator.tech
 33
 34    Do not edit the class manually.
 35    """
 36
 37    def __init__(self, api_client=None) -> None:
 38        if api_client is None:
 39            api_client = ApiClient.get_default()
 40        self.api_client = api_client
 41
 42
 43    @validate_call
 44    def delete_file_from_connector(
 45        self,
 46        organization: StrictStr,
 47        connector_id: StrictStr,
 48        _request_timeout: Union[
 49            None,
 50            Annotated[StrictFloat, Field(gt=0)],
 51            Tuple[
 52                Annotated[StrictFloat, Field(gt=0)],
 53                Annotated[StrictFloat, Field(gt=0)]
 54            ]
 55        ] = None,
 56        _request_auth: Optional[Dict[StrictStr, Any]] = None,
 57        _content_type: Optional[StrictStr] = None,
 58        _headers: Optional[Dict[StrictStr, Any]] = None,
 59        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
 60    ) -> DeleteFileResponse:
 61        """Delete a file from a file upload connector
 62
 63
 64        :param organization: (required)
 65        :type organization: str
 66        :param connector_id: (required)
 67        :type connector_id: str
 68        :param _request_timeout: timeout setting for this request. If one
 69                                 number provided, it will be total request
 70                                 timeout. It can also be a pair (tuple) of
 71                                 (connection, read) timeouts.
 72        :type _request_timeout: int, tuple(int, int), optional
 73        :param _request_auth: set to override the auth_settings for an a single
 74                              request; this effectively ignores the
 75                              authentication in the spec for a single request.
 76        :type _request_auth: dict, optional
 77        :param _content_type: force content-type for the request.
 78        :type _content_type: str, Optional
 79        :param _headers: set to override the headers for a single
 80                         request; this effectively ignores the headers
 81                         in the spec for a single request.
 82        :type _headers: dict, optional
 83        :param _host_index: set to override the host_index for a single
 84                            request; this effectively ignores the host_index
 85                            in the spec for a single request.
 86        :type _host_index: int, optional
 87        :return: Returns the result object.
 88        """ # noqa: E501
 89
 90        _param = self._delete_file_from_connector_serialize(
 91            organization=organization,
 92            connector_id=connector_id,
 93            _request_auth=_request_auth,
 94            _content_type=_content_type,
 95            _headers=_headers,
 96            _host_index=_host_index
 97        )
 98
 99        _response_types_map: Dict[str, Optional[str]] = {
100            '200': "DeleteFileResponse",
101            '400': "GetPipelines400Response",
102            '401': "GetPipelines400Response",
103            '403': "GetPipelines400Response",
104            '404': "GetPipelines400Response",
105            '500': "GetPipelines400Response",
106        }
107        response_data = self.api_client.call_api(
108            *_param,
109            _request_timeout=_request_timeout
110        )
111        response_data.read()
112        return self.api_client.response_deserialize(
113            response_data=response_data,
114            response_types_map=_response_types_map,
115        ).data
116
117
118    @validate_call
119    def delete_file_from_connector_with_http_info(
120        self,
121        organization: StrictStr,
122        connector_id: StrictStr,
123        _request_timeout: Union[
124            None,
125            Annotated[StrictFloat, Field(gt=0)],
126            Tuple[
127                Annotated[StrictFloat, Field(gt=0)],
128                Annotated[StrictFloat, Field(gt=0)]
129            ]
130        ] = None,
131        _request_auth: Optional[Dict[StrictStr, Any]] = None,
132        _content_type: Optional[StrictStr] = None,
133        _headers: Optional[Dict[StrictStr, Any]] = None,
134        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
135    ) -> ApiResponse[DeleteFileResponse]:
136        """Delete a file from a file upload connector
137
138
139        :param organization: (required)
140        :type organization: str
141        :param connector_id: (required)
142        :type connector_id: str
143        :param _request_timeout: timeout setting for this request. If one
144                                 number provided, it will be total request
145                                 timeout. It can also be a pair (tuple) of
146                                 (connection, read) timeouts.
147        :type _request_timeout: int, tuple(int, int), optional
148        :param _request_auth: set to override the auth_settings for an a single
149                              request; this effectively ignores the
150                              authentication in the spec for a single request.
151        :type _request_auth: dict, optional
152        :param _content_type: force content-type for the request.
153        :type _content_type: str, Optional
154        :param _headers: set to override the headers for a single
155                         request; this effectively ignores the headers
156                         in the spec for a single request.
157        :type _headers: dict, optional
158        :param _host_index: set to override the host_index for a single
159                            request; this effectively ignores the host_index
160                            in the spec for a single request.
161        :type _host_index: int, optional
162        :return: Returns the result object.
163        """ # noqa: E501
164
165        _param = self._delete_file_from_connector_serialize(
166            organization=organization,
167            connector_id=connector_id,
168            _request_auth=_request_auth,
169            _content_type=_content_type,
170            _headers=_headers,
171            _host_index=_host_index
172        )
173
174        _response_types_map: Dict[str, Optional[str]] = {
175            '200': "DeleteFileResponse",
176            '400': "GetPipelines400Response",
177            '401': "GetPipelines400Response",
178            '403': "GetPipelines400Response",
179            '404': "GetPipelines400Response",
180            '500': "GetPipelines400Response",
181        }
182        response_data = self.api_client.call_api(
183            *_param,
184            _request_timeout=_request_timeout
185        )
186        response_data.read()
187        return self.api_client.response_deserialize(
188            response_data=response_data,
189            response_types_map=_response_types_map,
190        )
191
192
193    @validate_call
194    def delete_file_from_connector_without_preload_content(
195        self,
196        organization: StrictStr,
197        connector_id: StrictStr,
198        _request_timeout: Union[
199            None,
200            Annotated[StrictFloat, Field(gt=0)],
201            Tuple[
202                Annotated[StrictFloat, Field(gt=0)],
203                Annotated[StrictFloat, Field(gt=0)]
204            ]
205        ] = None,
206        _request_auth: Optional[Dict[StrictStr, Any]] = None,
207        _content_type: Optional[StrictStr] = None,
208        _headers: Optional[Dict[StrictStr, Any]] = None,
209        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
210    ) -> RESTResponseType:
211        """Delete a file from a file upload connector
212
213
214        :param organization: (required)
215        :type organization: str
216        :param connector_id: (required)
217        :type connector_id: str
218        :param _request_timeout: timeout setting for this request. If one
219                                 number provided, it will be total request
220                                 timeout. It can also be a pair (tuple) of
221                                 (connection, read) timeouts.
222        :type _request_timeout: int, tuple(int, int), optional
223        :param _request_auth: set to override the auth_settings for an a single
224                              request; this effectively ignores the
225                              authentication in the spec for a single request.
226        :type _request_auth: dict, optional
227        :param _content_type: force content-type for the request.
228        :type _content_type: str, Optional
229        :param _headers: set to override the headers for a single
230                         request; this effectively ignores the headers
231                         in the spec for a single request.
232        :type _headers: dict, optional
233        :param _host_index: set to override the host_index for a single
234                            request; this effectively ignores the host_index
235                            in the spec for a single request.
236        :type _host_index: int, optional
237        :return: Returns the result object.
238        """ # noqa: E501
239
240        _param = self._delete_file_from_connector_serialize(
241            organization=organization,
242            connector_id=connector_id,
243            _request_auth=_request_auth,
244            _content_type=_content_type,
245            _headers=_headers,
246            _host_index=_host_index
247        )
248
249        _response_types_map: Dict[str, Optional[str]] = {
250            '200': "DeleteFileResponse",
251            '400': "GetPipelines400Response",
252            '401': "GetPipelines400Response",
253            '403': "GetPipelines400Response",
254            '404': "GetPipelines400Response",
255            '500': "GetPipelines400Response",
256        }
257        response_data = self.api_client.call_api(
258            *_param,
259            _request_timeout=_request_timeout
260        )
261        return response_data.response
262
263
264    def _delete_file_from_connector_serialize(
265        self,
266        organization,
267        connector_id,
268        _request_auth,
269        _content_type,
270        _headers,
271        _host_index,
272    ) -> RequestSerialized:
273
274        _host = None
275
276        _collection_formats: Dict[str, str] = {
277        }
278
279        _path_params: Dict[str, str] = {}
280        _query_params: List[Tuple[str, str]] = []
281        _header_params: Dict[str, Optional[str]] = _headers or {}
282        _form_params: List[Tuple[str, str]] = []
283        _files: Dict[
284            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
285        ] = {}
286        _body_params: Optional[bytes] = None
287
288        # process the path parameters
289        if organization is not None:
290            _path_params['organization'] = organization
291        if connector_id is not None:
292            _path_params['connectorId'] = connector_id
293        # process the query parameters
294        # process the header parameters
295        # process the form parameters
296        # process the body parameter
297
298
299        # set the HTTP header `Accept`
300        if 'Accept' not in _header_params:
301            _header_params['Accept'] = self.api_client.select_header_accept(
302                [
303                    'application/json'
304                ]
305            )
306
307
308        # authentication setting
309        _auth_settings: List[str] = [
310            'bearerAuth'
311        ]
312
313        return self.api_client.param_serialize(
314            method='DELETE',
315            resource_path='/org/{organization}/uploads/{connectorId}/files',
316            path_params=_path_params,
317            query_params=_query_params,
318            header_params=_header_params,
319            body=_body_params,
320            post_params=_form_params,
321            files=_files,
322            auth_settings=_auth_settings,
323            collection_formats=_collection_formats,
324            _host=_host,
325            _request_auth=_request_auth
326        )
327
328
329
330
331    @validate_call
332    def get_upload_files_from_connector(
333        self,
334        organization: StrictStr,
335        connector_id: StrictStr,
336        _request_timeout: Union[
337            None,
338            Annotated[StrictFloat, Field(gt=0)],
339            Tuple[
340                Annotated[StrictFloat, Field(gt=0)],
341                Annotated[StrictFloat, Field(gt=0)]
342            ]
343        ] = None,
344        _request_auth: Optional[Dict[StrictStr, Any]] = None,
345        _content_type: Optional[StrictStr] = None,
346        _headers: Optional[Dict[StrictStr, Any]] = None,
347        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
348    ) -> GetUploadFilesResponse:
349        """Get uploaded files from a file upload connector
350
351
352        :param organization: (required)
353        :type organization: str
354        :param connector_id: (required)
355        :type connector_id: str
356        :param _request_timeout: timeout setting for this request. If one
357                                 number provided, it will be total request
358                                 timeout. It can also be a pair (tuple) of
359                                 (connection, read) timeouts.
360        :type _request_timeout: int, tuple(int, int), optional
361        :param _request_auth: set to override the auth_settings for an a single
362                              request; this effectively ignores the
363                              authentication in the spec for a single request.
364        :type _request_auth: dict, optional
365        :param _content_type: force content-type for the request.
366        :type _content_type: str, Optional
367        :param _headers: set to override the headers for a single
368                         request; this effectively ignores the headers
369                         in the spec for a single request.
370        :type _headers: dict, optional
371        :param _host_index: set to override the host_index for a single
372                            request; this effectively ignores the host_index
373                            in the spec for a single request.
374        :type _host_index: int, optional
375        :return: Returns the result object.
376        """ # noqa: E501
377
378        _param = self._get_upload_files_from_connector_serialize(
379            organization=organization,
380            connector_id=connector_id,
381            _request_auth=_request_auth,
382            _content_type=_content_type,
383            _headers=_headers,
384            _host_index=_host_index
385        )
386
387        _response_types_map: Dict[str, Optional[str]] = {
388            '200': "GetUploadFilesResponse",
389            '400': "GetPipelines400Response",
390            '401': "GetPipelines400Response",
391            '403': "GetPipelines400Response",
392            '404': "GetPipelines400Response",
393            '500': "GetPipelines400Response",
394        }
395        response_data = self.api_client.call_api(
396            *_param,
397            _request_timeout=_request_timeout
398        )
399        response_data.read()
400        return self.api_client.response_deserialize(
401            response_data=response_data,
402            response_types_map=_response_types_map,
403        ).data
404
405
406    @validate_call
407    def get_upload_files_from_connector_with_http_info(
408        self,
409        organization: StrictStr,
410        connector_id: StrictStr,
411        _request_timeout: Union[
412            None,
413            Annotated[StrictFloat, Field(gt=0)],
414            Tuple[
415                Annotated[StrictFloat, Field(gt=0)],
416                Annotated[StrictFloat, Field(gt=0)]
417            ]
418        ] = None,
419        _request_auth: Optional[Dict[StrictStr, Any]] = None,
420        _content_type: Optional[StrictStr] = None,
421        _headers: Optional[Dict[StrictStr, Any]] = None,
422        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
423    ) -> ApiResponse[GetUploadFilesResponse]:
424        """Get uploaded files from a file upload connector
425
426
427        :param organization: (required)
428        :type organization: str
429        :param connector_id: (required)
430        :type connector_id: str
431        :param _request_timeout: timeout setting for this request. If one
432                                 number provided, it will be total request
433                                 timeout. It can also be a pair (tuple) of
434                                 (connection, read) timeouts.
435        :type _request_timeout: int, tuple(int, int), optional
436        :param _request_auth: set to override the auth_settings for an a single
437                              request; this effectively ignores the
438                              authentication in the spec for a single request.
439        :type _request_auth: dict, optional
440        :param _content_type: force content-type for the request.
441        :type _content_type: str, Optional
442        :param _headers: set to override the headers for a single
443                         request; this effectively ignores the headers
444                         in the spec for a single request.
445        :type _headers: dict, optional
446        :param _host_index: set to override the host_index for a single
447                            request; this effectively ignores the host_index
448                            in the spec for a single request.
449        :type _host_index: int, optional
450        :return: Returns the result object.
451        """ # noqa: E501
452
453        _param = self._get_upload_files_from_connector_serialize(
454            organization=organization,
455            connector_id=connector_id,
456            _request_auth=_request_auth,
457            _content_type=_content_type,
458            _headers=_headers,
459            _host_index=_host_index
460        )
461
462        _response_types_map: Dict[str, Optional[str]] = {
463            '200': "GetUploadFilesResponse",
464            '400': "GetPipelines400Response",
465            '401': "GetPipelines400Response",
466            '403': "GetPipelines400Response",
467            '404': "GetPipelines400Response",
468            '500': "GetPipelines400Response",
469        }
470        response_data = self.api_client.call_api(
471            *_param,
472            _request_timeout=_request_timeout
473        )
474        response_data.read()
475        return self.api_client.response_deserialize(
476            response_data=response_data,
477            response_types_map=_response_types_map,
478        )
479
480
481    @validate_call
482    def get_upload_files_from_connector_without_preload_content(
483        self,
484        organization: StrictStr,
485        connector_id: StrictStr,
486        _request_timeout: Union[
487            None,
488            Annotated[StrictFloat, Field(gt=0)],
489            Tuple[
490                Annotated[StrictFloat, Field(gt=0)],
491                Annotated[StrictFloat, Field(gt=0)]
492            ]
493        ] = None,
494        _request_auth: Optional[Dict[StrictStr, Any]] = None,
495        _content_type: Optional[StrictStr] = None,
496        _headers: Optional[Dict[StrictStr, Any]] = None,
497        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
498    ) -> RESTResponseType:
499        """Get uploaded files from a file upload connector
500
501
502        :param organization: (required)
503        :type organization: str
504        :param connector_id: (required)
505        :type connector_id: str
506        :param _request_timeout: timeout setting for this request. If one
507                                 number provided, it will be total request
508                                 timeout. It can also be a pair (tuple) of
509                                 (connection, read) timeouts.
510        :type _request_timeout: int, tuple(int, int), optional
511        :param _request_auth: set to override the auth_settings for an a single
512                              request; this effectively ignores the
513                              authentication in the spec for a single request.
514        :type _request_auth: dict, optional
515        :param _content_type: force content-type for the request.
516        :type _content_type: str, Optional
517        :param _headers: set to override the headers for a single
518                         request; this effectively ignores the headers
519                         in the spec for a single request.
520        :type _headers: dict, optional
521        :param _host_index: set to override the host_index for a single
522                            request; this effectively ignores the host_index
523                            in the spec for a single request.
524        :type _host_index: int, optional
525        :return: Returns the result object.
526        """ # noqa: E501
527
528        _param = self._get_upload_files_from_connector_serialize(
529            organization=organization,
530            connector_id=connector_id,
531            _request_auth=_request_auth,
532            _content_type=_content_type,
533            _headers=_headers,
534            _host_index=_host_index
535        )
536
537        _response_types_map: Dict[str, Optional[str]] = {
538            '200': "GetUploadFilesResponse",
539            '400': "GetPipelines400Response",
540            '401': "GetPipelines400Response",
541            '403': "GetPipelines400Response",
542            '404': "GetPipelines400Response",
543            '500': "GetPipelines400Response",
544        }
545        response_data = self.api_client.call_api(
546            *_param,
547            _request_timeout=_request_timeout
548        )
549        return response_data.response
550
551
552    def _get_upload_files_from_connector_serialize(
553        self,
554        organization,
555        connector_id,
556        _request_auth,
557        _content_type,
558        _headers,
559        _host_index,
560    ) -> RequestSerialized:
561
562        _host = None
563
564        _collection_formats: Dict[str, str] = {
565        }
566
567        _path_params: Dict[str, str] = {}
568        _query_params: List[Tuple[str, str]] = []
569        _header_params: Dict[str, Optional[str]] = _headers or {}
570        _form_params: List[Tuple[str, str]] = []
571        _files: Dict[
572            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
573        ] = {}
574        _body_params: Optional[bytes] = None
575
576        # process the path parameters
577        if organization is not None:
578            _path_params['organization'] = organization
579        if connector_id is not None:
580            _path_params['connectorId'] = connector_id
581        # process the query parameters
582        # process the header parameters
583        # process the form parameters
584        # process the body parameter
585
586
587        # set the HTTP header `Accept`
588        if 'Accept' not in _header_params:
589            _header_params['Accept'] = self.api_client.select_header_accept(
590                [
591                    'application/json'
592                ]
593            )
594
595
596        # authentication setting
597        _auth_settings: List[str] = [
598            'bearerAuth'
599        ]
600
601        return self.api_client.param_serialize(
602            method='GET',
603            resource_path='/org/{organization}/uploads/{connectorId}/files',
604            path_params=_path_params,
605            query_params=_query_params,
606            header_params=_header_params,
607            body=_body_params,
608            post_params=_form_params,
609            files=_files,
610            auth_settings=_auth_settings,
611            collection_formats=_collection_formats,
612            _host=_host,
613            _request_auth=_request_auth
614        )
615
616
617
618
619    @validate_call
620    def start_file_upload_to_connector(
621        self,
622        organization: StrictStr,
623        connector_id: StrictStr,
624        start_file_upload_to_connector_request: StartFileUploadToConnectorRequest,
625        _request_timeout: Union[
626            None,
627            Annotated[StrictFloat, Field(gt=0)],
628            Tuple[
629                Annotated[StrictFloat, Field(gt=0)],
630                Annotated[StrictFloat, Field(gt=0)]
631            ]
632        ] = None,
633        _request_auth: Optional[Dict[StrictStr, Any]] = None,
634        _content_type: Optional[StrictStr] = None,
635        _headers: Optional[Dict[StrictStr, Any]] = None,
636        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
637    ) -> StartFileUploadToConnectorResponse:
638        """Upload a file to a file upload connector
639
640
641        :param organization: (required)
642        :type organization: str
643        :param connector_id: (required)
644        :type connector_id: str
645        :param start_file_upload_to_connector_request: (required)
646        :type start_file_upload_to_connector_request: StartFileUploadToConnectorRequest
647        :param _request_timeout: timeout setting for this request. If one
648                                 number provided, it will be total request
649                                 timeout. It can also be a pair (tuple) of
650                                 (connection, read) timeouts.
651        :type _request_timeout: int, tuple(int, int), optional
652        :param _request_auth: set to override the auth_settings for an a single
653                              request; this effectively ignores the
654                              authentication in the spec for a single request.
655        :type _request_auth: dict, optional
656        :param _content_type: force content-type for the request.
657        :type _content_type: str, Optional
658        :param _headers: set to override the headers for a single
659                         request; this effectively ignores the headers
660                         in the spec for a single request.
661        :type _headers: dict, optional
662        :param _host_index: set to override the host_index for a single
663                            request; this effectively ignores the host_index
664                            in the spec for a single request.
665        :type _host_index: int, optional
666        :return: Returns the result object.
667        """ # noqa: E501
668
669        _param = self._start_file_upload_to_connector_serialize(
670            organization=organization,
671            connector_id=connector_id,
672            start_file_upload_to_connector_request=start_file_upload_to_connector_request,
673            _request_auth=_request_auth,
674            _content_type=_content_type,
675            _headers=_headers,
676            _host_index=_host_index
677        )
678
679        _response_types_map: Dict[str, Optional[str]] = {
680            '200': "StartFileUploadToConnectorResponse",
681            '400': "GetPipelines400Response",
682            '401': "GetPipelines400Response",
683            '403': "GetPipelines400Response",
684            '404': "GetPipelines400Response",
685            '500': "GetPipelines400Response",
686        }
687        response_data = self.api_client.call_api(
688            *_param,
689            _request_timeout=_request_timeout
690        )
691        response_data.read()
692        return self.api_client.response_deserialize(
693            response_data=response_data,
694            response_types_map=_response_types_map,
695        ).data
696
697
698    @validate_call
699    def start_file_upload_to_connector_with_http_info(
700        self,
701        organization: StrictStr,
702        connector_id: StrictStr,
703        start_file_upload_to_connector_request: StartFileUploadToConnectorRequest,
704        _request_timeout: Union[
705            None,
706            Annotated[StrictFloat, Field(gt=0)],
707            Tuple[
708                Annotated[StrictFloat, Field(gt=0)],
709                Annotated[StrictFloat, Field(gt=0)]
710            ]
711        ] = None,
712        _request_auth: Optional[Dict[StrictStr, Any]] = None,
713        _content_type: Optional[StrictStr] = None,
714        _headers: Optional[Dict[StrictStr, Any]] = None,
715        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
716    ) -> ApiResponse[StartFileUploadToConnectorResponse]:
717        """Upload a file to a file upload connector
718
719
720        :param organization: (required)
721        :type organization: str
722        :param connector_id: (required)
723        :type connector_id: str
724        :param start_file_upload_to_connector_request: (required)
725        :type start_file_upload_to_connector_request: StartFileUploadToConnectorRequest
726        :param _request_timeout: timeout setting for this request. If one
727                                 number provided, it will be total request
728                                 timeout. It can also be a pair (tuple) of
729                                 (connection, read) timeouts.
730        :type _request_timeout: int, tuple(int, int), optional
731        :param _request_auth: set to override the auth_settings for an a single
732                              request; this effectively ignores the
733                              authentication in the spec for a single request.
734        :type _request_auth: dict, optional
735        :param _content_type: force content-type for the request.
736        :type _content_type: str, Optional
737        :param _headers: set to override the headers for a single
738                         request; this effectively ignores the headers
739                         in the spec for a single request.
740        :type _headers: dict, optional
741        :param _host_index: set to override the host_index for a single
742                            request; this effectively ignores the host_index
743                            in the spec for a single request.
744        :type _host_index: int, optional
745        :return: Returns the result object.
746        """ # noqa: E501
747
748        _param = self._start_file_upload_to_connector_serialize(
749            organization=organization,
750            connector_id=connector_id,
751            start_file_upload_to_connector_request=start_file_upload_to_connector_request,
752            _request_auth=_request_auth,
753            _content_type=_content_type,
754            _headers=_headers,
755            _host_index=_host_index
756        )
757
758        _response_types_map: Dict[str, Optional[str]] = {
759            '200': "StartFileUploadToConnectorResponse",
760            '400': "GetPipelines400Response",
761            '401': "GetPipelines400Response",
762            '403': "GetPipelines400Response",
763            '404': "GetPipelines400Response",
764            '500': "GetPipelines400Response",
765        }
766        response_data = self.api_client.call_api(
767            *_param,
768            _request_timeout=_request_timeout
769        )
770        response_data.read()
771        return self.api_client.response_deserialize(
772            response_data=response_data,
773            response_types_map=_response_types_map,
774        )
775
776
777    @validate_call
778    def start_file_upload_to_connector_without_preload_content(
779        self,
780        organization: StrictStr,
781        connector_id: StrictStr,
782        start_file_upload_to_connector_request: StartFileUploadToConnectorRequest,
783        _request_timeout: Union[
784            None,
785            Annotated[StrictFloat, Field(gt=0)],
786            Tuple[
787                Annotated[StrictFloat, Field(gt=0)],
788                Annotated[StrictFloat, Field(gt=0)]
789            ]
790        ] = None,
791        _request_auth: Optional[Dict[StrictStr, Any]] = None,
792        _content_type: Optional[StrictStr] = None,
793        _headers: Optional[Dict[StrictStr, Any]] = None,
794        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
795    ) -> RESTResponseType:
796        """Upload a file to a file upload connector
797
798
799        :param organization: (required)
800        :type organization: str
801        :param connector_id: (required)
802        :type connector_id: str
803        :param start_file_upload_to_connector_request: (required)
804        :type start_file_upload_to_connector_request: StartFileUploadToConnectorRequest
805        :param _request_timeout: timeout setting for this request. If one
806                                 number provided, it will be total request
807                                 timeout. It can also be a pair (tuple) of
808                                 (connection, read) timeouts.
809        :type _request_timeout: int, tuple(int, int), optional
810        :param _request_auth: set to override the auth_settings for an a single
811                              request; this effectively ignores the
812                              authentication in the spec for a single request.
813        :type _request_auth: dict, optional
814        :param _content_type: force content-type for the request.
815        :type _content_type: str, Optional
816        :param _headers: set to override the headers for a single
817                         request; this effectively ignores the headers
818                         in the spec for a single request.
819        :type _headers: dict, optional
820        :param _host_index: set to override the host_index for a single
821                            request; this effectively ignores the host_index
822                            in the spec for a single request.
823        :type _host_index: int, optional
824        :return: Returns the result object.
825        """ # noqa: E501
826
827        _param = self._start_file_upload_to_connector_serialize(
828            organization=organization,
829            connector_id=connector_id,
830            start_file_upload_to_connector_request=start_file_upload_to_connector_request,
831            _request_auth=_request_auth,
832            _content_type=_content_type,
833            _headers=_headers,
834            _host_index=_host_index
835        )
836
837        _response_types_map: Dict[str, Optional[str]] = {
838            '200': "StartFileUploadToConnectorResponse",
839            '400': "GetPipelines400Response",
840            '401': "GetPipelines400Response",
841            '403': "GetPipelines400Response",
842            '404': "GetPipelines400Response",
843            '500': "GetPipelines400Response",
844        }
845        response_data = self.api_client.call_api(
846            *_param,
847            _request_timeout=_request_timeout
848        )
849        return response_data.response
850
851
852    def _start_file_upload_to_connector_serialize(
853        self,
854        organization,
855        connector_id,
856        start_file_upload_to_connector_request,
857        _request_auth,
858        _content_type,
859        _headers,
860        _host_index,
861    ) -> RequestSerialized:
862
863        _host = None
864
865        _collection_formats: Dict[str, str] = {
866        }
867
868        _path_params: Dict[str, str] = {}
869        _query_params: List[Tuple[str, str]] = []
870        _header_params: Dict[str, Optional[str]] = _headers or {}
871        _form_params: List[Tuple[str, str]] = []
872        _files: Dict[
873            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
874        ] = {}
875        _body_params: Optional[bytes] = None
876
877        # process the path parameters
878        if organization is not None:
879            _path_params['organization'] = organization
880        if connector_id is not None:
881            _path_params['connectorId'] = connector_id
882        # process the query parameters
883        # process the header parameters
884        # process the form parameters
885        # process the body parameter
886        if start_file_upload_to_connector_request is not None:
887            _body_params = start_file_upload_to_connector_request
888
889
890        # set the HTTP header `Accept`
891        if 'Accept' not in _header_params:
892            _header_params['Accept'] = self.api_client.select_header_accept(
893                [
894                    'application/json'
895                ]
896            )
897
898        # set the HTTP header `Content-Type`
899        if _content_type:
900            _header_params['Content-Type'] = _content_type
901        else:
902            _default_content_type = (
903                self.api_client.select_header_content_type(
904                    [
905                        'application/json'
906                    ]
907                )
908            )
909            if _default_content_type is not None:
910                _header_params['Content-Type'] = _default_content_type
911
912        # authentication setting
913        _auth_settings: List[str] = [
914            'bearerAuth'
915        ]
916
917        return self.api_client.param_serialize(
918            method='PUT',
919            resource_path='/org/{organization}/uploads/{connectorId}/files',
920            path_params=_path_params,
921            query_params=_query_params,
922            header_params=_header_params,
923            body=_body_params,
924            post_params=_form_params,
925            files=_files,
926            auth_settings=_auth_settings,
927            collection_formats=_collection_formats,
928            _host=_host,
929            _request_auth=_request_auth
930        )
class UploadsApi:
 31class UploadsApi:
 32    """NOTE: This class is auto generated by OpenAPI Generator
 33    Ref: https://openapi-generator.tech
 34
 35    Do not edit the class manually.
 36    """
 37
 38    def __init__(self, api_client=None) -> None:
 39        if api_client is None:
 40            api_client = ApiClient.get_default()
 41        self.api_client = api_client
 42
 43
 44    @validate_call
 45    def delete_file_from_connector(
 46        self,
 47        organization: StrictStr,
 48        connector_id: StrictStr,
 49        _request_timeout: Union[
 50            None,
 51            Annotated[StrictFloat, Field(gt=0)],
 52            Tuple[
 53                Annotated[StrictFloat, Field(gt=0)],
 54                Annotated[StrictFloat, Field(gt=0)]
 55            ]
 56        ] = None,
 57        _request_auth: Optional[Dict[StrictStr, Any]] = None,
 58        _content_type: Optional[StrictStr] = None,
 59        _headers: Optional[Dict[StrictStr, Any]] = None,
 60        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
 61    ) -> DeleteFileResponse:
 62        """Delete a file from a file upload connector
 63
 64
 65        :param organization: (required)
 66        :type organization: str
 67        :param connector_id: (required)
 68        :type connector_id: str
 69        :param _request_timeout: timeout setting for this request. If one
 70                                 number provided, it will be total request
 71                                 timeout. It can also be a pair (tuple) of
 72                                 (connection, read) timeouts.
 73        :type _request_timeout: int, tuple(int, int), optional
 74        :param _request_auth: set to override the auth_settings for an a single
 75                              request; this effectively ignores the
 76                              authentication in the spec for a single request.
 77        :type _request_auth: dict, optional
 78        :param _content_type: force content-type for the request.
 79        :type _content_type: str, Optional
 80        :param _headers: set to override the headers for a single
 81                         request; this effectively ignores the headers
 82                         in the spec for a single request.
 83        :type _headers: dict, optional
 84        :param _host_index: set to override the host_index for a single
 85                            request; this effectively ignores the host_index
 86                            in the spec for a single request.
 87        :type _host_index: int, optional
 88        :return: Returns the result object.
 89        """ # noqa: E501
 90
 91        _param = self._delete_file_from_connector_serialize(
 92            organization=organization,
 93            connector_id=connector_id,
 94            _request_auth=_request_auth,
 95            _content_type=_content_type,
 96            _headers=_headers,
 97            _host_index=_host_index
 98        )
 99
100        _response_types_map: Dict[str, Optional[str]] = {
101            '200': "DeleteFileResponse",
102            '400': "GetPipelines400Response",
103            '401': "GetPipelines400Response",
104            '403': "GetPipelines400Response",
105            '404': "GetPipelines400Response",
106            '500': "GetPipelines400Response",
107        }
108        response_data = self.api_client.call_api(
109            *_param,
110            _request_timeout=_request_timeout
111        )
112        response_data.read()
113        return self.api_client.response_deserialize(
114            response_data=response_data,
115            response_types_map=_response_types_map,
116        ).data
117
118
119    @validate_call
120    def delete_file_from_connector_with_http_info(
121        self,
122        organization: StrictStr,
123        connector_id: StrictStr,
124        _request_timeout: Union[
125            None,
126            Annotated[StrictFloat, Field(gt=0)],
127            Tuple[
128                Annotated[StrictFloat, Field(gt=0)],
129                Annotated[StrictFloat, Field(gt=0)]
130            ]
131        ] = None,
132        _request_auth: Optional[Dict[StrictStr, Any]] = None,
133        _content_type: Optional[StrictStr] = None,
134        _headers: Optional[Dict[StrictStr, Any]] = None,
135        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
136    ) -> ApiResponse[DeleteFileResponse]:
137        """Delete a file from a file upload connector
138
139
140        :param organization: (required)
141        :type organization: str
142        :param connector_id: (required)
143        :type connector_id: str
144        :param _request_timeout: timeout setting for this request. If one
145                                 number provided, it will be total request
146                                 timeout. It can also be a pair (tuple) of
147                                 (connection, read) timeouts.
148        :type _request_timeout: int, tuple(int, int), optional
149        :param _request_auth: set to override the auth_settings for an a single
150                              request; this effectively ignores the
151                              authentication in the spec for a single request.
152        :type _request_auth: dict, optional
153        :param _content_type: force content-type for the request.
154        :type _content_type: str, Optional
155        :param _headers: set to override the headers for a single
156                         request; this effectively ignores the headers
157                         in the spec for a single request.
158        :type _headers: dict, optional
159        :param _host_index: set to override the host_index for a single
160                            request; this effectively ignores the host_index
161                            in the spec for a single request.
162        :type _host_index: int, optional
163        :return: Returns the result object.
164        """ # noqa: E501
165
166        _param = self._delete_file_from_connector_serialize(
167            organization=organization,
168            connector_id=connector_id,
169            _request_auth=_request_auth,
170            _content_type=_content_type,
171            _headers=_headers,
172            _host_index=_host_index
173        )
174
175        _response_types_map: Dict[str, Optional[str]] = {
176            '200': "DeleteFileResponse",
177            '400': "GetPipelines400Response",
178            '401': "GetPipelines400Response",
179            '403': "GetPipelines400Response",
180            '404': "GetPipelines400Response",
181            '500': "GetPipelines400Response",
182        }
183        response_data = self.api_client.call_api(
184            *_param,
185            _request_timeout=_request_timeout
186        )
187        response_data.read()
188        return self.api_client.response_deserialize(
189            response_data=response_data,
190            response_types_map=_response_types_map,
191        )
192
193
194    @validate_call
195    def delete_file_from_connector_without_preload_content(
196        self,
197        organization: StrictStr,
198        connector_id: StrictStr,
199        _request_timeout: Union[
200            None,
201            Annotated[StrictFloat, Field(gt=0)],
202            Tuple[
203                Annotated[StrictFloat, Field(gt=0)],
204                Annotated[StrictFloat, Field(gt=0)]
205            ]
206        ] = None,
207        _request_auth: Optional[Dict[StrictStr, Any]] = None,
208        _content_type: Optional[StrictStr] = None,
209        _headers: Optional[Dict[StrictStr, Any]] = None,
210        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
211    ) -> RESTResponseType:
212        """Delete a file from a file upload connector
213
214
215        :param organization: (required)
216        :type organization: str
217        :param connector_id: (required)
218        :type connector_id: str
219        :param _request_timeout: timeout setting for this request. If one
220                                 number provided, it will be total request
221                                 timeout. It can also be a pair (tuple) of
222                                 (connection, read) timeouts.
223        :type _request_timeout: int, tuple(int, int), optional
224        :param _request_auth: set to override the auth_settings for an a single
225                              request; this effectively ignores the
226                              authentication in the spec for a single request.
227        :type _request_auth: dict, optional
228        :param _content_type: force content-type for the request.
229        :type _content_type: str, Optional
230        :param _headers: set to override the headers for a single
231                         request; this effectively ignores the headers
232                         in the spec for a single request.
233        :type _headers: dict, optional
234        :param _host_index: set to override the host_index for a single
235                            request; this effectively ignores the host_index
236                            in the spec for a single request.
237        :type _host_index: int, optional
238        :return: Returns the result object.
239        """ # noqa: E501
240
241        _param = self._delete_file_from_connector_serialize(
242            organization=organization,
243            connector_id=connector_id,
244            _request_auth=_request_auth,
245            _content_type=_content_type,
246            _headers=_headers,
247            _host_index=_host_index
248        )
249
250        _response_types_map: Dict[str, Optional[str]] = {
251            '200': "DeleteFileResponse",
252            '400': "GetPipelines400Response",
253            '401': "GetPipelines400Response",
254            '403': "GetPipelines400Response",
255            '404': "GetPipelines400Response",
256            '500': "GetPipelines400Response",
257        }
258        response_data = self.api_client.call_api(
259            *_param,
260            _request_timeout=_request_timeout
261        )
262        return response_data.response
263
264
265    def _delete_file_from_connector_serialize(
266        self,
267        organization,
268        connector_id,
269        _request_auth,
270        _content_type,
271        _headers,
272        _host_index,
273    ) -> RequestSerialized:
274
275        _host = None
276
277        _collection_formats: Dict[str, str] = {
278        }
279
280        _path_params: Dict[str, str] = {}
281        _query_params: List[Tuple[str, str]] = []
282        _header_params: Dict[str, Optional[str]] = _headers or {}
283        _form_params: List[Tuple[str, str]] = []
284        _files: Dict[
285            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
286        ] = {}
287        _body_params: Optional[bytes] = None
288
289        # process the path parameters
290        if organization is not None:
291            _path_params['organization'] = organization
292        if connector_id is not None:
293            _path_params['connectorId'] = connector_id
294        # process the query parameters
295        # process the header parameters
296        # process the form parameters
297        # process the body parameter
298
299
300        # set the HTTP header `Accept`
301        if 'Accept' not in _header_params:
302            _header_params['Accept'] = self.api_client.select_header_accept(
303                [
304                    'application/json'
305                ]
306            )
307
308
309        # authentication setting
310        _auth_settings: List[str] = [
311            'bearerAuth'
312        ]
313
314        return self.api_client.param_serialize(
315            method='DELETE',
316            resource_path='/org/{organization}/uploads/{connectorId}/files',
317            path_params=_path_params,
318            query_params=_query_params,
319            header_params=_header_params,
320            body=_body_params,
321            post_params=_form_params,
322            files=_files,
323            auth_settings=_auth_settings,
324            collection_formats=_collection_formats,
325            _host=_host,
326            _request_auth=_request_auth
327        )
328
329
330
331
332    @validate_call
333    def get_upload_files_from_connector(
334        self,
335        organization: StrictStr,
336        connector_id: StrictStr,
337        _request_timeout: Union[
338            None,
339            Annotated[StrictFloat, Field(gt=0)],
340            Tuple[
341                Annotated[StrictFloat, Field(gt=0)],
342                Annotated[StrictFloat, Field(gt=0)]
343            ]
344        ] = None,
345        _request_auth: Optional[Dict[StrictStr, Any]] = None,
346        _content_type: Optional[StrictStr] = None,
347        _headers: Optional[Dict[StrictStr, Any]] = None,
348        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
349    ) -> GetUploadFilesResponse:
350        """Get uploaded files from a file upload connector
351
352
353        :param organization: (required)
354        :type organization: str
355        :param connector_id: (required)
356        :type connector_id: str
357        :param _request_timeout: timeout setting for this request. If one
358                                 number provided, it will be total request
359                                 timeout. It can also be a pair (tuple) of
360                                 (connection, read) timeouts.
361        :type _request_timeout: int, tuple(int, int), optional
362        :param _request_auth: set to override the auth_settings for an a single
363                              request; this effectively ignores the
364                              authentication in the spec for a single request.
365        :type _request_auth: dict, optional
366        :param _content_type: force content-type for the request.
367        :type _content_type: str, Optional
368        :param _headers: set to override the headers for a single
369                         request; this effectively ignores the headers
370                         in the spec for a single request.
371        :type _headers: dict, optional
372        :param _host_index: set to override the host_index for a single
373                            request; this effectively ignores the host_index
374                            in the spec for a single request.
375        :type _host_index: int, optional
376        :return: Returns the result object.
377        """ # noqa: E501
378
379        _param = self._get_upload_files_from_connector_serialize(
380            organization=organization,
381            connector_id=connector_id,
382            _request_auth=_request_auth,
383            _content_type=_content_type,
384            _headers=_headers,
385            _host_index=_host_index
386        )
387
388        _response_types_map: Dict[str, Optional[str]] = {
389            '200': "GetUploadFilesResponse",
390            '400': "GetPipelines400Response",
391            '401': "GetPipelines400Response",
392            '403': "GetPipelines400Response",
393            '404': "GetPipelines400Response",
394            '500': "GetPipelines400Response",
395        }
396        response_data = self.api_client.call_api(
397            *_param,
398            _request_timeout=_request_timeout
399        )
400        response_data.read()
401        return self.api_client.response_deserialize(
402            response_data=response_data,
403            response_types_map=_response_types_map,
404        ).data
405
406
407    @validate_call
408    def get_upload_files_from_connector_with_http_info(
409        self,
410        organization: StrictStr,
411        connector_id: StrictStr,
412        _request_timeout: Union[
413            None,
414            Annotated[StrictFloat, Field(gt=0)],
415            Tuple[
416                Annotated[StrictFloat, Field(gt=0)],
417                Annotated[StrictFloat, Field(gt=0)]
418            ]
419        ] = None,
420        _request_auth: Optional[Dict[StrictStr, Any]] = None,
421        _content_type: Optional[StrictStr] = None,
422        _headers: Optional[Dict[StrictStr, Any]] = None,
423        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
424    ) -> ApiResponse[GetUploadFilesResponse]:
425        """Get uploaded files from a file upload connector
426
427
428        :param organization: (required)
429        :type organization: str
430        :param connector_id: (required)
431        :type connector_id: str
432        :param _request_timeout: timeout setting for this request. If one
433                                 number provided, it will be total request
434                                 timeout. It can also be a pair (tuple) of
435                                 (connection, read) timeouts.
436        :type _request_timeout: int, tuple(int, int), optional
437        :param _request_auth: set to override the auth_settings for an a single
438                              request; this effectively ignores the
439                              authentication in the spec for a single request.
440        :type _request_auth: dict, optional
441        :param _content_type: force content-type for the request.
442        :type _content_type: str, Optional
443        :param _headers: set to override the headers for a single
444                         request; this effectively ignores the headers
445                         in the spec for a single request.
446        :type _headers: dict, optional
447        :param _host_index: set to override the host_index for a single
448                            request; this effectively ignores the host_index
449                            in the spec for a single request.
450        :type _host_index: int, optional
451        :return: Returns the result object.
452        """ # noqa: E501
453
454        _param = self._get_upload_files_from_connector_serialize(
455            organization=organization,
456            connector_id=connector_id,
457            _request_auth=_request_auth,
458            _content_type=_content_type,
459            _headers=_headers,
460            _host_index=_host_index
461        )
462
463        _response_types_map: Dict[str, Optional[str]] = {
464            '200': "GetUploadFilesResponse",
465            '400': "GetPipelines400Response",
466            '401': "GetPipelines400Response",
467            '403': "GetPipelines400Response",
468            '404': "GetPipelines400Response",
469            '500': "GetPipelines400Response",
470        }
471        response_data = self.api_client.call_api(
472            *_param,
473            _request_timeout=_request_timeout
474        )
475        response_data.read()
476        return self.api_client.response_deserialize(
477            response_data=response_data,
478            response_types_map=_response_types_map,
479        )
480
481
482    @validate_call
483    def get_upload_files_from_connector_without_preload_content(
484        self,
485        organization: StrictStr,
486        connector_id: StrictStr,
487        _request_timeout: Union[
488            None,
489            Annotated[StrictFloat, Field(gt=0)],
490            Tuple[
491                Annotated[StrictFloat, Field(gt=0)],
492                Annotated[StrictFloat, Field(gt=0)]
493            ]
494        ] = None,
495        _request_auth: Optional[Dict[StrictStr, Any]] = None,
496        _content_type: Optional[StrictStr] = None,
497        _headers: Optional[Dict[StrictStr, Any]] = None,
498        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
499    ) -> RESTResponseType:
500        """Get uploaded files from a file upload connector
501
502
503        :param organization: (required)
504        :type organization: str
505        :param connector_id: (required)
506        :type connector_id: str
507        :param _request_timeout: timeout setting for this request. If one
508                                 number provided, it will be total request
509                                 timeout. It can also be a pair (tuple) of
510                                 (connection, read) timeouts.
511        :type _request_timeout: int, tuple(int, int), optional
512        :param _request_auth: set to override the auth_settings for an a single
513                              request; this effectively ignores the
514                              authentication in the spec for a single request.
515        :type _request_auth: dict, optional
516        :param _content_type: force content-type for the request.
517        :type _content_type: str, Optional
518        :param _headers: set to override the headers for a single
519                         request; this effectively ignores the headers
520                         in the spec for a single request.
521        :type _headers: dict, optional
522        :param _host_index: set to override the host_index for a single
523                            request; this effectively ignores the host_index
524                            in the spec for a single request.
525        :type _host_index: int, optional
526        :return: Returns the result object.
527        """ # noqa: E501
528
529        _param = self._get_upload_files_from_connector_serialize(
530            organization=organization,
531            connector_id=connector_id,
532            _request_auth=_request_auth,
533            _content_type=_content_type,
534            _headers=_headers,
535            _host_index=_host_index
536        )
537
538        _response_types_map: Dict[str, Optional[str]] = {
539            '200': "GetUploadFilesResponse",
540            '400': "GetPipelines400Response",
541            '401': "GetPipelines400Response",
542            '403': "GetPipelines400Response",
543            '404': "GetPipelines400Response",
544            '500': "GetPipelines400Response",
545        }
546        response_data = self.api_client.call_api(
547            *_param,
548            _request_timeout=_request_timeout
549        )
550        return response_data.response
551
552
553    def _get_upload_files_from_connector_serialize(
554        self,
555        organization,
556        connector_id,
557        _request_auth,
558        _content_type,
559        _headers,
560        _host_index,
561    ) -> RequestSerialized:
562
563        _host = None
564
565        _collection_formats: Dict[str, str] = {
566        }
567
568        _path_params: Dict[str, str] = {}
569        _query_params: List[Tuple[str, str]] = []
570        _header_params: Dict[str, Optional[str]] = _headers or {}
571        _form_params: List[Tuple[str, str]] = []
572        _files: Dict[
573            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
574        ] = {}
575        _body_params: Optional[bytes] = None
576
577        # process the path parameters
578        if organization is not None:
579            _path_params['organization'] = organization
580        if connector_id is not None:
581            _path_params['connectorId'] = connector_id
582        # process the query parameters
583        # process the header parameters
584        # process the form parameters
585        # process the body parameter
586
587
588        # set the HTTP header `Accept`
589        if 'Accept' not in _header_params:
590            _header_params['Accept'] = self.api_client.select_header_accept(
591                [
592                    'application/json'
593                ]
594            )
595
596
597        # authentication setting
598        _auth_settings: List[str] = [
599            'bearerAuth'
600        ]
601
602        return self.api_client.param_serialize(
603            method='GET',
604            resource_path='/org/{organization}/uploads/{connectorId}/files',
605            path_params=_path_params,
606            query_params=_query_params,
607            header_params=_header_params,
608            body=_body_params,
609            post_params=_form_params,
610            files=_files,
611            auth_settings=_auth_settings,
612            collection_formats=_collection_formats,
613            _host=_host,
614            _request_auth=_request_auth
615        )
616
617
618
619
620    @validate_call
621    def start_file_upload_to_connector(
622        self,
623        organization: StrictStr,
624        connector_id: StrictStr,
625        start_file_upload_to_connector_request: StartFileUploadToConnectorRequest,
626        _request_timeout: Union[
627            None,
628            Annotated[StrictFloat, Field(gt=0)],
629            Tuple[
630                Annotated[StrictFloat, Field(gt=0)],
631                Annotated[StrictFloat, Field(gt=0)]
632            ]
633        ] = None,
634        _request_auth: Optional[Dict[StrictStr, Any]] = None,
635        _content_type: Optional[StrictStr] = None,
636        _headers: Optional[Dict[StrictStr, Any]] = None,
637        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
638    ) -> StartFileUploadToConnectorResponse:
639        """Upload a file to a file upload connector
640
641
642        :param organization: (required)
643        :type organization: str
644        :param connector_id: (required)
645        :type connector_id: str
646        :param start_file_upload_to_connector_request: (required)
647        :type start_file_upload_to_connector_request: StartFileUploadToConnectorRequest
648        :param _request_timeout: timeout setting for this request. If one
649                                 number provided, it will be total request
650                                 timeout. It can also be a pair (tuple) of
651                                 (connection, read) timeouts.
652        :type _request_timeout: int, tuple(int, int), optional
653        :param _request_auth: set to override the auth_settings for an a single
654                              request; this effectively ignores the
655                              authentication in the spec for a single request.
656        :type _request_auth: dict, optional
657        :param _content_type: force content-type for the request.
658        :type _content_type: str, Optional
659        :param _headers: set to override the headers for a single
660                         request; this effectively ignores the headers
661                         in the spec for a single request.
662        :type _headers: dict, optional
663        :param _host_index: set to override the host_index for a single
664                            request; this effectively ignores the host_index
665                            in the spec for a single request.
666        :type _host_index: int, optional
667        :return: Returns the result object.
668        """ # noqa: E501
669
670        _param = self._start_file_upload_to_connector_serialize(
671            organization=organization,
672            connector_id=connector_id,
673            start_file_upload_to_connector_request=start_file_upload_to_connector_request,
674            _request_auth=_request_auth,
675            _content_type=_content_type,
676            _headers=_headers,
677            _host_index=_host_index
678        )
679
680        _response_types_map: Dict[str, Optional[str]] = {
681            '200': "StartFileUploadToConnectorResponse",
682            '400': "GetPipelines400Response",
683            '401': "GetPipelines400Response",
684            '403': "GetPipelines400Response",
685            '404': "GetPipelines400Response",
686            '500': "GetPipelines400Response",
687        }
688        response_data = self.api_client.call_api(
689            *_param,
690            _request_timeout=_request_timeout
691        )
692        response_data.read()
693        return self.api_client.response_deserialize(
694            response_data=response_data,
695            response_types_map=_response_types_map,
696        ).data
697
698
699    @validate_call
700    def start_file_upload_to_connector_with_http_info(
701        self,
702        organization: StrictStr,
703        connector_id: StrictStr,
704        start_file_upload_to_connector_request: StartFileUploadToConnectorRequest,
705        _request_timeout: Union[
706            None,
707            Annotated[StrictFloat, Field(gt=0)],
708            Tuple[
709                Annotated[StrictFloat, Field(gt=0)],
710                Annotated[StrictFloat, Field(gt=0)]
711            ]
712        ] = None,
713        _request_auth: Optional[Dict[StrictStr, Any]] = None,
714        _content_type: Optional[StrictStr] = None,
715        _headers: Optional[Dict[StrictStr, Any]] = None,
716        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
717    ) -> ApiResponse[StartFileUploadToConnectorResponse]:
718        """Upload a file to a file upload connector
719
720
721        :param organization: (required)
722        :type organization: str
723        :param connector_id: (required)
724        :type connector_id: str
725        :param start_file_upload_to_connector_request: (required)
726        :type start_file_upload_to_connector_request: StartFileUploadToConnectorRequest
727        :param _request_timeout: timeout setting for this request. If one
728                                 number provided, it will be total request
729                                 timeout. It can also be a pair (tuple) of
730                                 (connection, read) timeouts.
731        :type _request_timeout: int, tuple(int, int), optional
732        :param _request_auth: set to override the auth_settings for an a single
733                              request; this effectively ignores the
734                              authentication in the spec for a single request.
735        :type _request_auth: dict, optional
736        :param _content_type: force content-type for the request.
737        :type _content_type: str, Optional
738        :param _headers: set to override the headers for a single
739                         request; this effectively ignores the headers
740                         in the spec for a single request.
741        :type _headers: dict, optional
742        :param _host_index: set to override the host_index for a single
743                            request; this effectively ignores the host_index
744                            in the spec for a single request.
745        :type _host_index: int, optional
746        :return: Returns the result object.
747        """ # noqa: E501
748
749        _param = self._start_file_upload_to_connector_serialize(
750            organization=organization,
751            connector_id=connector_id,
752            start_file_upload_to_connector_request=start_file_upload_to_connector_request,
753            _request_auth=_request_auth,
754            _content_type=_content_type,
755            _headers=_headers,
756            _host_index=_host_index
757        )
758
759        _response_types_map: Dict[str, Optional[str]] = {
760            '200': "StartFileUploadToConnectorResponse",
761            '400': "GetPipelines400Response",
762            '401': "GetPipelines400Response",
763            '403': "GetPipelines400Response",
764            '404': "GetPipelines400Response",
765            '500': "GetPipelines400Response",
766        }
767        response_data = self.api_client.call_api(
768            *_param,
769            _request_timeout=_request_timeout
770        )
771        response_data.read()
772        return self.api_client.response_deserialize(
773            response_data=response_data,
774            response_types_map=_response_types_map,
775        )
776
777
778    @validate_call
779    def start_file_upload_to_connector_without_preload_content(
780        self,
781        organization: StrictStr,
782        connector_id: StrictStr,
783        start_file_upload_to_connector_request: StartFileUploadToConnectorRequest,
784        _request_timeout: Union[
785            None,
786            Annotated[StrictFloat, Field(gt=0)],
787            Tuple[
788                Annotated[StrictFloat, Field(gt=0)],
789                Annotated[StrictFloat, Field(gt=0)]
790            ]
791        ] = None,
792        _request_auth: Optional[Dict[StrictStr, Any]] = None,
793        _content_type: Optional[StrictStr] = None,
794        _headers: Optional[Dict[StrictStr, Any]] = None,
795        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
796    ) -> RESTResponseType:
797        """Upload a file to a file upload connector
798
799
800        :param organization: (required)
801        :type organization: str
802        :param connector_id: (required)
803        :type connector_id: str
804        :param start_file_upload_to_connector_request: (required)
805        :type start_file_upload_to_connector_request: StartFileUploadToConnectorRequest
806        :param _request_timeout: timeout setting for this request. If one
807                                 number provided, it will be total request
808                                 timeout. It can also be a pair (tuple) of
809                                 (connection, read) timeouts.
810        :type _request_timeout: int, tuple(int, int), optional
811        :param _request_auth: set to override the auth_settings for an a single
812                              request; this effectively ignores the
813                              authentication in the spec for a single request.
814        :type _request_auth: dict, optional
815        :param _content_type: force content-type for the request.
816        :type _content_type: str, Optional
817        :param _headers: set to override the headers for a single
818                         request; this effectively ignores the headers
819                         in the spec for a single request.
820        :type _headers: dict, optional
821        :param _host_index: set to override the host_index for a single
822                            request; this effectively ignores the host_index
823                            in the spec for a single request.
824        :type _host_index: int, optional
825        :return: Returns the result object.
826        """ # noqa: E501
827
828        _param = self._start_file_upload_to_connector_serialize(
829            organization=organization,
830            connector_id=connector_id,
831            start_file_upload_to_connector_request=start_file_upload_to_connector_request,
832            _request_auth=_request_auth,
833            _content_type=_content_type,
834            _headers=_headers,
835            _host_index=_host_index
836        )
837
838        _response_types_map: Dict[str, Optional[str]] = {
839            '200': "StartFileUploadToConnectorResponse",
840            '400': "GetPipelines400Response",
841            '401': "GetPipelines400Response",
842            '403': "GetPipelines400Response",
843            '404': "GetPipelines400Response",
844            '500': "GetPipelines400Response",
845        }
846        response_data = self.api_client.call_api(
847            *_param,
848            _request_timeout=_request_timeout
849        )
850        return response_data.response
851
852
853    def _start_file_upload_to_connector_serialize(
854        self,
855        organization,
856        connector_id,
857        start_file_upload_to_connector_request,
858        _request_auth,
859        _content_type,
860        _headers,
861        _host_index,
862    ) -> RequestSerialized:
863
864        _host = None
865
866        _collection_formats: Dict[str, str] = {
867        }
868
869        _path_params: Dict[str, str] = {}
870        _query_params: List[Tuple[str, str]] = []
871        _header_params: Dict[str, Optional[str]] = _headers or {}
872        _form_params: List[Tuple[str, str]] = []
873        _files: Dict[
874            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
875        ] = {}
876        _body_params: Optional[bytes] = None
877
878        # process the path parameters
879        if organization is not None:
880            _path_params['organization'] = organization
881        if connector_id is not None:
882            _path_params['connectorId'] = connector_id
883        # process the query parameters
884        # process the header parameters
885        # process the form parameters
886        # process the body parameter
887        if start_file_upload_to_connector_request is not None:
888            _body_params = start_file_upload_to_connector_request
889
890
891        # set the HTTP header `Accept`
892        if 'Accept' not in _header_params:
893            _header_params['Accept'] = self.api_client.select_header_accept(
894                [
895                    'application/json'
896                ]
897            )
898
899        # set the HTTP header `Content-Type`
900        if _content_type:
901            _header_params['Content-Type'] = _content_type
902        else:
903            _default_content_type = (
904                self.api_client.select_header_content_type(
905                    [
906                        'application/json'
907                    ]
908                )
909            )
910            if _default_content_type is not None:
911                _header_params['Content-Type'] = _default_content_type
912
913        # authentication setting
914        _auth_settings: List[str] = [
915            'bearerAuth'
916        ]
917
918        return self.api_client.param_serialize(
919            method='PUT',
920            resource_path='/org/{organization}/uploads/{connectorId}/files',
921            path_params=_path_params,
922            query_params=_query_params,
923            header_params=_header_params,
924            body=_body_params,
925            post_params=_form_params,
926            files=_files,
927            auth_settings=_auth_settings,
928            collection_formats=_collection_formats,
929            _host=_host,
930            _request_auth=_request_auth
931        )

NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech

Do not edit the class manually.

UploadsApi(api_client=None)
38    def __init__(self, api_client=None) -> None:
39        if api_client is None:
40            api_client = ApiClient.get_default()
41        self.api_client = api_client
api_client
@validate_call
def delete_file_from_connector( self, organization: typing.Annotated[str, Strict(strict=True)], connector_id: typing.Annotated[str, Strict(strict=True)], _request_timeout: Union[NoneType, Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])], Tuple[Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])], Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])]]] = None, _request_auth: Optional[Dict[Annotated[str, Strict(strict=True)], Any]] = None, _content_type: Optional[Annotated[str, Strict(strict=True)]] = None, _headers: Optional[Dict[Annotated[str, Strict(strict=True)], Any]] = None, _host_index: typing.Annotated[int, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=0), Le(le=0)])] = 0) -> vectorize_client.models.delete_file_response.DeleteFileResponse:
 44    @validate_call
 45    def delete_file_from_connector(
 46        self,
 47        organization: StrictStr,
 48        connector_id: StrictStr,
 49        _request_timeout: Union[
 50            None,
 51            Annotated[StrictFloat, Field(gt=0)],
 52            Tuple[
 53                Annotated[StrictFloat, Field(gt=0)],
 54                Annotated[StrictFloat, Field(gt=0)]
 55            ]
 56        ] = None,
 57        _request_auth: Optional[Dict[StrictStr, Any]] = None,
 58        _content_type: Optional[StrictStr] = None,
 59        _headers: Optional[Dict[StrictStr, Any]] = None,
 60        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
 61    ) -> DeleteFileResponse:
 62        """Delete a file from a file upload connector
 63
 64
 65        :param organization: (required)
 66        :type organization: str
 67        :param connector_id: (required)
 68        :type connector_id: str
 69        :param _request_timeout: timeout setting for this request. If one
 70                                 number provided, it will be total request
 71                                 timeout. It can also be a pair (tuple) of
 72                                 (connection, read) timeouts.
 73        :type _request_timeout: int, tuple(int, int), optional
 74        :param _request_auth: set to override the auth_settings for an a single
 75                              request; this effectively ignores the
 76                              authentication in the spec for a single request.
 77        :type _request_auth: dict, optional
 78        :param _content_type: force content-type for the request.
 79        :type _content_type: str, Optional
 80        :param _headers: set to override the headers for a single
 81                         request; this effectively ignores the headers
 82                         in the spec for a single request.
 83        :type _headers: dict, optional
 84        :param _host_index: set to override the host_index for a single
 85                            request; this effectively ignores the host_index
 86                            in the spec for a single request.
 87        :type _host_index: int, optional
 88        :return: Returns the result object.
 89        """ # noqa: E501
 90
 91        _param = self._delete_file_from_connector_serialize(
 92            organization=organization,
 93            connector_id=connector_id,
 94            _request_auth=_request_auth,
 95            _content_type=_content_type,
 96            _headers=_headers,
 97            _host_index=_host_index
 98        )
 99
100        _response_types_map: Dict[str, Optional[str]] = {
101            '200': "DeleteFileResponse",
102            '400': "GetPipelines400Response",
103            '401': "GetPipelines400Response",
104            '403': "GetPipelines400Response",
105            '404': "GetPipelines400Response",
106            '500': "GetPipelines400Response",
107        }
108        response_data = self.api_client.call_api(
109            *_param,
110            _request_timeout=_request_timeout
111        )
112        response_data.read()
113        return self.api_client.response_deserialize(
114            response_data=response_data,
115            response_types_map=_response_types_map,
116        ).data

Delete a file from a file upload connector

Parameters
  • organization: (required)
  • connector_id: (required)
  • _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
  • _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
  • _content_type: force content-type for the request.
  • _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
  • _host_index: set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
Returns

Returns the result object.

@validate_call
def delete_file_from_connector_with_http_info( self, organization: typing.Annotated[str, Strict(strict=True)], connector_id: typing.Annotated[str, Strict(strict=True)], _request_timeout: Union[NoneType, Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])], Tuple[Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])], Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])]]] = None, _request_auth: Optional[Dict[Annotated[str, Strict(strict=True)], Any]] = None, _content_type: Optional[Annotated[str, Strict(strict=True)]] = None, _headers: Optional[Dict[Annotated[str, Strict(strict=True)], Any]] = None, _host_index: typing.Annotated[int, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=0), Le(le=0)])] = 0) -> vectorize_client.api_response.ApiResponse[DeleteFileResponse]:
119    @validate_call
120    def delete_file_from_connector_with_http_info(
121        self,
122        organization: StrictStr,
123        connector_id: StrictStr,
124        _request_timeout: Union[
125            None,
126            Annotated[StrictFloat, Field(gt=0)],
127            Tuple[
128                Annotated[StrictFloat, Field(gt=0)],
129                Annotated[StrictFloat, Field(gt=0)]
130            ]
131        ] = None,
132        _request_auth: Optional[Dict[StrictStr, Any]] = None,
133        _content_type: Optional[StrictStr] = None,
134        _headers: Optional[Dict[StrictStr, Any]] = None,
135        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
136    ) -> ApiResponse[DeleteFileResponse]:
137        """Delete a file from a file upload connector
138
139
140        :param organization: (required)
141        :type organization: str
142        :param connector_id: (required)
143        :type connector_id: str
144        :param _request_timeout: timeout setting for this request. If one
145                                 number provided, it will be total request
146                                 timeout. It can also be a pair (tuple) of
147                                 (connection, read) timeouts.
148        :type _request_timeout: int, tuple(int, int), optional
149        :param _request_auth: set to override the auth_settings for an a single
150                              request; this effectively ignores the
151                              authentication in the spec for a single request.
152        :type _request_auth: dict, optional
153        :param _content_type: force content-type for the request.
154        :type _content_type: str, Optional
155        :param _headers: set to override the headers for a single
156                         request; this effectively ignores the headers
157                         in the spec for a single request.
158        :type _headers: dict, optional
159        :param _host_index: set to override the host_index for a single
160                            request; this effectively ignores the host_index
161                            in the spec for a single request.
162        :type _host_index: int, optional
163        :return: Returns the result object.
164        """ # noqa: E501
165
166        _param = self._delete_file_from_connector_serialize(
167            organization=organization,
168            connector_id=connector_id,
169            _request_auth=_request_auth,
170            _content_type=_content_type,
171            _headers=_headers,
172            _host_index=_host_index
173        )
174
175        _response_types_map: Dict[str, Optional[str]] = {
176            '200': "DeleteFileResponse",
177            '400': "GetPipelines400Response",
178            '401': "GetPipelines400Response",
179            '403': "GetPipelines400Response",
180            '404': "GetPipelines400Response",
181            '500': "GetPipelines400Response",
182        }
183        response_data = self.api_client.call_api(
184            *_param,
185            _request_timeout=_request_timeout
186        )
187        response_data.read()
188        return self.api_client.response_deserialize(
189            response_data=response_data,
190            response_types_map=_response_types_map,
191        )

Delete a file from a file upload connector

Parameters
  • organization: (required)
  • connector_id: (required)
  • _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
  • _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
  • _content_type: force content-type for the request.
  • _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
  • _host_index: set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
Returns

Returns the result object.

@validate_call
def delete_file_from_connector_without_preload_content( self, organization: typing.Annotated[str, Strict(strict=True)], connector_id: typing.Annotated[str, Strict(strict=True)], _request_timeout: Union[NoneType, Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])], Tuple[Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])], Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])]]] = None, _request_auth: Optional[Dict[Annotated[str, Strict(strict=True)], Any]] = None, _content_type: Optional[Annotated[str, Strict(strict=True)]] = None, _headers: Optional[Dict[Annotated[str, Strict(strict=True)], Any]] = None, _host_index: typing.Annotated[int, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=0), Le(le=0)])] = 0) -> urllib3.response.HTTPResponse:
194    @validate_call
195    def delete_file_from_connector_without_preload_content(
196        self,
197        organization: StrictStr,
198        connector_id: StrictStr,
199        _request_timeout: Union[
200            None,
201            Annotated[StrictFloat, Field(gt=0)],
202            Tuple[
203                Annotated[StrictFloat, Field(gt=0)],
204                Annotated[StrictFloat, Field(gt=0)]
205            ]
206        ] = None,
207        _request_auth: Optional[Dict[StrictStr, Any]] = None,
208        _content_type: Optional[StrictStr] = None,
209        _headers: Optional[Dict[StrictStr, Any]] = None,
210        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
211    ) -> RESTResponseType:
212        """Delete a file from a file upload connector
213
214
215        :param organization: (required)
216        :type organization: str
217        :param connector_id: (required)
218        :type connector_id: str
219        :param _request_timeout: timeout setting for this request. If one
220                                 number provided, it will be total request
221                                 timeout. It can also be a pair (tuple) of
222                                 (connection, read) timeouts.
223        :type _request_timeout: int, tuple(int, int), optional
224        :param _request_auth: set to override the auth_settings for an a single
225                              request; this effectively ignores the
226                              authentication in the spec for a single request.
227        :type _request_auth: dict, optional
228        :param _content_type: force content-type for the request.
229        :type _content_type: str, Optional
230        :param _headers: set to override the headers for a single
231                         request; this effectively ignores the headers
232                         in the spec for a single request.
233        :type _headers: dict, optional
234        :param _host_index: set to override the host_index for a single
235                            request; this effectively ignores the host_index
236                            in the spec for a single request.
237        :type _host_index: int, optional
238        :return: Returns the result object.
239        """ # noqa: E501
240
241        _param = self._delete_file_from_connector_serialize(
242            organization=organization,
243            connector_id=connector_id,
244            _request_auth=_request_auth,
245            _content_type=_content_type,
246            _headers=_headers,
247            _host_index=_host_index
248        )
249
250        _response_types_map: Dict[str, Optional[str]] = {
251            '200': "DeleteFileResponse",
252            '400': "GetPipelines400Response",
253            '401': "GetPipelines400Response",
254            '403': "GetPipelines400Response",
255            '404': "GetPipelines400Response",
256            '500': "GetPipelines400Response",
257        }
258        response_data = self.api_client.call_api(
259            *_param,
260            _request_timeout=_request_timeout
261        )
262        return response_data.response

Delete a file from a file upload connector

Parameters
  • organization: (required)
  • connector_id: (required)
  • _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
  • _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
  • _content_type: force content-type for the request.
  • _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
  • _host_index: set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
Returns

Returns the result object.

@validate_call
def get_upload_files_from_connector( self, organization: typing.Annotated[str, Strict(strict=True)], connector_id: typing.Annotated[str, Strict(strict=True)], _request_timeout: Union[NoneType, Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])], Tuple[Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])], Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])]]] = None, _request_auth: Optional[Dict[Annotated[str, Strict(strict=True)], Any]] = None, _content_type: Optional[Annotated[str, Strict(strict=True)]] = None, _headers: Optional[Dict[Annotated[str, Strict(strict=True)], Any]] = None, _host_index: typing.Annotated[int, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=0), Le(le=0)])] = 0) -> vectorize_client.models.get_upload_files_response.GetUploadFilesResponse:
332    @validate_call
333    def get_upload_files_from_connector(
334        self,
335        organization: StrictStr,
336        connector_id: StrictStr,
337        _request_timeout: Union[
338            None,
339            Annotated[StrictFloat, Field(gt=0)],
340            Tuple[
341                Annotated[StrictFloat, Field(gt=0)],
342                Annotated[StrictFloat, Field(gt=0)]
343            ]
344        ] = None,
345        _request_auth: Optional[Dict[StrictStr, Any]] = None,
346        _content_type: Optional[StrictStr] = None,
347        _headers: Optional[Dict[StrictStr, Any]] = None,
348        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
349    ) -> GetUploadFilesResponse:
350        """Get uploaded files from a file upload connector
351
352
353        :param organization: (required)
354        :type organization: str
355        :param connector_id: (required)
356        :type connector_id: str
357        :param _request_timeout: timeout setting for this request. If one
358                                 number provided, it will be total request
359                                 timeout. It can also be a pair (tuple) of
360                                 (connection, read) timeouts.
361        :type _request_timeout: int, tuple(int, int), optional
362        :param _request_auth: set to override the auth_settings for an a single
363                              request; this effectively ignores the
364                              authentication in the spec for a single request.
365        :type _request_auth: dict, optional
366        :param _content_type: force content-type for the request.
367        :type _content_type: str, Optional
368        :param _headers: set to override the headers for a single
369                         request; this effectively ignores the headers
370                         in the spec for a single request.
371        :type _headers: dict, optional
372        :param _host_index: set to override the host_index for a single
373                            request; this effectively ignores the host_index
374                            in the spec for a single request.
375        :type _host_index: int, optional
376        :return: Returns the result object.
377        """ # noqa: E501
378
379        _param = self._get_upload_files_from_connector_serialize(
380            organization=organization,
381            connector_id=connector_id,
382            _request_auth=_request_auth,
383            _content_type=_content_type,
384            _headers=_headers,
385            _host_index=_host_index
386        )
387
388        _response_types_map: Dict[str, Optional[str]] = {
389            '200': "GetUploadFilesResponse",
390            '400': "GetPipelines400Response",
391            '401': "GetPipelines400Response",
392            '403': "GetPipelines400Response",
393            '404': "GetPipelines400Response",
394            '500': "GetPipelines400Response",
395        }
396        response_data = self.api_client.call_api(
397            *_param,
398            _request_timeout=_request_timeout
399        )
400        response_data.read()
401        return self.api_client.response_deserialize(
402            response_data=response_data,
403            response_types_map=_response_types_map,
404        ).data

Get uploaded files from a file upload connector

Parameters
  • organization: (required)
  • connector_id: (required)
  • _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
  • _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
  • _content_type: force content-type for the request.
  • _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
  • _host_index: set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
Returns

Returns the result object.

@validate_call
def get_upload_files_from_connector_with_http_info( self, organization: typing.Annotated[str, Strict(strict=True)], connector_id: typing.Annotated[str, Strict(strict=True)], _request_timeout: Union[NoneType, Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])], Tuple[Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])], Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])]]] = None, _request_auth: Optional[Dict[Annotated[str, Strict(strict=True)], Any]] = None, _content_type: Optional[Annotated[str, Strict(strict=True)]] = None, _headers: Optional[Dict[Annotated[str, Strict(strict=True)], Any]] = None, _host_index: typing.Annotated[int, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=0), Le(le=0)])] = 0) -> vectorize_client.api_response.ApiResponse[GetUploadFilesResponse]:
407    @validate_call
408    def get_upload_files_from_connector_with_http_info(
409        self,
410        organization: StrictStr,
411        connector_id: StrictStr,
412        _request_timeout: Union[
413            None,
414            Annotated[StrictFloat, Field(gt=0)],
415            Tuple[
416                Annotated[StrictFloat, Field(gt=0)],
417                Annotated[StrictFloat, Field(gt=0)]
418            ]
419        ] = None,
420        _request_auth: Optional[Dict[StrictStr, Any]] = None,
421        _content_type: Optional[StrictStr] = None,
422        _headers: Optional[Dict[StrictStr, Any]] = None,
423        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
424    ) -> ApiResponse[GetUploadFilesResponse]:
425        """Get uploaded files from a file upload connector
426
427
428        :param organization: (required)
429        :type organization: str
430        :param connector_id: (required)
431        :type connector_id: str
432        :param _request_timeout: timeout setting for this request. If one
433                                 number provided, it will be total request
434                                 timeout. It can also be a pair (tuple) of
435                                 (connection, read) timeouts.
436        :type _request_timeout: int, tuple(int, int), optional
437        :param _request_auth: set to override the auth_settings for an a single
438                              request; this effectively ignores the
439                              authentication in the spec for a single request.
440        :type _request_auth: dict, optional
441        :param _content_type: force content-type for the request.
442        :type _content_type: str, Optional
443        :param _headers: set to override the headers for a single
444                         request; this effectively ignores the headers
445                         in the spec for a single request.
446        :type _headers: dict, optional
447        :param _host_index: set to override the host_index for a single
448                            request; this effectively ignores the host_index
449                            in the spec for a single request.
450        :type _host_index: int, optional
451        :return: Returns the result object.
452        """ # noqa: E501
453
454        _param = self._get_upload_files_from_connector_serialize(
455            organization=organization,
456            connector_id=connector_id,
457            _request_auth=_request_auth,
458            _content_type=_content_type,
459            _headers=_headers,
460            _host_index=_host_index
461        )
462
463        _response_types_map: Dict[str, Optional[str]] = {
464            '200': "GetUploadFilesResponse",
465            '400': "GetPipelines400Response",
466            '401': "GetPipelines400Response",
467            '403': "GetPipelines400Response",
468            '404': "GetPipelines400Response",
469            '500': "GetPipelines400Response",
470        }
471        response_data = self.api_client.call_api(
472            *_param,
473            _request_timeout=_request_timeout
474        )
475        response_data.read()
476        return self.api_client.response_deserialize(
477            response_data=response_data,
478            response_types_map=_response_types_map,
479        )

Get uploaded files from a file upload connector

Parameters
  • organization: (required)
  • connector_id: (required)
  • _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
  • _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
  • _content_type: force content-type for the request.
  • _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
  • _host_index: set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
Returns

Returns the result object.

@validate_call
def get_upload_files_from_connector_without_preload_content( self, organization: typing.Annotated[str, Strict(strict=True)], connector_id: typing.Annotated[str, Strict(strict=True)], _request_timeout: Union[NoneType, Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])], Tuple[Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])], Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])]]] = None, _request_auth: Optional[Dict[Annotated[str, Strict(strict=True)], Any]] = None, _content_type: Optional[Annotated[str, Strict(strict=True)]] = None, _headers: Optional[Dict[Annotated[str, Strict(strict=True)], Any]] = None, _host_index: typing.Annotated[int, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=0), Le(le=0)])] = 0) -> urllib3.response.HTTPResponse:
482    @validate_call
483    def get_upload_files_from_connector_without_preload_content(
484        self,
485        organization: StrictStr,
486        connector_id: StrictStr,
487        _request_timeout: Union[
488            None,
489            Annotated[StrictFloat, Field(gt=0)],
490            Tuple[
491                Annotated[StrictFloat, Field(gt=0)],
492                Annotated[StrictFloat, Field(gt=0)]
493            ]
494        ] = None,
495        _request_auth: Optional[Dict[StrictStr, Any]] = None,
496        _content_type: Optional[StrictStr] = None,
497        _headers: Optional[Dict[StrictStr, Any]] = None,
498        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
499    ) -> RESTResponseType:
500        """Get uploaded files from a file upload connector
501
502
503        :param organization: (required)
504        :type organization: str
505        :param connector_id: (required)
506        :type connector_id: str
507        :param _request_timeout: timeout setting for this request. If one
508                                 number provided, it will be total request
509                                 timeout. It can also be a pair (tuple) of
510                                 (connection, read) timeouts.
511        :type _request_timeout: int, tuple(int, int), optional
512        :param _request_auth: set to override the auth_settings for an a single
513                              request; this effectively ignores the
514                              authentication in the spec for a single request.
515        :type _request_auth: dict, optional
516        :param _content_type: force content-type for the request.
517        :type _content_type: str, Optional
518        :param _headers: set to override the headers for a single
519                         request; this effectively ignores the headers
520                         in the spec for a single request.
521        :type _headers: dict, optional
522        :param _host_index: set to override the host_index for a single
523                            request; this effectively ignores the host_index
524                            in the spec for a single request.
525        :type _host_index: int, optional
526        :return: Returns the result object.
527        """ # noqa: E501
528
529        _param = self._get_upload_files_from_connector_serialize(
530            organization=organization,
531            connector_id=connector_id,
532            _request_auth=_request_auth,
533            _content_type=_content_type,
534            _headers=_headers,
535            _host_index=_host_index
536        )
537
538        _response_types_map: Dict[str, Optional[str]] = {
539            '200': "GetUploadFilesResponse",
540            '400': "GetPipelines400Response",
541            '401': "GetPipelines400Response",
542            '403': "GetPipelines400Response",
543            '404': "GetPipelines400Response",
544            '500': "GetPipelines400Response",
545        }
546        response_data = self.api_client.call_api(
547            *_param,
548            _request_timeout=_request_timeout
549        )
550        return response_data.response

Get uploaded files from a file upload connector

Parameters
  • organization: (required)
  • connector_id: (required)
  • _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
  • _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
  • _content_type: force content-type for the request.
  • _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
  • _host_index: set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
Returns

Returns the result object.

@validate_call
def start_file_upload_to_connector( self, organization: typing.Annotated[str, Strict(strict=True)], connector_id: typing.Annotated[str, Strict(strict=True)], start_file_upload_to_connector_request: vectorize_client.models.start_file_upload_to_connector_request.StartFileUploadToConnectorRequest, _request_timeout: Union[NoneType, Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])], Tuple[Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])], Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])]]] = None, _request_auth: Optional[Dict[Annotated[str, Strict(strict=True)], Any]] = None, _content_type: Optional[Annotated[str, Strict(strict=True)]] = None, _headers: Optional[Dict[Annotated[str, Strict(strict=True)], Any]] = None, _host_index: typing.Annotated[int, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=0), Le(le=0)])] = 0) -> vectorize_client.models.start_file_upload_to_connector_response.StartFileUploadToConnectorResponse:
620    @validate_call
621    def start_file_upload_to_connector(
622        self,
623        organization: StrictStr,
624        connector_id: StrictStr,
625        start_file_upload_to_connector_request: StartFileUploadToConnectorRequest,
626        _request_timeout: Union[
627            None,
628            Annotated[StrictFloat, Field(gt=0)],
629            Tuple[
630                Annotated[StrictFloat, Field(gt=0)],
631                Annotated[StrictFloat, Field(gt=0)]
632            ]
633        ] = None,
634        _request_auth: Optional[Dict[StrictStr, Any]] = None,
635        _content_type: Optional[StrictStr] = None,
636        _headers: Optional[Dict[StrictStr, Any]] = None,
637        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
638    ) -> StartFileUploadToConnectorResponse:
639        """Upload a file to a file upload connector
640
641
642        :param organization: (required)
643        :type organization: str
644        :param connector_id: (required)
645        :type connector_id: str
646        :param start_file_upload_to_connector_request: (required)
647        :type start_file_upload_to_connector_request: StartFileUploadToConnectorRequest
648        :param _request_timeout: timeout setting for this request. If one
649                                 number provided, it will be total request
650                                 timeout. It can also be a pair (tuple) of
651                                 (connection, read) timeouts.
652        :type _request_timeout: int, tuple(int, int), optional
653        :param _request_auth: set to override the auth_settings for an a single
654                              request; this effectively ignores the
655                              authentication in the spec for a single request.
656        :type _request_auth: dict, optional
657        :param _content_type: force content-type for the request.
658        :type _content_type: str, Optional
659        :param _headers: set to override the headers for a single
660                         request; this effectively ignores the headers
661                         in the spec for a single request.
662        :type _headers: dict, optional
663        :param _host_index: set to override the host_index for a single
664                            request; this effectively ignores the host_index
665                            in the spec for a single request.
666        :type _host_index: int, optional
667        :return: Returns the result object.
668        """ # noqa: E501
669
670        _param = self._start_file_upload_to_connector_serialize(
671            organization=organization,
672            connector_id=connector_id,
673            start_file_upload_to_connector_request=start_file_upload_to_connector_request,
674            _request_auth=_request_auth,
675            _content_type=_content_type,
676            _headers=_headers,
677            _host_index=_host_index
678        )
679
680        _response_types_map: Dict[str, Optional[str]] = {
681            '200': "StartFileUploadToConnectorResponse",
682            '400': "GetPipelines400Response",
683            '401': "GetPipelines400Response",
684            '403': "GetPipelines400Response",
685            '404': "GetPipelines400Response",
686            '500': "GetPipelines400Response",
687        }
688        response_data = self.api_client.call_api(
689            *_param,
690            _request_timeout=_request_timeout
691        )
692        response_data.read()
693        return self.api_client.response_deserialize(
694            response_data=response_data,
695            response_types_map=_response_types_map,
696        ).data

Upload a file to a file upload connector

Parameters
  • organization: (required)
  • connector_id: (required)
  • start_file_upload_to_connector_request: (required)
  • _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
  • _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
  • _content_type: force content-type for the request.
  • _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
  • _host_index: set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
Returns

Returns the result object.

@validate_call
def start_file_upload_to_connector_with_http_info( self, organization: typing.Annotated[str, Strict(strict=True)], connector_id: typing.Annotated[str, Strict(strict=True)], start_file_upload_to_connector_request: vectorize_client.models.start_file_upload_to_connector_request.StartFileUploadToConnectorRequest, _request_timeout: Union[NoneType, Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])], Tuple[Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])], Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])]]] = None, _request_auth: Optional[Dict[Annotated[str, Strict(strict=True)], Any]] = None, _content_type: Optional[Annotated[str, Strict(strict=True)]] = None, _headers: Optional[Dict[Annotated[str, Strict(strict=True)], Any]] = None, _host_index: typing.Annotated[int, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=0), Le(le=0)])] = 0) -> vectorize_client.api_response.ApiResponse[StartFileUploadToConnectorResponse]:
699    @validate_call
700    def start_file_upload_to_connector_with_http_info(
701        self,
702        organization: StrictStr,
703        connector_id: StrictStr,
704        start_file_upload_to_connector_request: StartFileUploadToConnectorRequest,
705        _request_timeout: Union[
706            None,
707            Annotated[StrictFloat, Field(gt=0)],
708            Tuple[
709                Annotated[StrictFloat, Field(gt=0)],
710                Annotated[StrictFloat, Field(gt=0)]
711            ]
712        ] = None,
713        _request_auth: Optional[Dict[StrictStr, Any]] = None,
714        _content_type: Optional[StrictStr] = None,
715        _headers: Optional[Dict[StrictStr, Any]] = None,
716        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
717    ) -> ApiResponse[StartFileUploadToConnectorResponse]:
718        """Upload a file to a file upload connector
719
720
721        :param organization: (required)
722        :type organization: str
723        :param connector_id: (required)
724        :type connector_id: str
725        :param start_file_upload_to_connector_request: (required)
726        :type start_file_upload_to_connector_request: StartFileUploadToConnectorRequest
727        :param _request_timeout: timeout setting for this request. If one
728                                 number provided, it will be total request
729                                 timeout. It can also be a pair (tuple) of
730                                 (connection, read) timeouts.
731        :type _request_timeout: int, tuple(int, int), optional
732        :param _request_auth: set to override the auth_settings for an a single
733                              request; this effectively ignores the
734                              authentication in the spec for a single request.
735        :type _request_auth: dict, optional
736        :param _content_type: force content-type for the request.
737        :type _content_type: str, Optional
738        :param _headers: set to override the headers for a single
739                         request; this effectively ignores the headers
740                         in the spec for a single request.
741        :type _headers: dict, optional
742        :param _host_index: set to override the host_index for a single
743                            request; this effectively ignores the host_index
744                            in the spec for a single request.
745        :type _host_index: int, optional
746        :return: Returns the result object.
747        """ # noqa: E501
748
749        _param = self._start_file_upload_to_connector_serialize(
750            organization=organization,
751            connector_id=connector_id,
752            start_file_upload_to_connector_request=start_file_upload_to_connector_request,
753            _request_auth=_request_auth,
754            _content_type=_content_type,
755            _headers=_headers,
756            _host_index=_host_index
757        )
758
759        _response_types_map: Dict[str, Optional[str]] = {
760            '200': "StartFileUploadToConnectorResponse",
761            '400': "GetPipelines400Response",
762            '401': "GetPipelines400Response",
763            '403': "GetPipelines400Response",
764            '404': "GetPipelines400Response",
765            '500': "GetPipelines400Response",
766        }
767        response_data = self.api_client.call_api(
768            *_param,
769            _request_timeout=_request_timeout
770        )
771        response_data.read()
772        return self.api_client.response_deserialize(
773            response_data=response_data,
774            response_types_map=_response_types_map,
775        )

Upload a file to a file upload connector

Parameters
  • organization: (required)
  • connector_id: (required)
  • start_file_upload_to_connector_request: (required)
  • _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
  • _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
  • _content_type: force content-type for the request.
  • _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
  • _host_index: set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
Returns

Returns the result object.

@validate_call
def start_file_upload_to_connector_without_preload_content( self, organization: typing.Annotated[str, Strict(strict=True)], connector_id: typing.Annotated[str, Strict(strict=True)], start_file_upload_to_connector_request: vectorize_client.models.start_file_upload_to_connector_request.StartFileUploadToConnectorRequest, _request_timeout: Union[NoneType, Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])], Tuple[Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])], Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])]]] = None, _request_auth: Optional[Dict[Annotated[str, Strict(strict=True)], Any]] = None, _content_type: Optional[Annotated[str, Strict(strict=True)]] = None, _headers: Optional[Dict[Annotated[str, Strict(strict=True)], Any]] = None, _host_index: typing.Annotated[int, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=0), Le(le=0)])] = 0) -> urllib3.response.HTTPResponse:
778    @validate_call
779    def start_file_upload_to_connector_without_preload_content(
780        self,
781        organization: StrictStr,
782        connector_id: StrictStr,
783        start_file_upload_to_connector_request: StartFileUploadToConnectorRequest,
784        _request_timeout: Union[
785            None,
786            Annotated[StrictFloat, Field(gt=0)],
787            Tuple[
788                Annotated[StrictFloat, Field(gt=0)],
789                Annotated[StrictFloat, Field(gt=0)]
790            ]
791        ] = None,
792        _request_auth: Optional[Dict[StrictStr, Any]] = None,
793        _content_type: Optional[StrictStr] = None,
794        _headers: Optional[Dict[StrictStr, Any]] = None,
795        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
796    ) -> RESTResponseType:
797        """Upload a file to a file upload connector
798
799
800        :param organization: (required)
801        :type organization: str
802        :param connector_id: (required)
803        :type connector_id: str
804        :param start_file_upload_to_connector_request: (required)
805        :type start_file_upload_to_connector_request: StartFileUploadToConnectorRequest
806        :param _request_timeout: timeout setting for this request. If one
807                                 number provided, it will be total request
808                                 timeout. It can also be a pair (tuple) of
809                                 (connection, read) timeouts.
810        :type _request_timeout: int, tuple(int, int), optional
811        :param _request_auth: set to override the auth_settings for an a single
812                              request; this effectively ignores the
813                              authentication in the spec for a single request.
814        :type _request_auth: dict, optional
815        :param _content_type: force content-type for the request.
816        :type _content_type: str, Optional
817        :param _headers: set to override the headers for a single
818                         request; this effectively ignores the headers
819                         in the spec for a single request.
820        :type _headers: dict, optional
821        :param _host_index: set to override the host_index for a single
822                            request; this effectively ignores the host_index
823                            in the spec for a single request.
824        :type _host_index: int, optional
825        :return: Returns the result object.
826        """ # noqa: E501
827
828        _param = self._start_file_upload_to_connector_serialize(
829            organization=organization,
830            connector_id=connector_id,
831            start_file_upload_to_connector_request=start_file_upload_to_connector_request,
832            _request_auth=_request_auth,
833            _content_type=_content_type,
834            _headers=_headers,
835            _host_index=_host_index
836        )
837
838        _response_types_map: Dict[str, Optional[str]] = {
839            '200': "StartFileUploadToConnectorResponse",
840            '400': "GetPipelines400Response",
841            '401': "GetPipelines400Response",
842            '403': "GetPipelines400Response",
843            '404': "GetPipelines400Response",
844            '500': "GetPipelines400Response",
845        }
846        response_data = self.api_client.call_api(
847            *_param,
848            _request_timeout=_request_timeout
849        )
850        return response_data.response

Upload a file to a file upload connector

Parameters
  • organization: (required)
  • connector_id: (required)
  • start_file_upload_to_connector_request: (required)
  • _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
  • _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
  • _content_type: force content-type for the request.
  • _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
  • _host_index: set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
Returns

Returns the result object.