docusign_esign.apis.cloud_storage_api

DocuSign REST API

The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. # noqa: E501

OpenAPI spec version: v2.1 Contact: devcenter@docusign.com Generated by: https://github.com/swagger-api/swagger-codegen.git

  1# coding: utf-8
  2
  3"""
  4    DocuSign REST API
  5
  6    The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign.  # noqa: E501
  7
  8    OpenAPI spec version: v2.1
  9    Contact: devcenter@docusign.com
 10    Generated by: https://github.com/swagger-api/swagger-codegen.git
 11"""
 12
 13
 14from __future__ import absolute_import
 15
 16import sys
 17import os
 18import re
 19
 20# python 2 and python 3 compatibility library
 21from six import iteritems
 22
 23from ..client.configuration import Configuration
 24from ..client.api_client import ApiClient
 25
 26
 27class CloudStorageApi(object):
 28    """
 29    NOTE: This class is auto generated by the swagger code generator program.
 30    Do not edit the class manually.
 31    Ref: https://github.com/swagger-api/swagger-codegen
 32    """
 33
 34    def __init__(self, api_client=None):
 35        config = Configuration()
 36        if api_client:
 37            self.api_client = api_client
 38        else:
 39            if not config.api_client:
 40                config.api_client = ApiClient()
 41            self.api_client = config.api_client
 42
 43    def create_provider(self, account_id, user_id, **kwargs):
 44        """
 45        Configures the redirect URL information  for one or more cloud storage providers for the specified user.
 46        Configures the redirect URL information  for one or more cloud storage providers for the specified user. The redirect URL is added to the authentication URL to complete the return route.
 47        This method makes a synchronous HTTP request by default. To make an
 48        asynchronous HTTP request, please define a `callback` function
 49        to be invoked when receiving the response.
 50        >>> def callback_function(response):
 51        >>>     pprint(response)
 52        >>>
 53        >>> thread = api.create_provider(account_id, user_id, callback=callback_function)
 54
 55        :param callback function: The callback function
 56            for asynchronous request. (optional)
 57        :param str account_id: The external account number (int) or account ID Guid. (required)
 58        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
 59        :param CloudStorageProviders cloud_storage_providers:
 60        :return: CloudStorageProviders
 61                 If the method is called asynchronously,
 62                 returns the request thread.
 63        """
 64        kwargs['_return_http_data_only'] = True
 65        if kwargs.get('callback'):
 66            return self.create_provider_with_http_info(account_id, user_id, **kwargs)
 67        else:
 68            (data) = self.create_provider_with_http_info(account_id, user_id, **kwargs)
 69            return data
 70
 71    def create_provider_with_http_info(self, account_id, user_id, **kwargs):
 72        """
 73        Configures the redirect URL information  for one or more cloud storage providers for the specified user.
 74        Configures the redirect URL information  for one or more cloud storage providers for the specified user. The redirect URL is added to the authentication URL to complete the return route.
 75        This method makes a synchronous HTTP request by default. To make an
 76        asynchronous HTTP request, please define a `callback` function
 77        to be invoked when receiving the response.
 78        >>> def callback_function(response):
 79        >>>     pprint(response)
 80        >>>
 81        >>> thread = api.create_provider_with_http_info(account_id, user_id, callback=callback_function)
 82
 83        :param callback function: The callback function
 84            for asynchronous request. (optional)
 85        :param str account_id: The external account number (int) or account ID Guid. (required)
 86        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
 87        :param CloudStorageProviders cloud_storage_providers:
 88        :return: CloudStorageProviders
 89                 If the method is called asynchronously,
 90                 returns the request thread.
 91        """
 92
 93        all_params = ['account_id', 'user_id', 'cloud_storage_providers']
 94        all_params.append('callback')
 95        all_params.append('_return_http_data_only')
 96        all_params.append('_preload_content')
 97        all_params.append('_request_timeout')
 98
 99        params = locals()
100        for key, val in iteritems(params['kwargs']):
101            if key not in all_params:
102                raise TypeError(
103                    "Got an unexpected keyword argument '%s'"
104                    " to method create_provider" % key
105                )
106            params[key] = val
107        del params['kwargs']
108        # verify the required parameter 'account_id' is set
109        if ('account_id' not in params) or (params['account_id'] is None):
110            raise ValueError("Missing the required parameter `account_id` when calling `create_provider`")
111        # verify the required parameter 'user_id' is set
112        if ('user_id' not in params) or (params['user_id'] is None):
113            raise ValueError("Missing the required parameter `user_id` when calling `create_provider`")
114
115
116        collection_formats = {}
117
118        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/cloud_storage'.replace('{format}', 'json')
119        path_params = {}
120        if 'account_id' in params:
121            path_params['accountId'] = params['account_id']
122        if 'user_id' in params:
123            path_params['userId'] = params['user_id']
124
125        query_params = {}
126
127        header_params = {}
128
129        form_params = []
130        local_var_files = {}
131
132        body_params = None
133        if 'cloud_storage_providers' in params:
134            body_params = params['cloud_storage_providers']
135        # HTTP header `Accept`
136        header_params['Accept'] = self.api_client.\
137            select_header_accept(['application/json'])
138
139        # Authentication setting
140        auth_settings = []
141
142        return self.api_client.call_api(resource_path, 'POST',
143                                        path_params,
144                                        query_params,
145                                        header_params,
146                                        body=body_params,
147                                        post_params=form_params,
148                                        files=local_var_files,
149                                        response_type='CloudStorageProviders',
150                                        auth_settings=auth_settings,
151                                        callback=params.get('callback'),
152                                        _return_http_data_only=params.get('_return_http_data_only'),
153                                        _preload_content=params.get('_preload_content', True),
154                                        _request_timeout=params.get('_request_timeout'),
155                                        collection_formats=collection_formats)
156
157    def delete_provider(self, account_id, service_id, user_id, **kwargs):
158        """
159        Deletes the user authentication information for the specified cloud storage provider.
160        Deletes the user authentication information for the specified cloud storage provider. The next time the user tries to access the cloud storage provider, they must pass normal authentication for this cloud storage provider.
161        This method makes a synchronous HTTP request by default. To make an
162        asynchronous HTTP request, please define a `callback` function
163        to be invoked when receiving the response.
164        >>> def callback_function(response):
165        >>>     pprint(response)
166        >>>
167        >>> thread = api.delete_provider(account_id, service_id, user_id, callback=callback_function)
168
169        :param callback function: The callback function
170            for asynchronous request. (optional)
171        :param str account_id: The external account number (int) or account ID Guid. (required)
172        :param str service_id: The ID of the service to access.   Valid values are the service name (\"Box\") or the numerical serviceId (\"4136\"). (required)
173        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
174        :return: CloudStorageProviders
175                 If the method is called asynchronously,
176                 returns the request thread.
177        """
178        kwargs['_return_http_data_only'] = True
179        if kwargs.get('callback'):
180            return self.delete_provider_with_http_info(account_id, service_id, user_id, **kwargs)
181        else:
182            (data) = self.delete_provider_with_http_info(account_id, service_id, user_id, **kwargs)
183            return data
184
185    def delete_provider_with_http_info(self, account_id, service_id, user_id, **kwargs):
186        """
187        Deletes the user authentication information for the specified cloud storage provider.
188        Deletes the user authentication information for the specified cloud storage provider. The next time the user tries to access the cloud storage provider, they must pass normal authentication for this cloud storage provider.
189        This method makes a synchronous HTTP request by default. To make an
190        asynchronous HTTP request, please define a `callback` function
191        to be invoked when receiving the response.
192        >>> def callback_function(response):
193        >>>     pprint(response)
194        >>>
195        >>> thread = api.delete_provider_with_http_info(account_id, service_id, user_id, callback=callback_function)
196
197        :param callback function: The callback function
198            for asynchronous request. (optional)
199        :param str account_id: The external account number (int) or account ID Guid. (required)
200        :param str service_id: The ID of the service to access.   Valid values are the service name (\"Box\") or the numerical serviceId (\"4136\"). (required)
201        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
202        :return: CloudStorageProviders
203                 If the method is called asynchronously,
204                 returns the request thread.
205        """
206
207        all_params = ['account_id', 'service_id', 'user_id']
208        all_params.append('callback')
209        all_params.append('_return_http_data_only')
210        all_params.append('_preload_content')
211        all_params.append('_request_timeout')
212
213        params = locals()
214        for key, val in iteritems(params['kwargs']):
215            if key not in all_params:
216                raise TypeError(
217                    "Got an unexpected keyword argument '%s'"
218                    " to method delete_provider" % key
219                )
220            params[key] = val
221        del params['kwargs']
222        # verify the required parameter 'account_id' is set
223        if ('account_id' not in params) or (params['account_id'] is None):
224            raise ValueError("Missing the required parameter `account_id` when calling `delete_provider`")
225        # verify the required parameter 'service_id' is set
226        if ('service_id' not in params) or (params['service_id'] is None):
227            raise ValueError("Missing the required parameter `service_id` when calling `delete_provider`")
228        # verify the required parameter 'user_id' is set
229        if ('user_id' not in params) or (params['user_id'] is None):
230            raise ValueError("Missing the required parameter `user_id` when calling `delete_provider`")
231
232
233        collection_formats = {}
234
235        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/cloud_storage/{serviceId}'.replace('{format}', 'json')
236        path_params = {}
237        if 'account_id' in params:
238            path_params['accountId'] = params['account_id']
239        if 'service_id' in params:
240            path_params['serviceId'] = params['service_id']
241        if 'user_id' in params:
242            path_params['userId'] = params['user_id']
243
244        query_params = {}
245
246        header_params = {}
247
248        form_params = []
249        local_var_files = {}
250
251        body_params = None
252        # HTTP header `Accept`
253        header_params['Accept'] = self.api_client.\
254            select_header_accept(['application/json'])
255
256        # Authentication setting
257        auth_settings = []
258
259        return self.api_client.call_api(resource_path, 'DELETE',
260                                        path_params,
261                                        query_params,
262                                        header_params,
263                                        body=body_params,
264                                        post_params=form_params,
265                                        files=local_var_files,
266                                        response_type='CloudStorageProviders',
267                                        auth_settings=auth_settings,
268                                        callback=params.get('callback'),
269                                        _return_http_data_only=params.get('_return_http_data_only'),
270                                        _preload_content=params.get('_preload_content', True),
271                                        _request_timeout=params.get('_request_timeout'),
272                                        collection_formats=collection_formats)
273
274    def delete_providers(self, account_id, user_id, **kwargs):
275        """
276        Deletes the user authentication information for one or more cloud storage providers.
277        Deletes the user authentication information for one or more cloud storage providers. The next time the user tries to access the cloud storage provider, they must pass normal authentication.
278        This method makes a synchronous HTTP request by default. To make an
279        asynchronous HTTP request, please define a `callback` function
280        to be invoked when receiving the response.
281        >>> def callback_function(response):
282        >>>     pprint(response)
283        >>>
284        >>> thread = api.delete_providers(account_id, user_id, callback=callback_function)
285
286        :param callback function: The callback function
287            for asynchronous request. (optional)
288        :param str account_id: The external account number (int) or account ID Guid. (required)
289        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
290        :param CloudStorageProviders cloud_storage_providers:
291        :return: CloudStorageProviders
292                 If the method is called asynchronously,
293                 returns the request thread.
294        """
295        kwargs['_return_http_data_only'] = True
296        if kwargs.get('callback'):
297            return self.delete_providers_with_http_info(account_id, user_id, **kwargs)
298        else:
299            (data) = self.delete_providers_with_http_info(account_id, user_id, **kwargs)
300            return data
301
302    def delete_providers_with_http_info(self, account_id, user_id, **kwargs):
303        """
304        Deletes the user authentication information for one or more cloud storage providers.
305        Deletes the user authentication information for one or more cloud storage providers. The next time the user tries to access the cloud storage provider, they must pass normal authentication.
306        This method makes a synchronous HTTP request by default. To make an
307        asynchronous HTTP request, please define a `callback` function
308        to be invoked when receiving the response.
309        >>> def callback_function(response):
310        >>>     pprint(response)
311        >>>
312        >>> thread = api.delete_providers_with_http_info(account_id, user_id, callback=callback_function)
313
314        :param callback function: The callback function
315            for asynchronous request. (optional)
316        :param str account_id: The external account number (int) or account ID Guid. (required)
317        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
318        :param CloudStorageProviders cloud_storage_providers:
319        :return: CloudStorageProviders
320                 If the method is called asynchronously,
321                 returns the request thread.
322        """
323
324        all_params = ['account_id', 'user_id', 'cloud_storage_providers']
325        all_params.append('callback')
326        all_params.append('_return_http_data_only')
327        all_params.append('_preload_content')
328        all_params.append('_request_timeout')
329
330        params = locals()
331        for key, val in iteritems(params['kwargs']):
332            if key not in all_params:
333                raise TypeError(
334                    "Got an unexpected keyword argument '%s'"
335                    " to method delete_providers" % key
336                )
337            params[key] = val
338        del params['kwargs']
339        # verify the required parameter 'account_id' is set
340        if ('account_id' not in params) or (params['account_id'] is None):
341            raise ValueError("Missing the required parameter `account_id` when calling `delete_providers`")
342        # verify the required parameter 'user_id' is set
343        if ('user_id' not in params) or (params['user_id'] is None):
344            raise ValueError("Missing the required parameter `user_id` when calling `delete_providers`")
345
346
347        collection_formats = {}
348
349        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/cloud_storage'.replace('{format}', 'json')
350        path_params = {}
351        if 'account_id' in params:
352            path_params['accountId'] = params['account_id']
353        if 'user_id' in params:
354            path_params['userId'] = params['user_id']
355
356        query_params = {}
357
358        header_params = {}
359
360        form_params = []
361        local_var_files = {}
362
363        body_params = None
364        if 'cloud_storage_providers' in params:
365            body_params = params['cloud_storage_providers']
366        # HTTP header `Accept`
367        header_params['Accept'] = self.api_client.\
368            select_header_accept(['application/json'])
369
370        # Authentication setting
371        auth_settings = []
372
373        return self.api_client.call_api(resource_path, 'DELETE',
374                                        path_params,
375                                        query_params,
376                                        header_params,
377                                        body=body_params,
378                                        post_params=form_params,
379                                        files=local_var_files,
380                                        response_type='CloudStorageProviders',
381                                        auth_settings=auth_settings,
382                                        callback=params.get('callback'),
383                                        _return_http_data_only=params.get('_return_http_data_only'),
384                                        _preload_content=params.get('_preload_content', True),
385                                        _request_timeout=params.get('_request_timeout'),
386                                        collection_formats=collection_formats)
387
388    def get_provider(self, account_id, service_id, user_id, **kwargs):
389        """
390        Gets the specified Cloud Storage Provider configuration for the User.
391        Retrieves the list of cloud storage providers enabled for the account and the configuration information for the user.
392        This method makes a synchronous HTTP request by default. To make an
393        asynchronous HTTP request, please define a `callback` function
394        to be invoked when receiving the response.
395        >>> def callback_function(response):
396        >>>     pprint(response)
397        >>>
398        >>> thread = api.get_provider(account_id, service_id, user_id, callback=callback_function)
399
400        :param callback function: The callback function
401            for asynchronous request. (optional)
402        :param str account_id: The external account number (int) or account ID Guid. (required)
403        :param str service_id: The ID of the service to access.   Valid values are the service name (\"Box\") or the numerical serviceId (\"4136\"). (required)
404        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
405        :param str redirect_url:  The URL the user is redirected to after the cloud storage provider authenticates the user. Using this will append the redirectUrl to the authenticationUrl.  The redirectUrl is restricted to URLs in the docusign.com or docusign.net domains.  
406        :return: CloudStorageProviders
407                 If the method is called asynchronously,
408                 returns the request thread.
409        """
410        kwargs['_return_http_data_only'] = True
411        if kwargs.get('callback'):
412            return self.get_provider_with_http_info(account_id, service_id, user_id, **kwargs)
413        else:
414            (data) = self.get_provider_with_http_info(account_id, service_id, user_id, **kwargs)
415            return data
416
417    def get_provider_with_http_info(self, account_id, service_id, user_id, **kwargs):
418        """
419        Gets the specified Cloud Storage Provider configuration for the User.
420        Retrieves the list of cloud storage providers enabled for the account and the configuration information for the user.
421        This method makes a synchronous HTTP request by default. To make an
422        asynchronous HTTP request, please define a `callback` function
423        to be invoked when receiving the response.
424        >>> def callback_function(response):
425        >>>     pprint(response)
426        >>>
427        >>> thread = api.get_provider_with_http_info(account_id, service_id, user_id, callback=callback_function)
428
429        :param callback function: The callback function
430            for asynchronous request. (optional)
431        :param str account_id: The external account number (int) or account ID Guid. (required)
432        :param str service_id: The ID of the service to access.   Valid values are the service name (\"Box\") or the numerical serviceId (\"4136\"). (required)
433        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
434        :param str redirect_url:  The URL the user is redirected to after the cloud storage provider authenticates the user. Using this will append the redirectUrl to the authenticationUrl.  The redirectUrl is restricted to URLs in the docusign.com or docusign.net domains.  
435        :return: CloudStorageProviders
436                 If the method is called asynchronously,
437                 returns the request thread.
438        """
439
440        all_params = ['account_id', 'service_id', 'user_id', 'redirect_url']
441        all_params.append('callback')
442        all_params.append('_return_http_data_only')
443        all_params.append('_preload_content')
444        all_params.append('_request_timeout')
445
446        params = locals()
447        for key, val in iteritems(params['kwargs']):
448            if key not in all_params:
449                raise TypeError(
450                    "Got an unexpected keyword argument '%s'"
451                    " to method get_provider" % key
452                )
453            params[key] = val
454        del params['kwargs']
455        # verify the required parameter 'account_id' is set
456        if ('account_id' not in params) or (params['account_id'] is None):
457            raise ValueError("Missing the required parameter `account_id` when calling `get_provider`")
458        # verify the required parameter 'service_id' is set
459        if ('service_id' not in params) or (params['service_id'] is None):
460            raise ValueError("Missing the required parameter `service_id` when calling `get_provider`")
461        # verify the required parameter 'user_id' is set
462        if ('user_id' not in params) or (params['user_id'] is None):
463            raise ValueError("Missing the required parameter `user_id` when calling `get_provider`")
464
465
466        collection_formats = {}
467
468        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/cloud_storage/{serviceId}'.replace('{format}', 'json')
469        path_params = {}
470        if 'account_id' in params:
471            path_params['accountId'] = params['account_id']
472        if 'service_id' in params:
473            path_params['serviceId'] = params['service_id']
474        if 'user_id' in params:
475            path_params['userId'] = params['user_id']
476
477        query_params = {}
478        if 'redirect_url' in params:
479            query_params['redirectUrl'] = params['redirect_url']
480
481        header_params = {}
482
483        form_params = []
484        local_var_files = {}
485
486        body_params = None
487        # HTTP header `Accept`
488        header_params['Accept'] = self.api_client.\
489            select_header_accept(['application/json'])
490
491        # Authentication setting
492        auth_settings = []
493
494        return self.api_client.call_api(resource_path, 'GET',
495                                        path_params,
496                                        query_params,
497                                        header_params,
498                                        body=body_params,
499                                        post_params=form_params,
500                                        files=local_var_files,
501                                        response_type='CloudStorageProviders',
502                                        auth_settings=auth_settings,
503                                        callback=params.get('callback'),
504                                        _return_http_data_only=params.get('_return_http_data_only'),
505                                        _preload_content=params.get('_preload_content', True),
506                                        _request_timeout=params.get('_request_timeout'),
507                                        collection_formats=collection_formats)
508
509    def list(self, account_id, folder_id, service_id, user_id, **kwargs):
510        """
511        Gets a list of all the items from the specified cloud storage provider.
512        Retrieves a list of all the items in all  the folders associated with the user from the specified cloud storage provider. You can limit the scope of the returned items by providing a comma separated list of folder IDs in the request.
513        This method makes a synchronous HTTP request by default. To make an
514        asynchronous HTTP request, please define a `callback` function
515        to be invoked when receiving the response.
516        >>> def callback_function(response):
517        >>>     pprint(response)
518        >>>
519        >>> thread = api.list(account_id, folder_id, service_id, user_id, callback=callback_function)
520
521        :param callback function: The callback function
522            for asynchronous request. (optional)
523        :param str account_id: The external account number (int) or account ID Guid. (required)
524        :param str folder_id: The ID of the folder being accessed. (required)
525        :param str service_id: The ID of the service to access.   Valid values are the service name (\"Box\") or the numerical serviceId (\"4136\"). (required)
526        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
527        :param str cloud_storage_folder_path:
528        :param str cloud_storage_folderid_plain:
529        :param str count: An optional value that sets how many items are included in the response.   The default setting for this is 25. 
530        :param str order: An optional value that sets the direction order used to sort the item list.   Valid values are:   * asc = ascending sort order * desc = descending sort order 
531        :param str order_by: An optional value that sets the file attribute used to sort the item list.   Valid values are:   * modified * name  
532        :param str search_text:
533        :param str start_position: Indicates the starting point of the first item included in the response set. It uses a 0-based index. The default setting for this is 0.  
534        :return: ExternalFolder
535                 If the method is called asynchronously,
536                 returns the request thread.
537        """
538        kwargs['_return_http_data_only'] = True
539        if kwargs.get('callback'):
540            return self.list_with_http_info(account_id, folder_id, service_id, user_id, **kwargs)
541        else:
542            (data) = self.list_with_http_info(account_id, folder_id, service_id, user_id, **kwargs)
543            return data
544
545    def list_with_http_info(self, account_id, folder_id, service_id, user_id, **kwargs):
546        """
547        Gets a list of all the items from the specified cloud storage provider.
548        Retrieves a list of all the items in all  the folders associated with the user from the specified cloud storage provider. You can limit the scope of the returned items by providing a comma separated list of folder IDs in the request.
549        This method makes a synchronous HTTP request by default. To make an
550        asynchronous HTTP request, please define a `callback` function
551        to be invoked when receiving the response.
552        >>> def callback_function(response):
553        >>>     pprint(response)
554        >>>
555        >>> thread = api.list_with_http_info(account_id, folder_id, service_id, user_id, callback=callback_function)
556
557        :param callback function: The callback function
558            for asynchronous request. (optional)
559        :param str account_id: The external account number (int) or account ID Guid. (required)
560        :param str folder_id: The ID of the folder being accessed. (required)
561        :param str service_id: The ID of the service to access.   Valid values are the service name (\"Box\") or the numerical serviceId (\"4136\"). (required)
562        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
563        :param str cloud_storage_folder_path:
564        :param str cloud_storage_folderid_plain:
565        :param str count: An optional value that sets how many items are included in the response.   The default setting for this is 25. 
566        :param str order: An optional value that sets the direction order used to sort the item list.   Valid values are:   * asc = ascending sort order * desc = descending sort order 
567        :param str order_by: An optional value that sets the file attribute used to sort the item list.   Valid values are:   * modified * name  
568        :param str search_text:
569        :param str start_position: Indicates the starting point of the first item included in the response set. It uses a 0-based index. The default setting for this is 0.  
570        :return: ExternalFolder
571                 If the method is called asynchronously,
572                 returns the request thread.
573        """
574
575        all_params = ['account_id', 'folder_id', 'service_id', 'user_id', 'cloud_storage_folder_path', 'cloud_storage_folderid_plain', 'count', 'order', 'order_by', 'search_text', 'start_position']
576        all_params.append('callback')
577        all_params.append('_return_http_data_only')
578        all_params.append('_preload_content')
579        all_params.append('_request_timeout')
580
581        params = locals()
582        for key, val in iteritems(params['kwargs']):
583            if key not in all_params:
584                raise TypeError(
585                    "Got an unexpected keyword argument '%s'"
586                    " to method list" % key
587                )
588            params[key] = val
589        del params['kwargs']
590        # verify the required parameter 'account_id' is set
591        if ('account_id' not in params) or (params['account_id'] is None):
592            raise ValueError("Missing the required parameter `account_id` when calling `list`")
593        # verify the required parameter 'folder_id' is set
594        if ('folder_id' not in params) or (params['folder_id'] is None):
595            raise ValueError("Missing the required parameter `folder_id` when calling `list`")
596        # verify the required parameter 'service_id' is set
597        if ('service_id' not in params) or (params['service_id'] is None):
598            raise ValueError("Missing the required parameter `service_id` when calling `list`")
599        # verify the required parameter 'user_id' is set
600        if ('user_id' not in params) or (params['user_id'] is None):
601            raise ValueError("Missing the required parameter `user_id` when calling `list`")
602
603
604        collection_formats = {}
605
606        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/cloud_storage/{serviceId}/folders/{folderId}'.replace('{format}', 'json')
607        path_params = {}
608        if 'account_id' in params:
609            path_params['accountId'] = params['account_id']
610        if 'folder_id' in params:
611            path_params['folderId'] = params['folder_id']
612        if 'service_id' in params:
613            path_params['serviceId'] = params['service_id']
614        if 'user_id' in params:
615            path_params['userId'] = params['user_id']
616
617        query_params = {}
618        if 'cloud_storage_folder_path' in params:
619            query_params['cloud_storage_folder_path'] = params['cloud_storage_folder_path']
620        if 'cloud_storage_folderid_plain' in params:
621            query_params['cloud_storage_folderid_plain'] = params['cloud_storage_folderid_plain']
622        if 'count' in params:
623            query_params['count'] = params['count']
624        if 'order' in params:
625            query_params['order'] = params['order']
626        if 'order_by' in params:
627            query_params['order_by'] = params['order_by']
628        if 'search_text' in params:
629            query_params['search_text'] = params['search_text']
630        if 'start_position' in params:
631            query_params['start_position'] = params['start_position']
632
633        header_params = {}
634
635        form_params = []
636        local_var_files = {}
637
638        body_params = None
639        # HTTP header `Accept`
640        header_params['Accept'] = self.api_client.\
641            select_header_accept(['application/json'])
642
643        # Authentication setting
644        auth_settings = []
645
646        return self.api_client.call_api(resource_path, 'GET',
647                                        path_params,
648                                        query_params,
649                                        header_params,
650                                        body=body_params,
651                                        post_params=form_params,
652                                        files=local_var_files,
653                                        response_type='ExternalFolder',
654                                        auth_settings=auth_settings,
655                                        callback=params.get('callback'),
656                                        _return_http_data_only=params.get('_return_http_data_only'),
657                                        _preload_content=params.get('_preload_content', True),
658                                        _request_timeout=params.get('_request_timeout'),
659                                        collection_formats=collection_formats)
660
661    def list_folders(self, account_id, service_id, user_id, **kwargs):
662        """
663        Retrieves a list of all the items in a specified folder from the specified cloud storage provider.
664        Retrieves a list of all the items in a specified folder from the specified cloud storage provider. 
665        This method makes a synchronous HTTP request by default. To make an
666        asynchronous HTTP request, please define a `callback` function
667        to be invoked when receiving the response.
668        >>> def callback_function(response):
669        >>>     pprint(response)
670        >>>
671        >>> thread = api.list_folders(account_id, service_id, user_id, callback=callback_function)
672
673        :param callback function: The callback function
674            for asynchronous request. (optional)
675        :param str account_id: The external account number (int) or account ID Guid. (required)
676        :param str service_id: The ID of the service to access.   Valid values are the service name (\"Box\") or the numerical serviceId (\"4136\"). (required)
677        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
678        :param str cloud_storage_folder_path: A comma separated list of folder IDs included in the request. 
679        :param str count: An optional value that sets how many items are included in the response.   The default setting for this is 25. 
680        :param str order: An optional value that sets the direction order used to sort the item list.   Valid values are:   * asc = ascending sort order * desc = descending sort order 
681        :param str order_by: An optional value that sets the file attribute used to sort the item list.   Valid values are:   * modified * name  
682        :param str search_text:
683        :param str start_position: Indicates the starting point of the first item included in the response set. It uses a 0-based index. The default setting for this is 0.  
684        :return: ExternalFolder
685                 If the method is called asynchronously,
686                 returns the request thread.
687        """
688        kwargs['_return_http_data_only'] = True
689        if kwargs.get('callback'):
690            return self.list_folders_with_http_info(account_id, service_id, user_id, **kwargs)
691        else:
692            (data) = self.list_folders_with_http_info(account_id, service_id, user_id, **kwargs)
693            return data
694
695    def list_folders_with_http_info(self, account_id, service_id, user_id, **kwargs):
696        """
697        Retrieves a list of all the items in a specified folder from the specified cloud storage provider.
698        Retrieves a list of all the items in a specified folder from the specified cloud storage provider. 
699        This method makes a synchronous HTTP request by default. To make an
700        asynchronous HTTP request, please define a `callback` function
701        to be invoked when receiving the response.
702        >>> def callback_function(response):
703        >>>     pprint(response)
704        >>>
705        >>> thread = api.list_folders_with_http_info(account_id, service_id, user_id, callback=callback_function)
706
707        :param callback function: The callback function
708            for asynchronous request. (optional)
709        :param str account_id: The external account number (int) or account ID Guid. (required)
710        :param str service_id: The ID of the service to access.   Valid values are the service name (\"Box\") or the numerical serviceId (\"4136\"). (required)
711        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
712        :param str cloud_storage_folder_path: A comma separated list of folder IDs included in the request. 
713        :param str count: An optional value that sets how many items are included in the response.   The default setting for this is 25. 
714        :param str order: An optional value that sets the direction order used to sort the item list.   Valid values are:   * asc = ascending sort order * desc = descending sort order 
715        :param str order_by: An optional value that sets the file attribute used to sort the item list.   Valid values are:   * modified * name  
716        :param str search_text:
717        :param str start_position: Indicates the starting point of the first item included in the response set. It uses a 0-based index. The default setting for this is 0.  
718        :return: ExternalFolder
719                 If the method is called asynchronously,
720                 returns the request thread.
721        """
722
723        all_params = ['account_id', 'service_id', 'user_id', 'cloud_storage_folder_path', 'count', 'order', 'order_by', 'search_text', 'start_position']
724        all_params.append('callback')
725        all_params.append('_return_http_data_only')
726        all_params.append('_preload_content')
727        all_params.append('_request_timeout')
728
729        params = locals()
730        for key, val in iteritems(params['kwargs']):
731            if key not in all_params:
732                raise TypeError(
733                    "Got an unexpected keyword argument '%s'"
734                    " to method list_folders" % key
735                )
736            params[key] = val
737        del params['kwargs']
738        # verify the required parameter 'account_id' is set
739        if ('account_id' not in params) or (params['account_id'] is None):
740            raise ValueError("Missing the required parameter `account_id` when calling `list_folders`")
741        # verify the required parameter 'service_id' is set
742        if ('service_id' not in params) or (params['service_id'] is None):
743            raise ValueError("Missing the required parameter `service_id` when calling `list_folders`")
744        # verify the required parameter 'user_id' is set
745        if ('user_id' not in params) or (params['user_id'] is None):
746            raise ValueError("Missing the required parameter `user_id` when calling `list_folders`")
747
748
749        collection_formats = {}
750
751        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/cloud_storage/{serviceId}/folders'.replace('{format}', 'json')
752        path_params = {}
753        if 'account_id' in params:
754            path_params['accountId'] = params['account_id']
755        if 'service_id' in params:
756            path_params['serviceId'] = params['service_id']
757        if 'user_id' in params:
758            path_params['userId'] = params['user_id']
759
760        query_params = {}
761        if 'cloud_storage_folder_path' in params:
762            query_params['cloud_storage_folder_path'] = params['cloud_storage_folder_path']
763        if 'count' in params:
764            query_params['count'] = params['count']
765        if 'order' in params:
766            query_params['order'] = params['order']
767        if 'order_by' in params:
768            query_params['order_by'] = params['order_by']
769        if 'search_text' in params:
770            query_params['search_text'] = params['search_text']
771        if 'start_position' in params:
772            query_params['start_position'] = params['start_position']
773
774        header_params = {}
775
776        form_params = []
777        local_var_files = {}
778
779        body_params = None
780        # HTTP header `Accept`
781        header_params['Accept'] = self.api_client.\
782            select_header_accept(['application/json'])
783
784        # Authentication setting
785        auth_settings = []
786
787        return self.api_client.call_api(resource_path, 'GET',
788                                        path_params,
789                                        query_params,
790                                        header_params,
791                                        body=body_params,
792                                        post_params=form_params,
793                                        files=local_var_files,
794                                        response_type='ExternalFolder',
795                                        auth_settings=auth_settings,
796                                        callback=params.get('callback'),
797                                        _return_http_data_only=params.get('_return_http_data_only'),
798                                        _preload_content=params.get('_preload_content', True),
799                                        _request_timeout=params.get('_request_timeout'),
800                                        collection_formats=collection_formats)
801
802    def list_providers(self, account_id, user_id, **kwargs):
803        """
804        Get the Cloud Storage Provider configuration for the specified user.
805        Retrieves the list of cloud storage providers enabled for the account and the configuration information for the user.  The {serviceId} parameter can be either the service name or serviceId.
806        This method makes a synchronous HTTP request by default. To make an
807        asynchronous HTTP request, please define a `callback` function
808        to be invoked when receiving the response.
809        >>> def callback_function(response):
810        >>>     pprint(response)
811        >>>
812        >>> thread = api.list_providers(account_id, user_id, callback=callback_function)
813
814        :param callback function: The callback function
815            for asynchronous request. (optional)
816        :param str account_id: The external account number (int) or account ID Guid. (required)
817        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
818        :param str redirect_url:  The URL the user is redirected to after the cloud storage provider authenticates the user. Using this will append the redirectUrl to the authenticationUrl.  The redirectUrl is restricted to URLs in the docusign.com or docusign.net domains.  
819        :return: CloudStorageProviders
820                 If the method is called asynchronously,
821                 returns the request thread.
822        """
823        kwargs['_return_http_data_only'] = True
824        if kwargs.get('callback'):
825            return self.list_providers_with_http_info(account_id, user_id, **kwargs)
826        else:
827            (data) = self.list_providers_with_http_info(account_id, user_id, **kwargs)
828            return data
829
830    def list_providers_with_http_info(self, account_id, user_id, **kwargs):
831        """
832        Get the Cloud Storage Provider configuration for the specified user.
833        Retrieves the list of cloud storage providers enabled for the account and the configuration information for the user.  The {serviceId} parameter can be either the service name or serviceId.
834        This method makes a synchronous HTTP request by default. To make an
835        asynchronous HTTP request, please define a `callback` function
836        to be invoked when receiving the response.
837        >>> def callback_function(response):
838        >>>     pprint(response)
839        >>>
840        >>> thread = api.list_providers_with_http_info(account_id, user_id, callback=callback_function)
841
842        :param callback function: The callback function
843            for asynchronous request. (optional)
844        :param str account_id: The external account number (int) or account ID Guid. (required)
845        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
846        :param str redirect_url:  The URL the user is redirected to after the cloud storage provider authenticates the user. Using this will append the redirectUrl to the authenticationUrl.  The redirectUrl is restricted to URLs in the docusign.com or docusign.net domains.  
847        :return: CloudStorageProviders
848                 If the method is called asynchronously,
849                 returns the request thread.
850        """
851
852        all_params = ['account_id', 'user_id', 'redirect_url']
853        all_params.append('callback')
854        all_params.append('_return_http_data_only')
855        all_params.append('_preload_content')
856        all_params.append('_request_timeout')
857
858        params = locals()
859        for key, val in iteritems(params['kwargs']):
860            if key not in all_params:
861                raise TypeError(
862                    "Got an unexpected keyword argument '%s'"
863                    " to method list_providers" % key
864                )
865            params[key] = val
866        del params['kwargs']
867        # verify the required parameter 'account_id' is set
868        if ('account_id' not in params) or (params['account_id'] is None):
869            raise ValueError("Missing the required parameter `account_id` when calling `list_providers`")
870        # verify the required parameter 'user_id' is set
871        if ('user_id' not in params) or (params['user_id'] is None):
872            raise ValueError("Missing the required parameter `user_id` when calling `list_providers`")
873
874
875        collection_formats = {}
876
877        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/cloud_storage'.replace('{format}', 'json')
878        path_params = {}
879        if 'account_id' in params:
880            path_params['accountId'] = params['account_id']
881        if 'user_id' in params:
882            path_params['userId'] = params['user_id']
883
884        query_params = {}
885        if 'redirect_url' in params:
886            query_params['redirectUrl'] = params['redirect_url']
887
888        header_params = {}
889
890        form_params = []
891        local_var_files = {}
892
893        body_params = None
894        # HTTP header `Accept`
895        header_params['Accept'] = self.api_client.\
896            select_header_accept(['application/json'])
897
898        # Authentication setting
899        auth_settings = []
900
901        return self.api_client.call_api(resource_path, 'GET',
902                                        path_params,
903                                        query_params,
904                                        header_params,
905                                        body=body_params,
906                                        post_params=form_params,
907                                        files=local_var_files,
908                                        response_type='CloudStorageProviders',
909                                        auth_settings=auth_settings,
910                                        callback=params.get('callback'),
911                                        _return_http_data_only=params.get('_return_http_data_only'),
912                                        _preload_content=params.get('_preload_content', True),
913                                        _request_timeout=params.get('_request_timeout'),
914                                        collection_formats=collection_formats)
class CloudStorageApi:
 28class CloudStorageApi(object):
 29    """
 30    NOTE: This class is auto generated by the swagger code generator program.
 31    Do not edit the class manually.
 32    Ref: https://github.com/swagger-api/swagger-codegen
 33    """
 34
 35    def __init__(self, api_client=None):
 36        config = Configuration()
 37        if api_client:
 38            self.api_client = api_client
 39        else:
 40            if not config.api_client:
 41                config.api_client = ApiClient()
 42            self.api_client = config.api_client
 43
 44    def create_provider(self, account_id, user_id, **kwargs):
 45        """
 46        Configures the redirect URL information  for one or more cloud storage providers for the specified user.
 47        Configures the redirect URL information  for one or more cloud storage providers for the specified user. The redirect URL is added to the authentication URL to complete the return route.
 48        This method makes a synchronous HTTP request by default. To make an
 49        asynchronous HTTP request, please define a `callback` function
 50        to be invoked when receiving the response.
 51        >>> def callback_function(response):
 52        >>>     pprint(response)
 53        >>>
 54        >>> thread = api.create_provider(account_id, user_id, callback=callback_function)
 55
 56        :param callback function: The callback function
 57            for asynchronous request. (optional)
 58        :param str account_id: The external account number (int) or account ID Guid. (required)
 59        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
 60        :param CloudStorageProviders cloud_storage_providers:
 61        :return: CloudStorageProviders
 62                 If the method is called asynchronously,
 63                 returns the request thread.
 64        """
 65        kwargs['_return_http_data_only'] = True
 66        if kwargs.get('callback'):
 67            return self.create_provider_with_http_info(account_id, user_id, **kwargs)
 68        else:
 69            (data) = self.create_provider_with_http_info(account_id, user_id, **kwargs)
 70            return data
 71
 72    def create_provider_with_http_info(self, account_id, user_id, **kwargs):
 73        """
 74        Configures the redirect URL information  for one or more cloud storage providers for the specified user.
 75        Configures the redirect URL information  for one or more cloud storage providers for the specified user. The redirect URL is added to the authentication URL to complete the return route.
 76        This method makes a synchronous HTTP request by default. To make an
 77        asynchronous HTTP request, please define a `callback` function
 78        to be invoked when receiving the response.
 79        >>> def callback_function(response):
 80        >>>     pprint(response)
 81        >>>
 82        >>> thread = api.create_provider_with_http_info(account_id, user_id, callback=callback_function)
 83
 84        :param callback function: The callback function
 85            for asynchronous request. (optional)
 86        :param str account_id: The external account number (int) or account ID Guid. (required)
 87        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
 88        :param CloudStorageProviders cloud_storage_providers:
 89        :return: CloudStorageProviders
 90                 If the method is called asynchronously,
 91                 returns the request thread.
 92        """
 93
 94        all_params = ['account_id', 'user_id', 'cloud_storage_providers']
 95        all_params.append('callback')
 96        all_params.append('_return_http_data_only')
 97        all_params.append('_preload_content')
 98        all_params.append('_request_timeout')
 99
100        params = locals()
101        for key, val in iteritems(params['kwargs']):
102            if key not in all_params:
103                raise TypeError(
104                    "Got an unexpected keyword argument '%s'"
105                    " to method create_provider" % key
106                )
107            params[key] = val
108        del params['kwargs']
109        # verify the required parameter 'account_id' is set
110        if ('account_id' not in params) or (params['account_id'] is None):
111            raise ValueError("Missing the required parameter `account_id` when calling `create_provider`")
112        # verify the required parameter 'user_id' is set
113        if ('user_id' not in params) or (params['user_id'] is None):
114            raise ValueError("Missing the required parameter `user_id` when calling `create_provider`")
115
116
117        collection_formats = {}
118
119        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/cloud_storage'.replace('{format}', 'json')
120        path_params = {}
121        if 'account_id' in params:
122            path_params['accountId'] = params['account_id']
123        if 'user_id' in params:
124            path_params['userId'] = params['user_id']
125
126        query_params = {}
127
128        header_params = {}
129
130        form_params = []
131        local_var_files = {}
132
133        body_params = None
134        if 'cloud_storage_providers' in params:
135            body_params = params['cloud_storage_providers']
136        # HTTP header `Accept`
137        header_params['Accept'] = self.api_client.\
138            select_header_accept(['application/json'])
139
140        # Authentication setting
141        auth_settings = []
142
143        return self.api_client.call_api(resource_path, 'POST',
144                                        path_params,
145                                        query_params,
146                                        header_params,
147                                        body=body_params,
148                                        post_params=form_params,
149                                        files=local_var_files,
150                                        response_type='CloudStorageProviders',
151                                        auth_settings=auth_settings,
152                                        callback=params.get('callback'),
153                                        _return_http_data_only=params.get('_return_http_data_only'),
154                                        _preload_content=params.get('_preload_content', True),
155                                        _request_timeout=params.get('_request_timeout'),
156                                        collection_formats=collection_formats)
157
158    def delete_provider(self, account_id, service_id, user_id, **kwargs):
159        """
160        Deletes the user authentication information for the specified cloud storage provider.
161        Deletes the user authentication information for the specified cloud storage provider. The next time the user tries to access the cloud storage provider, they must pass normal authentication for this cloud storage provider.
162        This method makes a synchronous HTTP request by default. To make an
163        asynchronous HTTP request, please define a `callback` function
164        to be invoked when receiving the response.
165        >>> def callback_function(response):
166        >>>     pprint(response)
167        >>>
168        >>> thread = api.delete_provider(account_id, service_id, user_id, callback=callback_function)
169
170        :param callback function: The callback function
171            for asynchronous request. (optional)
172        :param str account_id: The external account number (int) or account ID Guid. (required)
173        :param str service_id: The ID of the service to access.   Valid values are the service name (\"Box\") or the numerical serviceId (\"4136\"). (required)
174        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
175        :return: CloudStorageProviders
176                 If the method is called asynchronously,
177                 returns the request thread.
178        """
179        kwargs['_return_http_data_only'] = True
180        if kwargs.get('callback'):
181            return self.delete_provider_with_http_info(account_id, service_id, user_id, **kwargs)
182        else:
183            (data) = self.delete_provider_with_http_info(account_id, service_id, user_id, **kwargs)
184            return data
185
186    def delete_provider_with_http_info(self, account_id, service_id, user_id, **kwargs):
187        """
188        Deletes the user authentication information for the specified cloud storage provider.
189        Deletes the user authentication information for the specified cloud storage provider. The next time the user tries to access the cloud storage provider, they must pass normal authentication for this cloud storage provider.
190        This method makes a synchronous HTTP request by default. To make an
191        asynchronous HTTP request, please define a `callback` function
192        to be invoked when receiving the response.
193        >>> def callback_function(response):
194        >>>     pprint(response)
195        >>>
196        >>> thread = api.delete_provider_with_http_info(account_id, service_id, user_id, callback=callback_function)
197
198        :param callback function: The callback function
199            for asynchronous request. (optional)
200        :param str account_id: The external account number (int) or account ID Guid. (required)
201        :param str service_id: The ID of the service to access.   Valid values are the service name (\"Box\") or the numerical serviceId (\"4136\"). (required)
202        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
203        :return: CloudStorageProviders
204                 If the method is called asynchronously,
205                 returns the request thread.
206        """
207
208        all_params = ['account_id', 'service_id', 'user_id']
209        all_params.append('callback')
210        all_params.append('_return_http_data_only')
211        all_params.append('_preload_content')
212        all_params.append('_request_timeout')
213
214        params = locals()
215        for key, val in iteritems(params['kwargs']):
216            if key not in all_params:
217                raise TypeError(
218                    "Got an unexpected keyword argument '%s'"
219                    " to method delete_provider" % key
220                )
221            params[key] = val
222        del params['kwargs']
223        # verify the required parameter 'account_id' is set
224        if ('account_id' not in params) or (params['account_id'] is None):
225            raise ValueError("Missing the required parameter `account_id` when calling `delete_provider`")
226        # verify the required parameter 'service_id' is set
227        if ('service_id' not in params) or (params['service_id'] is None):
228            raise ValueError("Missing the required parameter `service_id` when calling `delete_provider`")
229        # verify the required parameter 'user_id' is set
230        if ('user_id' not in params) or (params['user_id'] is None):
231            raise ValueError("Missing the required parameter `user_id` when calling `delete_provider`")
232
233
234        collection_formats = {}
235
236        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/cloud_storage/{serviceId}'.replace('{format}', 'json')
237        path_params = {}
238        if 'account_id' in params:
239            path_params['accountId'] = params['account_id']
240        if 'service_id' in params:
241            path_params['serviceId'] = params['service_id']
242        if 'user_id' in params:
243            path_params['userId'] = params['user_id']
244
245        query_params = {}
246
247        header_params = {}
248
249        form_params = []
250        local_var_files = {}
251
252        body_params = None
253        # HTTP header `Accept`
254        header_params['Accept'] = self.api_client.\
255            select_header_accept(['application/json'])
256
257        # Authentication setting
258        auth_settings = []
259
260        return self.api_client.call_api(resource_path, 'DELETE',
261                                        path_params,
262                                        query_params,
263                                        header_params,
264                                        body=body_params,
265                                        post_params=form_params,
266                                        files=local_var_files,
267                                        response_type='CloudStorageProviders',
268                                        auth_settings=auth_settings,
269                                        callback=params.get('callback'),
270                                        _return_http_data_only=params.get('_return_http_data_only'),
271                                        _preload_content=params.get('_preload_content', True),
272                                        _request_timeout=params.get('_request_timeout'),
273                                        collection_formats=collection_formats)
274
275    def delete_providers(self, account_id, user_id, **kwargs):
276        """
277        Deletes the user authentication information for one or more cloud storage providers.
278        Deletes the user authentication information for one or more cloud storage providers. The next time the user tries to access the cloud storage provider, they must pass normal authentication.
279        This method makes a synchronous HTTP request by default. To make an
280        asynchronous HTTP request, please define a `callback` function
281        to be invoked when receiving the response.
282        >>> def callback_function(response):
283        >>>     pprint(response)
284        >>>
285        >>> thread = api.delete_providers(account_id, user_id, callback=callback_function)
286
287        :param callback function: The callback function
288            for asynchronous request. (optional)
289        :param str account_id: The external account number (int) or account ID Guid. (required)
290        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
291        :param CloudStorageProviders cloud_storage_providers:
292        :return: CloudStorageProviders
293                 If the method is called asynchronously,
294                 returns the request thread.
295        """
296        kwargs['_return_http_data_only'] = True
297        if kwargs.get('callback'):
298            return self.delete_providers_with_http_info(account_id, user_id, **kwargs)
299        else:
300            (data) = self.delete_providers_with_http_info(account_id, user_id, **kwargs)
301            return data
302
303    def delete_providers_with_http_info(self, account_id, user_id, **kwargs):
304        """
305        Deletes the user authentication information for one or more cloud storage providers.
306        Deletes the user authentication information for one or more cloud storage providers. The next time the user tries to access the cloud storage provider, they must pass normal authentication.
307        This method makes a synchronous HTTP request by default. To make an
308        asynchronous HTTP request, please define a `callback` function
309        to be invoked when receiving the response.
310        >>> def callback_function(response):
311        >>>     pprint(response)
312        >>>
313        >>> thread = api.delete_providers_with_http_info(account_id, user_id, callback=callback_function)
314
315        :param callback function: The callback function
316            for asynchronous request. (optional)
317        :param str account_id: The external account number (int) or account ID Guid. (required)
318        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
319        :param CloudStorageProviders cloud_storage_providers:
320        :return: CloudStorageProviders
321                 If the method is called asynchronously,
322                 returns the request thread.
323        """
324
325        all_params = ['account_id', 'user_id', 'cloud_storage_providers']
326        all_params.append('callback')
327        all_params.append('_return_http_data_only')
328        all_params.append('_preload_content')
329        all_params.append('_request_timeout')
330
331        params = locals()
332        for key, val in iteritems(params['kwargs']):
333            if key not in all_params:
334                raise TypeError(
335                    "Got an unexpected keyword argument '%s'"
336                    " to method delete_providers" % key
337                )
338            params[key] = val
339        del params['kwargs']
340        # verify the required parameter 'account_id' is set
341        if ('account_id' not in params) or (params['account_id'] is None):
342            raise ValueError("Missing the required parameter `account_id` when calling `delete_providers`")
343        # verify the required parameter 'user_id' is set
344        if ('user_id' not in params) or (params['user_id'] is None):
345            raise ValueError("Missing the required parameter `user_id` when calling `delete_providers`")
346
347
348        collection_formats = {}
349
350        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/cloud_storage'.replace('{format}', 'json')
351        path_params = {}
352        if 'account_id' in params:
353            path_params['accountId'] = params['account_id']
354        if 'user_id' in params:
355            path_params['userId'] = params['user_id']
356
357        query_params = {}
358
359        header_params = {}
360
361        form_params = []
362        local_var_files = {}
363
364        body_params = None
365        if 'cloud_storage_providers' in params:
366            body_params = params['cloud_storage_providers']
367        # HTTP header `Accept`
368        header_params['Accept'] = self.api_client.\
369            select_header_accept(['application/json'])
370
371        # Authentication setting
372        auth_settings = []
373
374        return self.api_client.call_api(resource_path, 'DELETE',
375                                        path_params,
376                                        query_params,
377                                        header_params,
378                                        body=body_params,
379                                        post_params=form_params,
380                                        files=local_var_files,
381                                        response_type='CloudStorageProviders',
382                                        auth_settings=auth_settings,
383                                        callback=params.get('callback'),
384                                        _return_http_data_only=params.get('_return_http_data_only'),
385                                        _preload_content=params.get('_preload_content', True),
386                                        _request_timeout=params.get('_request_timeout'),
387                                        collection_formats=collection_formats)
388
389    def get_provider(self, account_id, service_id, user_id, **kwargs):
390        """
391        Gets the specified Cloud Storage Provider configuration for the User.
392        Retrieves the list of cloud storage providers enabled for the account and the configuration information for the user.
393        This method makes a synchronous HTTP request by default. To make an
394        asynchronous HTTP request, please define a `callback` function
395        to be invoked when receiving the response.
396        >>> def callback_function(response):
397        >>>     pprint(response)
398        >>>
399        >>> thread = api.get_provider(account_id, service_id, user_id, callback=callback_function)
400
401        :param callback function: The callback function
402            for asynchronous request. (optional)
403        :param str account_id: The external account number (int) or account ID Guid. (required)
404        :param str service_id: The ID of the service to access.   Valid values are the service name (\"Box\") or the numerical serviceId (\"4136\"). (required)
405        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
406        :param str redirect_url:  The URL the user is redirected to after the cloud storage provider authenticates the user. Using this will append the redirectUrl to the authenticationUrl.  The redirectUrl is restricted to URLs in the docusign.com or docusign.net domains.  
407        :return: CloudStorageProviders
408                 If the method is called asynchronously,
409                 returns the request thread.
410        """
411        kwargs['_return_http_data_only'] = True
412        if kwargs.get('callback'):
413            return self.get_provider_with_http_info(account_id, service_id, user_id, **kwargs)
414        else:
415            (data) = self.get_provider_with_http_info(account_id, service_id, user_id, **kwargs)
416            return data
417
418    def get_provider_with_http_info(self, account_id, service_id, user_id, **kwargs):
419        """
420        Gets the specified Cloud Storage Provider configuration for the User.
421        Retrieves the list of cloud storage providers enabled for the account and the configuration information for the user.
422        This method makes a synchronous HTTP request by default. To make an
423        asynchronous HTTP request, please define a `callback` function
424        to be invoked when receiving the response.
425        >>> def callback_function(response):
426        >>>     pprint(response)
427        >>>
428        >>> thread = api.get_provider_with_http_info(account_id, service_id, user_id, callback=callback_function)
429
430        :param callback function: The callback function
431            for asynchronous request. (optional)
432        :param str account_id: The external account number (int) or account ID Guid. (required)
433        :param str service_id: The ID of the service to access.   Valid values are the service name (\"Box\") or the numerical serviceId (\"4136\"). (required)
434        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
435        :param str redirect_url:  The URL the user is redirected to after the cloud storage provider authenticates the user. Using this will append the redirectUrl to the authenticationUrl.  The redirectUrl is restricted to URLs in the docusign.com or docusign.net domains.  
436        :return: CloudStorageProviders
437                 If the method is called asynchronously,
438                 returns the request thread.
439        """
440
441        all_params = ['account_id', 'service_id', 'user_id', 'redirect_url']
442        all_params.append('callback')
443        all_params.append('_return_http_data_only')
444        all_params.append('_preload_content')
445        all_params.append('_request_timeout')
446
447        params = locals()
448        for key, val in iteritems(params['kwargs']):
449            if key not in all_params:
450                raise TypeError(
451                    "Got an unexpected keyword argument '%s'"
452                    " to method get_provider" % key
453                )
454            params[key] = val
455        del params['kwargs']
456        # verify the required parameter 'account_id' is set
457        if ('account_id' not in params) or (params['account_id'] is None):
458            raise ValueError("Missing the required parameter `account_id` when calling `get_provider`")
459        # verify the required parameter 'service_id' is set
460        if ('service_id' not in params) or (params['service_id'] is None):
461            raise ValueError("Missing the required parameter `service_id` when calling `get_provider`")
462        # verify the required parameter 'user_id' is set
463        if ('user_id' not in params) or (params['user_id'] is None):
464            raise ValueError("Missing the required parameter `user_id` when calling `get_provider`")
465
466
467        collection_formats = {}
468
469        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/cloud_storage/{serviceId}'.replace('{format}', 'json')
470        path_params = {}
471        if 'account_id' in params:
472            path_params['accountId'] = params['account_id']
473        if 'service_id' in params:
474            path_params['serviceId'] = params['service_id']
475        if 'user_id' in params:
476            path_params['userId'] = params['user_id']
477
478        query_params = {}
479        if 'redirect_url' in params:
480            query_params['redirectUrl'] = params['redirect_url']
481
482        header_params = {}
483
484        form_params = []
485        local_var_files = {}
486
487        body_params = None
488        # HTTP header `Accept`
489        header_params['Accept'] = self.api_client.\
490            select_header_accept(['application/json'])
491
492        # Authentication setting
493        auth_settings = []
494
495        return self.api_client.call_api(resource_path, 'GET',
496                                        path_params,
497                                        query_params,
498                                        header_params,
499                                        body=body_params,
500                                        post_params=form_params,
501                                        files=local_var_files,
502                                        response_type='CloudStorageProviders',
503                                        auth_settings=auth_settings,
504                                        callback=params.get('callback'),
505                                        _return_http_data_only=params.get('_return_http_data_only'),
506                                        _preload_content=params.get('_preload_content', True),
507                                        _request_timeout=params.get('_request_timeout'),
508                                        collection_formats=collection_formats)
509
510    def list(self, account_id, folder_id, service_id, user_id, **kwargs):
511        """
512        Gets a list of all the items from the specified cloud storage provider.
513        Retrieves a list of all the items in all  the folders associated with the user from the specified cloud storage provider. You can limit the scope of the returned items by providing a comma separated list of folder IDs in the request.
514        This method makes a synchronous HTTP request by default. To make an
515        asynchronous HTTP request, please define a `callback` function
516        to be invoked when receiving the response.
517        >>> def callback_function(response):
518        >>>     pprint(response)
519        >>>
520        >>> thread = api.list(account_id, folder_id, service_id, user_id, callback=callback_function)
521
522        :param callback function: The callback function
523            for asynchronous request. (optional)
524        :param str account_id: The external account number (int) or account ID Guid. (required)
525        :param str folder_id: The ID of the folder being accessed. (required)
526        :param str service_id: The ID of the service to access.   Valid values are the service name (\"Box\") or the numerical serviceId (\"4136\"). (required)
527        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
528        :param str cloud_storage_folder_path:
529        :param str cloud_storage_folderid_plain:
530        :param str count: An optional value that sets how many items are included in the response.   The default setting for this is 25. 
531        :param str order: An optional value that sets the direction order used to sort the item list.   Valid values are:   * asc = ascending sort order * desc = descending sort order 
532        :param str order_by: An optional value that sets the file attribute used to sort the item list.   Valid values are:   * modified * name  
533        :param str search_text:
534        :param str start_position: Indicates the starting point of the first item included in the response set. It uses a 0-based index. The default setting for this is 0.  
535        :return: ExternalFolder
536                 If the method is called asynchronously,
537                 returns the request thread.
538        """
539        kwargs['_return_http_data_only'] = True
540        if kwargs.get('callback'):
541            return self.list_with_http_info(account_id, folder_id, service_id, user_id, **kwargs)
542        else:
543            (data) = self.list_with_http_info(account_id, folder_id, service_id, user_id, **kwargs)
544            return data
545
546    def list_with_http_info(self, account_id, folder_id, service_id, user_id, **kwargs):
547        """
548        Gets a list of all the items from the specified cloud storage provider.
549        Retrieves a list of all the items in all  the folders associated with the user from the specified cloud storage provider. You can limit the scope of the returned items by providing a comma separated list of folder IDs in the request.
550        This method makes a synchronous HTTP request by default. To make an
551        asynchronous HTTP request, please define a `callback` function
552        to be invoked when receiving the response.
553        >>> def callback_function(response):
554        >>>     pprint(response)
555        >>>
556        >>> thread = api.list_with_http_info(account_id, folder_id, service_id, user_id, callback=callback_function)
557
558        :param callback function: The callback function
559            for asynchronous request. (optional)
560        :param str account_id: The external account number (int) or account ID Guid. (required)
561        :param str folder_id: The ID of the folder being accessed. (required)
562        :param str service_id: The ID of the service to access.   Valid values are the service name (\"Box\") or the numerical serviceId (\"4136\"). (required)
563        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
564        :param str cloud_storage_folder_path:
565        :param str cloud_storage_folderid_plain:
566        :param str count: An optional value that sets how many items are included in the response.   The default setting for this is 25. 
567        :param str order: An optional value that sets the direction order used to sort the item list.   Valid values are:   * asc = ascending sort order * desc = descending sort order 
568        :param str order_by: An optional value that sets the file attribute used to sort the item list.   Valid values are:   * modified * name  
569        :param str search_text:
570        :param str start_position: Indicates the starting point of the first item included in the response set. It uses a 0-based index. The default setting for this is 0.  
571        :return: ExternalFolder
572                 If the method is called asynchronously,
573                 returns the request thread.
574        """
575
576        all_params = ['account_id', 'folder_id', 'service_id', 'user_id', 'cloud_storage_folder_path', 'cloud_storage_folderid_plain', 'count', 'order', 'order_by', 'search_text', 'start_position']
577        all_params.append('callback')
578        all_params.append('_return_http_data_only')
579        all_params.append('_preload_content')
580        all_params.append('_request_timeout')
581
582        params = locals()
583        for key, val in iteritems(params['kwargs']):
584            if key not in all_params:
585                raise TypeError(
586                    "Got an unexpected keyword argument '%s'"
587                    " to method list" % key
588                )
589            params[key] = val
590        del params['kwargs']
591        # verify the required parameter 'account_id' is set
592        if ('account_id' not in params) or (params['account_id'] is None):
593            raise ValueError("Missing the required parameter `account_id` when calling `list`")
594        # verify the required parameter 'folder_id' is set
595        if ('folder_id' not in params) or (params['folder_id'] is None):
596            raise ValueError("Missing the required parameter `folder_id` when calling `list`")
597        # verify the required parameter 'service_id' is set
598        if ('service_id' not in params) or (params['service_id'] is None):
599            raise ValueError("Missing the required parameter `service_id` when calling `list`")
600        # verify the required parameter 'user_id' is set
601        if ('user_id' not in params) or (params['user_id'] is None):
602            raise ValueError("Missing the required parameter `user_id` when calling `list`")
603
604
605        collection_formats = {}
606
607        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/cloud_storage/{serviceId}/folders/{folderId}'.replace('{format}', 'json')
608        path_params = {}
609        if 'account_id' in params:
610            path_params['accountId'] = params['account_id']
611        if 'folder_id' in params:
612            path_params['folderId'] = params['folder_id']
613        if 'service_id' in params:
614            path_params['serviceId'] = params['service_id']
615        if 'user_id' in params:
616            path_params['userId'] = params['user_id']
617
618        query_params = {}
619        if 'cloud_storage_folder_path' in params:
620            query_params['cloud_storage_folder_path'] = params['cloud_storage_folder_path']
621        if 'cloud_storage_folderid_plain' in params:
622            query_params['cloud_storage_folderid_plain'] = params['cloud_storage_folderid_plain']
623        if 'count' in params:
624            query_params['count'] = params['count']
625        if 'order' in params:
626            query_params['order'] = params['order']
627        if 'order_by' in params:
628            query_params['order_by'] = params['order_by']
629        if 'search_text' in params:
630            query_params['search_text'] = params['search_text']
631        if 'start_position' in params:
632            query_params['start_position'] = params['start_position']
633
634        header_params = {}
635
636        form_params = []
637        local_var_files = {}
638
639        body_params = None
640        # HTTP header `Accept`
641        header_params['Accept'] = self.api_client.\
642            select_header_accept(['application/json'])
643
644        # Authentication setting
645        auth_settings = []
646
647        return self.api_client.call_api(resource_path, 'GET',
648                                        path_params,
649                                        query_params,
650                                        header_params,
651                                        body=body_params,
652                                        post_params=form_params,
653                                        files=local_var_files,
654                                        response_type='ExternalFolder',
655                                        auth_settings=auth_settings,
656                                        callback=params.get('callback'),
657                                        _return_http_data_only=params.get('_return_http_data_only'),
658                                        _preload_content=params.get('_preload_content', True),
659                                        _request_timeout=params.get('_request_timeout'),
660                                        collection_formats=collection_formats)
661
662    def list_folders(self, account_id, service_id, user_id, **kwargs):
663        """
664        Retrieves a list of all the items in a specified folder from the specified cloud storage provider.
665        Retrieves a list of all the items in a specified folder from the specified cloud storage provider. 
666        This method makes a synchronous HTTP request by default. To make an
667        asynchronous HTTP request, please define a `callback` function
668        to be invoked when receiving the response.
669        >>> def callback_function(response):
670        >>>     pprint(response)
671        >>>
672        >>> thread = api.list_folders(account_id, service_id, user_id, callback=callback_function)
673
674        :param callback function: The callback function
675            for asynchronous request. (optional)
676        :param str account_id: The external account number (int) or account ID Guid. (required)
677        :param str service_id: The ID of the service to access.   Valid values are the service name (\"Box\") or the numerical serviceId (\"4136\"). (required)
678        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
679        :param str cloud_storage_folder_path: A comma separated list of folder IDs included in the request. 
680        :param str count: An optional value that sets how many items are included in the response.   The default setting for this is 25. 
681        :param str order: An optional value that sets the direction order used to sort the item list.   Valid values are:   * asc = ascending sort order * desc = descending sort order 
682        :param str order_by: An optional value that sets the file attribute used to sort the item list.   Valid values are:   * modified * name  
683        :param str search_text:
684        :param str start_position: Indicates the starting point of the first item included in the response set. It uses a 0-based index. The default setting for this is 0.  
685        :return: ExternalFolder
686                 If the method is called asynchronously,
687                 returns the request thread.
688        """
689        kwargs['_return_http_data_only'] = True
690        if kwargs.get('callback'):
691            return self.list_folders_with_http_info(account_id, service_id, user_id, **kwargs)
692        else:
693            (data) = self.list_folders_with_http_info(account_id, service_id, user_id, **kwargs)
694            return data
695
696    def list_folders_with_http_info(self, account_id, service_id, user_id, **kwargs):
697        """
698        Retrieves a list of all the items in a specified folder from the specified cloud storage provider.
699        Retrieves a list of all the items in a specified folder from the specified cloud storage provider. 
700        This method makes a synchronous HTTP request by default. To make an
701        asynchronous HTTP request, please define a `callback` function
702        to be invoked when receiving the response.
703        >>> def callback_function(response):
704        >>>     pprint(response)
705        >>>
706        >>> thread = api.list_folders_with_http_info(account_id, service_id, user_id, callback=callback_function)
707
708        :param callback function: The callback function
709            for asynchronous request. (optional)
710        :param str account_id: The external account number (int) or account ID Guid. (required)
711        :param str service_id: The ID of the service to access.   Valid values are the service name (\"Box\") or the numerical serviceId (\"4136\"). (required)
712        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
713        :param str cloud_storage_folder_path: A comma separated list of folder IDs included in the request. 
714        :param str count: An optional value that sets how many items are included in the response.   The default setting for this is 25. 
715        :param str order: An optional value that sets the direction order used to sort the item list.   Valid values are:   * asc = ascending sort order * desc = descending sort order 
716        :param str order_by: An optional value that sets the file attribute used to sort the item list.   Valid values are:   * modified * name  
717        :param str search_text:
718        :param str start_position: Indicates the starting point of the first item included in the response set. It uses a 0-based index. The default setting for this is 0.  
719        :return: ExternalFolder
720                 If the method is called asynchronously,
721                 returns the request thread.
722        """
723
724        all_params = ['account_id', 'service_id', 'user_id', 'cloud_storage_folder_path', 'count', 'order', 'order_by', 'search_text', 'start_position']
725        all_params.append('callback')
726        all_params.append('_return_http_data_only')
727        all_params.append('_preload_content')
728        all_params.append('_request_timeout')
729
730        params = locals()
731        for key, val in iteritems(params['kwargs']):
732            if key not in all_params:
733                raise TypeError(
734                    "Got an unexpected keyword argument '%s'"
735                    " to method list_folders" % key
736                )
737            params[key] = val
738        del params['kwargs']
739        # verify the required parameter 'account_id' is set
740        if ('account_id' not in params) or (params['account_id'] is None):
741            raise ValueError("Missing the required parameter `account_id` when calling `list_folders`")
742        # verify the required parameter 'service_id' is set
743        if ('service_id' not in params) or (params['service_id'] is None):
744            raise ValueError("Missing the required parameter `service_id` when calling `list_folders`")
745        # verify the required parameter 'user_id' is set
746        if ('user_id' not in params) or (params['user_id'] is None):
747            raise ValueError("Missing the required parameter `user_id` when calling `list_folders`")
748
749
750        collection_formats = {}
751
752        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/cloud_storage/{serviceId}/folders'.replace('{format}', 'json')
753        path_params = {}
754        if 'account_id' in params:
755            path_params['accountId'] = params['account_id']
756        if 'service_id' in params:
757            path_params['serviceId'] = params['service_id']
758        if 'user_id' in params:
759            path_params['userId'] = params['user_id']
760
761        query_params = {}
762        if 'cloud_storage_folder_path' in params:
763            query_params['cloud_storage_folder_path'] = params['cloud_storage_folder_path']
764        if 'count' in params:
765            query_params['count'] = params['count']
766        if 'order' in params:
767            query_params['order'] = params['order']
768        if 'order_by' in params:
769            query_params['order_by'] = params['order_by']
770        if 'search_text' in params:
771            query_params['search_text'] = params['search_text']
772        if 'start_position' in params:
773            query_params['start_position'] = params['start_position']
774
775        header_params = {}
776
777        form_params = []
778        local_var_files = {}
779
780        body_params = None
781        # HTTP header `Accept`
782        header_params['Accept'] = self.api_client.\
783            select_header_accept(['application/json'])
784
785        # Authentication setting
786        auth_settings = []
787
788        return self.api_client.call_api(resource_path, 'GET',
789                                        path_params,
790                                        query_params,
791                                        header_params,
792                                        body=body_params,
793                                        post_params=form_params,
794                                        files=local_var_files,
795                                        response_type='ExternalFolder',
796                                        auth_settings=auth_settings,
797                                        callback=params.get('callback'),
798                                        _return_http_data_only=params.get('_return_http_data_only'),
799                                        _preload_content=params.get('_preload_content', True),
800                                        _request_timeout=params.get('_request_timeout'),
801                                        collection_formats=collection_formats)
802
803    def list_providers(self, account_id, user_id, **kwargs):
804        """
805        Get the Cloud Storage Provider configuration for the specified user.
806        Retrieves the list of cloud storage providers enabled for the account and the configuration information for the user.  The {serviceId} parameter can be either the service name or serviceId.
807        This method makes a synchronous HTTP request by default. To make an
808        asynchronous HTTP request, please define a `callback` function
809        to be invoked when receiving the response.
810        >>> def callback_function(response):
811        >>>     pprint(response)
812        >>>
813        >>> thread = api.list_providers(account_id, user_id, callback=callback_function)
814
815        :param callback function: The callback function
816            for asynchronous request. (optional)
817        :param str account_id: The external account number (int) or account ID Guid. (required)
818        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
819        :param str redirect_url:  The URL the user is redirected to after the cloud storage provider authenticates the user. Using this will append the redirectUrl to the authenticationUrl.  The redirectUrl is restricted to URLs in the docusign.com or docusign.net domains.  
820        :return: CloudStorageProviders
821                 If the method is called asynchronously,
822                 returns the request thread.
823        """
824        kwargs['_return_http_data_only'] = True
825        if kwargs.get('callback'):
826            return self.list_providers_with_http_info(account_id, user_id, **kwargs)
827        else:
828            (data) = self.list_providers_with_http_info(account_id, user_id, **kwargs)
829            return data
830
831    def list_providers_with_http_info(self, account_id, user_id, **kwargs):
832        """
833        Get the Cloud Storage Provider configuration for the specified user.
834        Retrieves the list of cloud storage providers enabled for the account and the configuration information for the user.  The {serviceId} parameter can be either the service name or serviceId.
835        This method makes a synchronous HTTP request by default. To make an
836        asynchronous HTTP request, please define a `callback` function
837        to be invoked when receiving the response.
838        >>> def callback_function(response):
839        >>>     pprint(response)
840        >>>
841        >>> thread = api.list_providers_with_http_info(account_id, user_id, callback=callback_function)
842
843        :param callback function: The callback function
844            for asynchronous request. (optional)
845        :param str account_id: The external account number (int) or account ID Guid. (required)
846        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
847        :param str redirect_url:  The URL the user is redirected to after the cloud storage provider authenticates the user. Using this will append the redirectUrl to the authenticationUrl.  The redirectUrl is restricted to URLs in the docusign.com or docusign.net domains.  
848        :return: CloudStorageProviders
849                 If the method is called asynchronously,
850                 returns the request thread.
851        """
852
853        all_params = ['account_id', 'user_id', 'redirect_url']
854        all_params.append('callback')
855        all_params.append('_return_http_data_only')
856        all_params.append('_preload_content')
857        all_params.append('_request_timeout')
858
859        params = locals()
860        for key, val in iteritems(params['kwargs']):
861            if key not in all_params:
862                raise TypeError(
863                    "Got an unexpected keyword argument '%s'"
864                    " to method list_providers" % key
865                )
866            params[key] = val
867        del params['kwargs']
868        # verify the required parameter 'account_id' is set
869        if ('account_id' not in params) or (params['account_id'] is None):
870            raise ValueError("Missing the required parameter `account_id` when calling `list_providers`")
871        # verify the required parameter 'user_id' is set
872        if ('user_id' not in params) or (params['user_id'] is None):
873            raise ValueError("Missing the required parameter `user_id` when calling `list_providers`")
874
875
876        collection_formats = {}
877
878        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/cloud_storage'.replace('{format}', 'json')
879        path_params = {}
880        if 'account_id' in params:
881            path_params['accountId'] = params['account_id']
882        if 'user_id' in params:
883            path_params['userId'] = params['user_id']
884
885        query_params = {}
886        if 'redirect_url' in params:
887            query_params['redirectUrl'] = params['redirect_url']
888
889        header_params = {}
890
891        form_params = []
892        local_var_files = {}
893
894        body_params = None
895        # HTTP header `Accept`
896        header_params['Accept'] = self.api_client.\
897            select_header_accept(['application/json'])
898
899        # Authentication setting
900        auth_settings = []
901
902        return self.api_client.call_api(resource_path, 'GET',
903                                        path_params,
904                                        query_params,
905                                        header_params,
906                                        body=body_params,
907                                        post_params=form_params,
908                                        files=local_var_files,
909                                        response_type='CloudStorageProviders',
910                                        auth_settings=auth_settings,
911                                        callback=params.get('callback'),
912                                        _return_http_data_only=params.get('_return_http_data_only'),
913                                        _preload_content=params.get('_preload_content', True),
914                                        _request_timeout=params.get('_request_timeout'),
915                                        collection_formats=collection_formats)

NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen

CloudStorageApi(api_client=None)
35    def __init__(self, api_client=None):
36        config = Configuration()
37        if api_client:
38            self.api_client = api_client
39        else:
40            if not config.api_client:
41                config.api_client = ApiClient()
42            self.api_client = config.api_client
def create_provider(self, account_id, user_id, **kwargs)
44    def create_provider(self, account_id, user_id, **kwargs):
45        """
46        Configures the redirect URL information  for one or more cloud storage providers for the specified user.
47        Configures the redirect URL information  for one or more cloud storage providers for the specified user. The redirect URL is added to the authentication URL to complete the return route.
48        This method makes a synchronous HTTP request by default. To make an
49        asynchronous HTTP request, please define a `callback` function
50        to be invoked when receiving the response.
51        >>> def callback_function(response):
52        >>>     pprint(response)
53        >>>
54        >>> thread = api.create_provider(account_id, user_id, callback=callback_function)
55
56        :param callback function: The callback function
57            for asynchronous request. (optional)
58        :param str account_id: The external account number (int) or account ID Guid. (required)
59        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
60        :param CloudStorageProviders cloud_storage_providers:
61        :return: CloudStorageProviders
62                 If the method is called asynchronously,
63                 returns the request thread.
64        """
65        kwargs['_return_http_data_only'] = True
66        if kwargs.get('callback'):
67            return self.create_provider_with_http_info(account_id, user_id, **kwargs)
68        else:
69            (data) = self.create_provider_with_http_info(account_id, user_id, **kwargs)
70            return data

Configures the redirect URL information for one or more cloud storage providers for the specified user. Configures the redirect URL information for one or more cloud storage providers for the specified user. The redirect URL is added to the authentication URL to complete the return route. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.create_provider(account_id, user_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
  • CloudStorageProviders cloud_storage_providers:
Returns

CloudStorageProviders If the method is called asynchronously, returns the request thread.

def create_provider_with_http_info(self, account_id, user_id, **kwargs)
 72    def create_provider_with_http_info(self, account_id, user_id, **kwargs):
 73        """
 74        Configures the redirect URL information  for one or more cloud storage providers for the specified user.
 75        Configures the redirect URL information  for one or more cloud storage providers for the specified user. The redirect URL is added to the authentication URL to complete the return route.
 76        This method makes a synchronous HTTP request by default. To make an
 77        asynchronous HTTP request, please define a `callback` function
 78        to be invoked when receiving the response.
 79        >>> def callback_function(response):
 80        >>>     pprint(response)
 81        >>>
 82        >>> thread = api.create_provider_with_http_info(account_id, user_id, callback=callback_function)
 83
 84        :param callback function: The callback function
 85            for asynchronous request. (optional)
 86        :param str account_id: The external account number (int) or account ID Guid. (required)
 87        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
 88        :param CloudStorageProviders cloud_storage_providers:
 89        :return: CloudStorageProviders
 90                 If the method is called asynchronously,
 91                 returns the request thread.
 92        """
 93
 94        all_params = ['account_id', 'user_id', 'cloud_storage_providers']
 95        all_params.append('callback')
 96        all_params.append('_return_http_data_only')
 97        all_params.append('_preload_content')
 98        all_params.append('_request_timeout')
 99
100        params = locals()
101        for key, val in iteritems(params['kwargs']):
102            if key not in all_params:
103                raise TypeError(
104                    "Got an unexpected keyword argument '%s'"
105                    " to method create_provider" % key
106                )
107            params[key] = val
108        del params['kwargs']
109        # verify the required parameter 'account_id' is set
110        if ('account_id' not in params) or (params['account_id'] is None):
111            raise ValueError("Missing the required parameter `account_id` when calling `create_provider`")
112        # verify the required parameter 'user_id' is set
113        if ('user_id' not in params) or (params['user_id'] is None):
114            raise ValueError("Missing the required parameter `user_id` when calling `create_provider`")
115
116
117        collection_formats = {}
118
119        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/cloud_storage'.replace('{format}', 'json')
120        path_params = {}
121        if 'account_id' in params:
122            path_params['accountId'] = params['account_id']
123        if 'user_id' in params:
124            path_params['userId'] = params['user_id']
125
126        query_params = {}
127
128        header_params = {}
129
130        form_params = []
131        local_var_files = {}
132
133        body_params = None
134        if 'cloud_storage_providers' in params:
135            body_params = params['cloud_storage_providers']
136        # HTTP header `Accept`
137        header_params['Accept'] = self.api_client.\
138            select_header_accept(['application/json'])
139
140        # Authentication setting
141        auth_settings = []
142
143        return self.api_client.call_api(resource_path, 'POST',
144                                        path_params,
145                                        query_params,
146                                        header_params,
147                                        body=body_params,
148                                        post_params=form_params,
149                                        files=local_var_files,
150                                        response_type='CloudStorageProviders',
151                                        auth_settings=auth_settings,
152                                        callback=params.get('callback'),
153                                        _return_http_data_only=params.get('_return_http_data_only'),
154                                        _preload_content=params.get('_preload_content', True),
155                                        _request_timeout=params.get('_request_timeout'),
156                                        collection_formats=collection_formats)

Configures the redirect URL information for one or more cloud storage providers for the specified user. Configures the redirect URL information for one or more cloud storage providers for the specified user. The redirect URL is added to the authentication URL to complete the return route. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.create_provider_with_http_info(account_id, user_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
  • CloudStorageProviders cloud_storage_providers:
Returns

CloudStorageProviders If the method is called asynchronously, returns the request thread.

def delete_provider(self, account_id, service_id, user_id, **kwargs)
158    def delete_provider(self, account_id, service_id, user_id, **kwargs):
159        """
160        Deletes the user authentication information for the specified cloud storage provider.
161        Deletes the user authentication information for the specified cloud storage provider. The next time the user tries to access the cloud storage provider, they must pass normal authentication for this cloud storage provider.
162        This method makes a synchronous HTTP request by default. To make an
163        asynchronous HTTP request, please define a `callback` function
164        to be invoked when receiving the response.
165        >>> def callback_function(response):
166        >>>     pprint(response)
167        >>>
168        >>> thread = api.delete_provider(account_id, service_id, user_id, callback=callback_function)
169
170        :param callback function: The callback function
171            for asynchronous request. (optional)
172        :param str account_id: The external account number (int) or account ID Guid. (required)
173        :param str service_id: The ID of the service to access.   Valid values are the service name (\"Box\") or the numerical serviceId (\"4136\"). (required)
174        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
175        :return: CloudStorageProviders
176                 If the method is called asynchronously,
177                 returns the request thread.
178        """
179        kwargs['_return_http_data_only'] = True
180        if kwargs.get('callback'):
181            return self.delete_provider_with_http_info(account_id, service_id, user_id, **kwargs)
182        else:
183            (data) = self.delete_provider_with_http_info(account_id, service_id, user_id, **kwargs)
184            return data

Deletes the user authentication information for the specified cloud storage provider. Deletes the user authentication information for the specified cloud storage provider. The next time the user tries to access the cloud storage provider, they must pass normal authentication for this cloud storage provider. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.delete_provider(account_id, service_id, user_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str service_id: The ID of the service to access. Valid values are the service name ("Box") or the numerical serviceId ("4136"). (required)
  • str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
Returns

CloudStorageProviders If the method is called asynchronously, returns the request thread.

def delete_provider_with_http_info(self, account_id, service_id, user_id, **kwargs)
186    def delete_provider_with_http_info(self, account_id, service_id, user_id, **kwargs):
187        """
188        Deletes the user authentication information for the specified cloud storage provider.
189        Deletes the user authentication information for the specified cloud storage provider. The next time the user tries to access the cloud storage provider, they must pass normal authentication for this cloud storage provider.
190        This method makes a synchronous HTTP request by default. To make an
191        asynchronous HTTP request, please define a `callback` function
192        to be invoked when receiving the response.
193        >>> def callback_function(response):
194        >>>     pprint(response)
195        >>>
196        >>> thread = api.delete_provider_with_http_info(account_id, service_id, user_id, callback=callback_function)
197
198        :param callback function: The callback function
199            for asynchronous request. (optional)
200        :param str account_id: The external account number (int) or account ID Guid. (required)
201        :param str service_id: The ID of the service to access.   Valid values are the service name (\"Box\") or the numerical serviceId (\"4136\"). (required)
202        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
203        :return: CloudStorageProviders
204                 If the method is called asynchronously,
205                 returns the request thread.
206        """
207
208        all_params = ['account_id', 'service_id', 'user_id']
209        all_params.append('callback')
210        all_params.append('_return_http_data_only')
211        all_params.append('_preload_content')
212        all_params.append('_request_timeout')
213
214        params = locals()
215        for key, val in iteritems(params['kwargs']):
216            if key not in all_params:
217                raise TypeError(
218                    "Got an unexpected keyword argument '%s'"
219                    " to method delete_provider" % key
220                )
221            params[key] = val
222        del params['kwargs']
223        # verify the required parameter 'account_id' is set
224        if ('account_id' not in params) or (params['account_id'] is None):
225            raise ValueError("Missing the required parameter `account_id` when calling `delete_provider`")
226        # verify the required parameter 'service_id' is set
227        if ('service_id' not in params) or (params['service_id'] is None):
228            raise ValueError("Missing the required parameter `service_id` when calling `delete_provider`")
229        # verify the required parameter 'user_id' is set
230        if ('user_id' not in params) or (params['user_id'] is None):
231            raise ValueError("Missing the required parameter `user_id` when calling `delete_provider`")
232
233
234        collection_formats = {}
235
236        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/cloud_storage/{serviceId}'.replace('{format}', 'json')
237        path_params = {}
238        if 'account_id' in params:
239            path_params['accountId'] = params['account_id']
240        if 'service_id' in params:
241            path_params['serviceId'] = params['service_id']
242        if 'user_id' in params:
243            path_params['userId'] = params['user_id']
244
245        query_params = {}
246
247        header_params = {}
248
249        form_params = []
250        local_var_files = {}
251
252        body_params = None
253        # HTTP header `Accept`
254        header_params['Accept'] = self.api_client.\
255            select_header_accept(['application/json'])
256
257        # Authentication setting
258        auth_settings = []
259
260        return self.api_client.call_api(resource_path, 'DELETE',
261                                        path_params,
262                                        query_params,
263                                        header_params,
264                                        body=body_params,
265                                        post_params=form_params,
266                                        files=local_var_files,
267                                        response_type='CloudStorageProviders',
268                                        auth_settings=auth_settings,
269                                        callback=params.get('callback'),
270                                        _return_http_data_only=params.get('_return_http_data_only'),
271                                        _preload_content=params.get('_preload_content', True),
272                                        _request_timeout=params.get('_request_timeout'),
273                                        collection_formats=collection_formats)

Deletes the user authentication information for the specified cloud storage provider. Deletes the user authentication information for the specified cloud storage provider. The next time the user tries to access the cloud storage provider, they must pass normal authentication for this cloud storage provider. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.delete_provider_with_http_info(account_id, service_id, user_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str service_id: The ID of the service to access. Valid values are the service name ("Box") or the numerical serviceId ("4136"). (required)
  • str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
Returns

CloudStorageProviders If the method is called asynchronously, returns the request thread.

def delete_providers(self, account_id, user_id, **kwargs)
275    def delete_providers(self, account_id, user_id, **kwargs):
276        """
277        Deletes the user authentication information for one or more cloud storage providers.
278        Deletes the user authentication information for one or more cloud storage providers. The next time the user tries to access the cloud storage provider, they must pass normal authentication.
279        This method makes a synchronous HTTP request by default. To make an
280        asynchronous HTTP request, please define a `callback` function
281        to be invoked when receiving the response.
282        >>> def callback_function(response):
283        >>>     pprint(response)
284        >>>
285        >>> thread = api.delete_providers(account_id, user_id, callback=callback_function)
286
287        :param callback function: The callback function
288            for asynchronous request. (optional)
289        :param str account_id: The external account number (int) or account ID Guid. (required)
290        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
291        :param CloudStorageProviders cloud_storage_providers:
292        :return: CloudStorageProviders
293                 If the method is called asynchronously,
294                 returns the request thread.
295        """
296        kwargs['_return_http_data_only'] = True
297        if kwargs.get('callback'):
298            return self.delete_providers_with_http_info(account_id, user_id, **kwargs)
299        else:
300            (data) = self.delete_providers_with_http_info(account_id, user_id, **kwargs)
301            return data

Deletes the user authentication information for one or more cloud storage providers. Deletes the user authentication information for one or more cloud storage providers. The next time the user tries to access the cloud storage provider, they must pass normal authentication. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.delete_providers(account_id, user_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
  • CloudStorageProviders cloud_storage_providers:
Returns

CloudStorageProviders If the method is called asynchronously, returns the request thread.

def delete_providers_with_http_info(self, account_id, user_id, **kwargs)
303    def delete_providers_with_http_info(self, account_id, user_id, **kwargs):
304        """
305        Deletes the user authentication information for one or more cloud storage providers.
306        Deletes the user authentication information for one or more cloud storage providers. The next time the user tries to access the cloud storage provider, they must pass normal authentication.
307        This method makes a synchronous HTTP request by default. To make an
308        asynchronous HTTP request, please define a `callback` function
309        to be invoked when receiving the response.
310        >>> def callback_function(response):
311        >>>     pprint(response)
312        >>>
313        >>> thread = api.delete_providers_with_http_info(account_id, user_id, callback=callback_function)
314
315        :param callback function: The callback function
316            for asynchronous request. (optional)
317        :param str account_id: The external account number (int) or account ID Guid. (required)
318        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
319        :param CloudStorageProviders cloud_storage_providers:
320        :return: CloudStorageProviders
321                 If the method is called asynchronously,
322                 returns the request thread.
323        """
324
325        all_params = ['account_id', 'user_id', 'cloud_storage_providers']
326        all_params.append('callback')
327        all_params.append('_return_http_data_only')
328        all_params.append('_preload_content')
329        all_params.append('_request_timeout')
330
331        params = locals()
332        for key, val in iteritems(params['kwargs']):
333            if key not in all_params:
334                raise TypeError(
335                    "Got an unexpected keyword argument '%s'"
336                    " to method delete_providers" % key
337                )
338            params[key] = val
339        del params['kwargs']
340        # verify the required parameter 'account_id' is set
341        if ('account_id' not in params) or (params['account_id'] is None):
342            raise ValueError("Missing the required parameter `account_id` when calling `delete_providers`")
343        # verify the required parameter 'user_id' is set
344        if ('user_id' not in params) or (params['user_id'] is None):
345            raise ValueError("Missing the required parameter `user_id` when calling `delete_providers`")
346
347
348        collection_formats = {}
349
350        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/cloud_storage'.replace('{format}', 'json')
351        path_params = {}
352        if 'account_id' in params:
353            path_params['accountId'] = params['account_id']
354        if 'user_id' in params:
355            path_params['userId'] = params['user_id']
356
357        query_params = {}
358
359        header_params = {}
360
361        form_params = []
362        local_var_files = {}
363
364        body_params = None
365        if 'cloud_storage_providers' in params:
366            body_params = params['cloud_storage_providers']
367        # HTTP header `Accept`
368        header_params['Accept'] = self.api_client.\
369            select_header_accept(['application/json'])
370
371        # Authentication setting
372        auth_settings = []
373
374        return self.api_client.call_api(resource_path, 'DELETE',
375                                        path_params,
376                                        query_params,
377                                        header_params,
378                                        body=body_params,
379                                        post_params=form_params,
380                                        files=local_var_files,
381                                        response_type='CloudStorageProviders',
382                                        auth_settings=auth_settings,
383                                        callback=params.get('callback'),
384                                        _return_http_data_only=params.get('_return_http_data_only'),
385                                        _preload_content=params.get('_preload_content', True),
386                                        _request_timeout=params.get('_request_timeout'),
387                                        collection_formats=collection_formats)

Deletes the user authentication information for one or more cloud storage providers. Deletes the user authentication information for one or more cloud storage providers. The next time the user tries to access the cloud storage provider, they must pass normal authentication. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.delete_providers_with_http_info(account_id, user_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
  • CloudStorageProviders cloud_storage_providers:
Returns

CloudStorageProviders If the method is called asynchronously, returns the request thread.

def get_provider(self, account_id, service_id, user_id, **kwargs)
389    def get_provider(self, account_id, service_id, user_id, **kwargs):
390        """
391        Gets the specified Cloud Storage Provider configuration for the User.
392        Retrieves the list of cloud storage providers enabled for the account and the configuration information for the user.
393        This method makes a synchronous HTTP request by default. To make an
394        asynchronous HTTP request, please define a `callback` function
395        to be invoked when receiving the response.
396        >>> def callback_function(response):
397        >>>     pprint(response)
398        >>>
399        >>> thread = api.get_provider(account_id, service_id, user_id, callback=callback_function)
400
401        :param callback function: The callback function
402            for asynchronous request. (optional)
403        :param str account_id: The external account number (int) or account ID Guid. (required)
404        :param str service_id: The ID of the service to access.   Valid values are the service name (\"Box\") or the numerical serviceId (\"4136\"). (required)
405        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
406        :param str redirect_url:  The URL the user is redirected to after the cloud storage provider authenticates the user. Using this will append the redirectUrl to the authenticationUrl.  The redirectUrl is restricted to URLs in the docusign.com or docusign.net domains.  
407        :return: CloudStorageProviders
408                 If the method is called asynchronously,
409                 returns the request thread.
410        """
411        kwargs['_return_http_data_only'] = True
412        if kwargs.get('callback'):
413            return self.get_provider_with_http_info(account_id, service_id, user_id, **kwargs)
414        else:
415            (data) = self.get_provider_with_http_info(account_id, service_id, user_id, **kwargs)
416            return data

Gets the specified Cloud Storage Provider configuration for the User. Retrieves the list of cloud storage providers enabled for the account and the configuration information for the user. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.get_provider(account_id, service_id, user_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str service_id: The ID of the service to access. Valid values are the service name ("Box") or the numerical serviceId ("4136"). (required)
  • str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
  • str redirect_url: The URL the user is redirected to after the cloud storage provider authenticates the user. Using this will append the redirectUrl to the authenticationUrl. The redirectUrl is restricted to URLs in the docusign.com or docusign.net domains.
Returns

CloudStorageProviders If the method is called asynchronously, returns the request thread.

def get_provider_with_http_info(self, account_id, service_id, user_id, **kwargs)
418    def get_provider_with_http_info(self, account_id, service_id, user_id, **kwargs):
419        """
420        Gets the specified Cloud Storage Provider configuration for the User.
421        Retrieves the list of cloud storage providers enabled for the account and the configuration information for the user.
422        This method makes a synchronous HTTP request by default. To make an
423        asynchronous HTTP request, please define a `callback` function
424        to be invoked when receiving the response.
425        >>> def callback_function(response):
426        >>>     pprint(response)
427        >>>
428        >>> thread = api.get_provider_with_http_info(account_id, service_id, user_id, callback=callback_function)
429
430        :param callback function: The callback function
431            for asynchronous request. (optional)
432        :param str account_id: The external account number (int) or account ID Guid. (required)
433        :param str service_id: The ID of the service to access.   Valid values are the service name (\"Box\") or the numerical serviceId (\"4136\"). (required)
434        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
435        :param str redirect_url:  The URL the user is redirected to after the cloud storage provider authenticates the user. Using this will append the redirectUrl to the authenticationUrl.  The redirectUrl is restricted to URLs in the docusign.com or docusign.net domains.  
436        :return: CloudStorageProviders
437                 If the method is called asynchronously,
438                 returns the request thread.
439        """
440
441        all_params = ['account_id', 'service_id', 'user_id', 'redirect_url']
442        all_params.append('callback')
443        all_params.append('_return_http_data_only')
444        all_params.append('_preload_content')
445        all_params.append('_request_timeout')
446
447        params = locals()
448        for key, val in iteritems(params['kwargs']):
449            if key not in all_params:
450                raise TypeError(
451                    "Got an unexpected keyword argument '%s'"
452                    " to method get_provider" % key
453                )
454            params[key] = val
455        del params['kwargs']
456        # verify the required parameter 'account_id' is set
457        if ('account_id' not in params) or (params['account_id'] is None):
458            raise ValueError("Missing the required parameter `account_id` when calling `get_provider`")
459        # verify the required parameter 'service_id' is set
460        if ('service_id' not in params) or (params['service_id'] is None):
461            raise ValueError("Missing the required parameter `service_id` when calling `get_provider`")
462        # verify the required parameter 'user_id' is set
463        if ('user_id' not in params) or (params['user_id'] is None):
464            raise ValueError("Missing the required parameter `user_id` when calling `get_provider`")
465
466
467        collection_formats = {}
468
469        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/cloud_storage/{serviceId}'.replace('{format}', 'json')
470        path_params = {}
471        if 'account_id' in params:
472            path_params['accountId'] = params['account_id']
473        if 'service_id' in params:
474            path_params['serviceId'] = params['service_id']
475        if 'user_id' in params:
476            path_params['userId'] = params['user_id']
477
478        query_params = {}
479        if 'redirect_url' in params:
480            query_params['redirectUrl'] = params['redirect_url']
481
482        header_params = {}
483
484        form_params = []
485        local_var_files = {}
486
487        body_params = None
488        # HTTP header `Accept`
489        header_params['Accept'] = self.api_client.\
490            select_header_accept(['application/json'])
491
492        # Authentication setting
493        auth_settings = []
494
495        return self.api_client.call_api(resource_path, 'GET',
496                                        path_params,
497                                        query_params,
498                                        header_params,
499                                        body=body_params,
500                                        post_params=form_params,
501                                        files=local_var_files,
502                                        response_type='CloudStorageProviders',
503                                        auth_settings=auth_settings,
504                                        callback=params.get('callback'),
505                                        _return_http_data_only=params.get('_return_http_data_only'),
506                                        _preload_content=params.get('_preload_content', True),
507                                        _request_timeout=params.get('_request_timeout'),
508                                        collection_formats=collection_formats)

Gets the specified Cloud Storage Provider configuration for the User. Retrieves the list of cloud storage providers enabled for the account and the configuration information for the user. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.get_provider_with_http_info(account_id, service_id, user_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str service_id: The ID of the service to access. Valid values are the service name ("Box") or the numerical serviceId ("4136"). (required)
  • str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
  • str redirect_url: The URL the user is redirected to after the cloud storage provider authenticates the user. Using this will append the redirectUrl to the authenticationUrl. The redirectUrl is restricted to URLs in the docusign.com or docusign.net domains.
Returns

CloudStorageProviders If the method is called asynchronously, returns the request thread.

def list(self, account_id, folder_id, service_id, user_id, **kwargs)
510    def list(self, account_id, folder_id, service_id, user_id, **kwargs):
511        """
512        Gets a list of all the items from the specified cloud storage provider.
513        Retrieves a list of all the items in all  the folders associated with the user from the specified cloud storage provider. You can limit the scope of the returned items by providing a comma separated list of folder IDs in the request.
514        This method makes a synchronous HTTP request by default. To make an
515        asynchronous HTTP request, please define a `callback` function
516        to be invoked when receiving the response.
517        >>> def callback_function(response):
518        >>>     pprint(response)
519        >>>
520        >>> thread = api.list(account_id, folder_id, service_id, user_id, callback=callback_function)
521
522        :param callback function: The callback function
523            for asynchronous request. (optional)
524        :param str account_id: The external account number (int) or account ID Guid. (required)
525        :param str folder_id: The ID of the folder being accessed. (required)
526        :param str service_id: The ID of the service to access.   Valid values are the service name (\"Box\") or the numerical serviceId (\"4136\"). (required)
527        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
528        :param str cloud_storage_folder_path:
529        :param str cloud_storage_folderid_plain:
530        :param str count: An optional value that sets how many items are included in the response.   The default setting for this is 25. 
531        :param str order: An optional value that sets the direction order used to sort the item list.   Valid values are:   * asc = ascending sort order * desc = descending sort order 
532        :param str order_by: An optional value that sets the file attribute used to sort the item list.   Valid values are:   * modified * name  
533        :param str search_text:
534        :param str start_position: Indicates the starting point of the first item included in the response set. It uses a 0-based index. The default setting for this is 0.  
535        :return: ExternalFolder
536                 If the method is called asynchronously,
537                 returns the request thread.
538        """
539        kwargs['_return_http_data_only'] = True
540        if kwargs.get('callback'):
541            return self.list_with_http_info(account_id, folder_id, service_id, user_id, **kwargs)
542        else:
543            (data) = self.list_with_http_info(account_id, folder_id, service_id, user_id, **kwargs)
544            return data

Gets a list of all the items from the specified cloud storage provider. Retrieves a list of all the items in all the folders associated with the user from the specified cloud storage provider. You can limit the scope of the returned items by providing a comma separated list of folder IDs in the request. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.list(account_id, folder_id, service_id, user_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str folder_id: The ID of the folder being accessed. (required)
  • str service_id: The ID of the service to access. Valid values are the service name ("Box") or the numerical serviceId ("4136"). (required)
  • str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
  • str cloud_storage_folder_path:
  • str cloud_storage_folderid_plain:
  • str count: An optional value that sets how many items are included in the response. The default setting for this is 25.
  • str order: An optional value that sets the direction order used to sort the item list. Valid values are: * asc = ascending sort order * desc = descending sort order
  • str order_by: An optional value that sets the file attribute used to sort the item list. Valid values are: * modified * name
  • str search_text:
  • str start_position: Indicates the starting point of the first item included in the response set. It uses a 0-based index. The default setting for this is 0.
Returns

ExternalFolder If the method is called asynchronously, returns the request thread.

def list_with_http_info(self, account_id, folder_id, service_id, user_id, **kwargs)
546    def list_with_http_info(self, account_id, folder_id, service_id, user_id, **kwargs):
547        """
548        Gets a list of all the items from the specified cloud storage provider.
549        Retrieves a list of all the items in all  the folders associated with the user from the specified cloud storage provider. You can limit the scope of the returned items by providing a comma separated list of folder IDs in the request.
550        This method makes a synchronous HTTP request by default. To make an
551        asynchronous HTTP request, please define a `callback` function
552        to be invoked when receiving the response.
553        >>> def callback_function(response):
554        >>>     pprint(response)
555        >>>
556        >>> thread = api.list_with_http_info(account_id, folder_id, service_id, user_id, callback=callback_function)
557
558        :param callback function: The callback function
559            for asynchronous request. (optional)
560        :param str account_id: The external account number (int) or account ID Guid. (required)
561        :param str folder_id: The ID of the folder being accessed. (required)
562        :param str service_id: The ID of the service to access.   Valid values are the service name (\"Box\") or the numerical serviceId (\"4136\"). (required)
563        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
564        :param str cloud_storage_folder_path:
565        :param str cloud_storage_folderid_plain:
566        :param str count: An optional value that sets how many items are included in the response.   The default setting for this is 25. 
567        :param str order: An optional value that sets the direction order used to sort the item list.   Valid values are:   * asc = ascending sort order * desc = descending sort order 
568        :param str order_by: An optional value that sets the file attribute used to sort the item list.   Valid values are:   * modified * name  
569        :param str search_text:
570        :param str start_position: Indicates the starting point of the first item included in the response set. It uses a 0-based index. The default setting for this is 0.  
571        :return: ExternalFolder
572                 If the method is called asynchronously,
573                 returns the request thread.
574        """
575
576        all_params = ['account_id', 'folder_id', 'service_id', 'user_id', 'cloud_storage_folder_path', 'cloud_storage_folderid_plain', 'count', 'order', 'order_by', 'search_text', 'start_position']
577        all_params.append('callback')
578        all_params.append('_return_http_data_only')
579        all_params.append('_preload_content')
580        all_params.append('_request_timeout')
581
582        params = locals()
583        for key, val in iteritems(params['kwargs']):
584            if key not in all_params:
585                raise TypeError(
586                    "Got an unexpected keyword argument '%s'"
587                    " to method list" % key
588                )
589            params[key] = val
590        del params['kwargs']
591        # verify the required parameter 'account_id' is set
592        if ('account_id' not in params) or (params['account_id'] is None):
593            raise ValueError("Missing the required parameter `account_id` when calling `list`")
594        # verify the required parameter 'folder_id' is set
595        if ('folder_id' not in params) or (params['folder_id'] is None):
596            raise ValueError("Missing the required parameter `folder_id` when calling `list`")
597        # verify the required parameter 'service_id' is set
598        if ('service_id' not in params) or (params['service_id'] is None):
599            raise ValueError("Missing the required parameter `service_id` when calling `list`")
600        # verify the required parameter 'user_id' is set
601        if ('user_id' not in params) or (params['user_id'] is None):
602            raise ValueError("Missing the required parameter `user_id` when calling `list`")
603
604
605        collection_formats = {}
606
607        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/cloud_storage/{serviceId}/folders/{folderId}'.replace('{format}', 'json')
608        path_params = {}
609        if 'account_id' in params:
610            path_params['accountId'] = params['account_id']
611        if 'folder_id' in params:
612            path_params['folderId'] = params['folder_id']
613        if 'service_id' in params:
614            path_params['serviceId'] = params['service_id']
615        if 'user_id' in params:
616            path_params['userId'] = params['user_id']
617
618        query_params = {}
619        if 'cloud_storage_folder_path' in params:
620            query_params['cloud_storage_folder_path'] = params['cloud_storage_folder_path']
621        if 'cloud_storage_folderid_plain' in params:
622            query_params['cloud_storage_folderid_plain'] = params['cloud_storage_folderid_plain']
623        if 'count' in params:
624            query_params['count'] = params['count']
625        if 'order' in params:
626            query_params['order'] = params['order']
627        if 'order_by' in params:
628            query_params['order_by'] = params['order_by']
629        if 'search_text' in params:
630            query_params['search_text'] = params['search_text']
631        if 'start_position' in params:
632            query_params['start_position'] = params['start_position']
633
634        header_params = {}
635
636        form_params = []
637        local_var_files = {}
638
639        body_params = None
640        # HTTP header `Accept`
641        header_params['Accept'] = self.api_client.\
642            select_header_accept(['application/json'])
643
644        # Authentication setting
645        auth_settings = []
646
647        return self.api_client.call_api(resource_path, 'GET',
648                                        path_params,
649                                        query_params,
650                                        header_params,
651                                        body=body_params,
652                                        post_params=form_params,
653                                        files=local_var_files,
654                                        response_type='ExternalFolder',
655                                        auth_settings=auth_settings,
656                                        callback=params.get('callback'),
657                                        _return_http_data_only=params.get('_return_http_data_only'),
658                                        _preload_content=params.get('_preload_content', True),
659                                        _request_timeout=params.get('_request_timeout'),
660                                        collection_formats=collection_formats)

Gets a list of all the items from the specified cloud storage provider. Retrieves a list of all the items in all the folders associated with the user from the specified cloud storage provider. You can limit the scope of the returned items by providing a comma separated list of folder IDs in the request. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.list_with_http_info(account_id, folder_id, service_id, user_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str folder_id: The ID of the folder being accessed. (required)
  • str service_id: The ID of the service to access. Valid values are the service name ("Box") or the numerical serviceId ("4136"). (required)
  • str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
  • str cloud_storage_folder_path:
  • str cloud_storage_folderid_plain:
  • str count: An optional value that sets how many items are included in the response. The default setting for this is 25.
  • str order: An optional value that sets the direction order used to sort the item list. Valid values are: * asc = ascending sort order * desc = descending sort order
  • str order_by: An optional value that sets the file attribute used to sort the item list. Valid values are: * modified * name
  • str search_text:
  • str start_position: Indicates the starting point of the first item included in the response set. It uses a 0-based index. The default setting for this is 0.
Returns

ExternalFolder If the method is called asynchronously, returns the request thread.

def list_folders(self, account_id, service_id, user_id, **kwargs)
662    def list_folders(self, account_id, service_id, user_id, **kwargs):
663        """
664        Retrieves a list of all the items in a specified folder from the specified cloud storage provider.
665        Retrieves a list of all the items in a specified folder from the specified cloud storage provider. 
666        This method makes a synchronous HTTP request by default. To make an
667        asynchronous HTTP request, please define a `callback` function
668        to be invoked when receiving the response.
669        >>> def callback_function(response):
670        >>>     pprint(response)
671        >>>
672        >>> thread = api.list_folders(account_id, service_id, user_id, callback=callback_function)
673
674        :param callback function: The callback function
675            for asynchronous request. (optional)
676        :param str account_id: The external account number (int) or account ID Guid. (required)
677        :param str service_id: The ID of the service to access.   Valid values are the service name (\"Box\") or the numerical serviceId (\"4136\"). (required)
678        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
679        :param str cloud_storage_folder_path: A comma separated list of folder IDs included in the request. 
680        :param str count: An optional value that sets how many items are included in the response.   The default setting for this is 25. 
681        :param str order: An optional value that sets the direction order used to sort the item list.   Valid values are:   * asc = ascending sort order * desc = descending sort order 
682        :param str order_by: An optional value that sets the file attribute used to sort the item list.   Valid values are:   * modified * name  
683        :param str search_text:
684        :param str start_position: Indicates the starting point of the first item included in the response set. It uses a 0-based index. The default setting for this is 0.  
685        :return: ExternalFolder
686                 If the method is called asynchronously,
687                 returns the request thread.
688        """
689        kwargs['_return_http_data_only'] = True
690        if kwargs.get('callback'):
691            return self.list_folders_with_http_info(account_id, service_id, user_id, **kwargs)
692        else:
693            (data) = self.list_folders_with_http_info(account_id, service_id, user_id, **kwargs)
694            return data

Retrieves a list of all the items in a specified folder from the specified cloud storage provider. Retrieves a list of all the items in a specified folder from the specified cloud storage provider. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.list_folders(account_id, service_id, user_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str service_id: The ID of the service to access. Valid values are the service name ("Box") or the numerical serviceId ("4136"). (required)
  • str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
  • str cloud_storage_folder_path: A comma separated list of folder IDs included in the request.
  • str count: An optional value that sets how many items are included in the response. The default setting for this is 25.
  • str order: An optional value that sets the direction order used to sort the item list. Valid values are: * asc = ascending sort order * desc = descending sort order
  • str order_by: An optional value that sets the file attribute used to sort the item list. Valid values are: * modified * name
  • str search_text:
  • str start_position: Indicates the starting point of the first item included in the response set. It uses a 0-based index. The default setting for this is 0.
Returns

ExternalFolder If the method is called asynchronously, returns the request thread.

def list_folders_with_http_info(self, account_id, service_id, user_id, **kwargs)
696    def list_folders_with_http_info(self, account_id, service_id, user_id, **kwargs):
697        """
698        Retrieves a list of all the items in a specified folder from the specified cloud storage provider.
699        Retrieves a list of all the items in a specified folder from the specified cloud storage provider. 
700        This method makes a synchronous HTTP request by default. To make an
701        asynchronous HTTP request, please define a `callback` function
702        to be invoked when receiving the response.
703        >>> def callback_function(response):
704        >>>     pprint(response)
705        >>>
706        >>> thread = api.list_folders_with_http_info(account_id, service_id, user_id, callback=callback_function)
707
708        :param callback function: The callback function
709            for asynchronous request. (optional)
710        :param str account_id: The external account number (int) or account ID Guid. (required)
711        :param str service_id: The ID of the service to access.   Valid values are the service name (\"Box\") or the numerical serviceId (\"4136\"). (required)
712        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
713        :param str cloud_storage_folder_path: A comma separated list of folder IDs included in the request. 
714        :param str count: An optional value that sets how many items are included in the response.   The default setting for this is 25. 
715        :param str order: An optional value that sets the direction order used to sort the item list.   Valid values are:   * asc = ascending sort order * desc = descending sort order 
716        :param str order_by: An optional value that sets the file attribute used to sort the item list.   Valid values are:   * modified * name  
717        :param str search_text:
718        :param str start_position: Indicates the starting point of the first item included in the response set. It uses a 0-based index. The default setting for this is 0.  
719        :return: ExternalFolder
720                 If the method is called asynchronously,
721                 returns the request thread.
722        """
723
724        all_params = ['account_id', 'service_id', 'user_id', 'cloud_storage_folder_path', 'count', 'order', 'order_by', 'search_text', 'start_position']
725        all_params.append('callback')
726        all_params.append('_return_http_data_only')
727        all_params.append('_preload_content')
728        all_params.append('_request_timeout')
729
730        params = locals()
731        for key, val in iteritems(params['kwargs']):
732            if key not in all_params:
733                raise TypeError(
734                    "Got an unexpected keyword argument '%s'"
735                    " to method list_folders" % key
736                )
737            params[key] = val
738        del params['kwargs']
739        # verify the required parameter 'account_id' is set
740        if ('account_id' not in params) or (params['account_id'] is None):
741            raise ValueError("Missing the required parameter `account_id` when calling `list_folders`")
742        # verify the required parameter 'service_id' is set
743        if ('service_id' not in params) or (params['service_id'] is None):
744            raise ValueError("Missing the required parameter `service_id` when calling `list_folders`")
745        # verify the required parameter 'user_id' is set
746        if ('user_id' not in params) or (params['user_id'] is None):
747            raise ValueError("Missing the required parameter `user_id` when calling `list_folders`")
748
749
750        collection_formats = {}
751
752        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/cloud_storage/{serviceId}/folders'.replace('{format}', 'json')
753        path_params = {}
754        if 'account_id' in params:
755            path_params['accountId'] = params['account_id']
756        if 'service_id' in params:
757            path_params['serviceId'] = params['service_id']
758        if 'user_id' in params:
759            path_params['userId'] = params['user_id']
760
761        query_params = {}
762        if 'cloud_storage_folder_path' in params:
763            query_params['cloud_storage_folder_path'] = params['cloud_storage_folder_path']
764        if 'count' in params:
765            query_params['count'] = params['count']
766        if 'order' in params:
767            query_params['order'] = params['order']
768        if 'order_by' in params:
769            query_params['order_by'] = params['order_by']
770        if 'search_text' in params:
771            query_params['search_text'] = params['search_text']
772        if 'start_position' in params:
773            query_params['start_position'] = params['start_position']
774
775        header_params = {}
776
777        form_params = []
778        local_var_files = {}
779
780        body_params = None
781        # HTTP header `Accept`
782        header_params['Accept'] = self.api_client.\
783            select_header_accept(['application/json'])
784
785        # Authentication setting
786        auth_settings = []
787
788        return self.api_client.call_api(resource_path, 'GET',
789                                        path_params,
790                                        query_params,
791                                        header_params,
792                                        body=body_params,
793                                        post_params=form_params,
794                                        files=local_var_files,
795                                        response_type='ExternalFolder',
796                                        auth_settings=auth_settings,
797                                        callback=params.get('callback'),
798                                        _return_http_data_only=params.get('_return_http_data_only'),
799                                        _preload_content=params.get('_preload_content', True),
800                                        _request_timeout=params.get('_request_timeout'),
801                                        collection_formats=collection_formats)

Retrieves a list of all the items in a specified folder from the specified cloud storage provider. Retrieves a list of all the items in a specified folder from the specified cloud storage provider. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.list_folders_with_http_info(account_id, service_id, user_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str service_id: The ID of the service to access. Valid values are the service name ("Box") or the numerical serviceId ("4136"). (required)
  • str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
  • str cloud_storage_folder_path: A comma separated list of folder IDs included in the request.
  • str count: An optional value that sets how many items are included in the response. The default setting for this is 25.
  • str order: An optional value that sets the direction order used to sort the item list. Valid values are: * asc = ascending sort order * desc = descending sort order
  • str order_by: An optional value that sets the file attribute used to sort the item list. Valid values are: * modified * name
  • str search_text:
  • str start_position: Indicates the starting point of the first item included in the response set. It uses a 0-based index. The default setting for this is 0.
Returns

ExternalFolder If the method is called asynchronously, returns the request thread.

def list_providers(self, account_id, user_id, **kwargs)
803    def list_providers(self, account_id, user_id, **kwargs):
804        """
805        Get the Cloud Storage Provider configuration for the specified user.
806        Retrieves the list of cloud storage providers enabled for the account and the configuration information for the user.  The {serviceId} parameter can be either the service name or serviceId.
807        This method makes a synchronous HTTP request by default. To make an
808        asynchronous HTTP request, please define a `callback` function
809        to be invoked when receiving the response.
810        >>> def callback_function(response):
811        >>>     pprint(response)
812        >>>
813        >>> thread = api.list_providers(account_id, user_id, callback=callback_function)
814
815        :param callback function: The callback function
816            for asynchronous request. (optional)
817        :param str account_id: The external account number (int) or account ID Guid. (required)
818        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
819        :param str redirect_url:  The URL the user is redirected to after the cloud storage provider authenticates the user. Using this will append the redirectUrl to the authenticationUrl.  The redirectUrl is restricted to URLs in the docusign.com or docusign.net domains.  
820        :return: CloudStorageProviders
821                 If the method is called asynchronously,
822                 returns the request thread.
823        """
824        kwargs['_return_http_data_only'] = True
825        if kwargs.get('callback'):
826            return self.list_providers_with_http_info(account_id, user_id, **kwargs)
827        else:
828            (data) = self.list_providers_with_http_info(account_id, user_id, **kwargs)
829            return data

Get the Cloud Storage Provider configuration for the specified user. Retrieves the list of cloud storage providers enabled for the account and the configuration information for the user. The {serviceId} parameter can be either the service name or serviceId. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.list_providers(account_id, user_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
  • str redirect_url: The URL the user is redirected to after the cloud storage provider authenticates the user. Using this will append the redirectUrl to the authenticationUrl. The redirectUrl is restricted to URLs in the docusign.com or docusign.net domains.
Returns

CloudStorageProviders If the method is called asynchronously, returns the request thread.

def list_providers_with_http_info(self, account_id, user_id, **kwargs)
831    def list_providers_with_http_info(self, account_id, user_id, **kwargs):
832        """
833        Get the Cloud Storage Provider configuration for the specified user.
834        Retrieves the list of cloud storage providers enabled for the account and the configuration information for the user.  The {serviceId} parameter can be either the service name or serviceId.
835        This method makes a synchronous HTTP request by default. To make an
836        asynchronous HTTP request, please define a `callback` function
837        to be invoked when receiving the response.
838        >>> def callback_function(response):
839        >>>     pprint(response)
840        >>>
841        >>> thread = api.list_providers_with_http_info(account_id, user_id, callback=callback_function)
842
843        :param callback function: The callback function
844            for asynchronous request. (optional)
845        :param str account_id: The external account number (int) or account ID Guid. (required)
846        :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
847        :param str redirect_url:  The URL the user is redirected to after the cloud storage provider authenticates the user. Using this will append the redirectUrl to the authenticationUrl.  The redirectUrl is restricted to URLs in the docusign.com or docusign.net domains.  
848        :return: CloudStorageProviders
849                 If the method is called asynchronously,
850                 returns the request thread.
851        """
852
853        all_params = ['account_id', 'user_id', 'redirect_url']
854        all_params.append('callback')
855        all_params.append('_return_http_data_only')
856        all_params.append('_preload_content')
857        all_params.append('_request_timeout')
858
859        params = locals()
860        for key, val in iteritems(params['kwargs']):
861            if key not in all_params:
862                raise TypeError(
863                    "Got an unexpected keyword argument '%s'"
864                    " to method list_providers" % key
865                )
866            params[key] = val
867        del params['kwargs']
868        # verify the required parameter 'account_id' is set
869        if ('account_id' not in params) or (params['account_id'] is None):
870            raise ValueError("Missing the required parameter `account_id` when calling `list_providers`")
871        # verify the required parameter 'user_id' is set
872        if ('user_id' not in params) or (params['user_id'] is None):
873            raise ValueError("Missing the required parameter `user_id` when calling `list_providers`")
874
875
876        collection_formats = {}
877
878        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/cloud_storage'.replace('{format}', 'json')
879        path_params = {}
880        if 'account_id' in params:
881            path_params['accountId'] = params['account_id']
882        if 'user_id' in params:
883            path_params['userId'] = params['user_id']
884
885        query_params = {}
886        if 'redirect_url' in params:
887            query_params['redirectUrl'] = params['redirect_url']
888
889        header_params = {}
890
891        form_params = []
892        local_var_files = {}
893
894        body_params = None
895        # HTTP header `Accept`
896        header_params['Accept'] = self.api_client.\
897            select_header_accept(['application/json'])
898
899        # Authentication setting
900        auth_settings = []
901
902        return self.api_client.call_api(resource_path, 'GET',
903                                        path_params,
904                                        query_params,
905                                        header_params,
906                                        body=body_params,
907                                        post_params=form_params,
908                                        files=local_var_files,
909                                        response_type='CloudStorageProviders',
910                                        auth_settings=auth_settings,
911                                        callback=params.get('callback'),
912                                        _return_http_data_only=params.get('_return_http_data_only'),
913                                        _preload_content=params.get('_preload_content', True),
914                                        _request_timeout=params.get('_request_timeout'),
915                                        collection_formats=collection_formats)

Get the Cloud Storage Provider configuration for the specified user. Retrieves the list of cloud storage providers enabled for the account and the configuration information for the user. The {serviceId} parameter can be either the service name or serviceId. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a callback function to be invoked when receiving the response.

>>> def callback_function(response):
>>>     pprint(response)
>>>
>>> thread = api.list_providers_with_http_info(account_id, user_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str account_id: The external account number (int) or account ID Guid. (required)
  • str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
  • str redirect_url: The URL the user is redirected to after the cloud storage provider authenticates the user. Using this will append the redirectUrl to the authenticationUrl. The redirectUrl is restricted to URLs in the docusign.com or docusign.net domains.
Returns

CloudStorageProviders If the method is called asynchronously, returns the request thread.