docusign_esign.apis.cloud_storage_api

Docusign eSignature REST API

The Docusign eSignature 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 eSignature REST API
  5
  6    The Docusign eSignature 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 sky_drive_skip_token:
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 sky_drive_skip_token:
571        :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.  
572        :return: ExternalFolder
573                 If the method is called asynchronously,
574                 returns the request thread.
575        """
576
577        all_params = ['account_id', 'folder_id', 'service_id', 'user_id', 'cloud_storage_folder_path', 'cloud_storage_folderid_plain', 'count', 'order', 'order_by', 'search_text', 'sky_drive_skip_token', 'start_position']
578        all_params.append('callback')
579        all_params.append('_return_http_data_only')
580        all_params.append('_preload_content')
581        all_params.append('_request_timeout')
582
583        params = locals()
584        for key, val in iteritems(params['kwargs']):
585            if key not in all_params:
586                raise TypeError(
587                    "Got an unexpected keyword argument '%s'"
588                    " to method list" % key
589                )
590            params[key] = val
591        del params['kwargs']
592        # verify the required parameter 'account_id' is set
593        if ('account_id' not in params) or (params['account_id'] is None):
594            raise ValueError("Missing the required parameter `account_id` when calling `list`")
595        # verify the required parameter 'folder_id' is set
596        if ('folder_id' not in params) or (params['folder_id'] is None):
597            raise ValueError("Missing the required parameter `folder_id` when calling `list`")
598        # verify the required parameter 'service_id' is set
599        if ('service_id' not in params) or (params['service_id'] is None):
600            raise ValueError("Missing the required parameter `service_id` when calling `list`")
601        # verify the required parameter 'user_id' is set
602        if ('user_id' not in params) or (params['user_id'] is None):
603            raise ValueError("Missing the required parameter `user_id` when calling `list`")
604
605
606        collection_formats = {}
607
608        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/cloud_storage/{serviceId}/folders/{folderId}'.replace('{format}', 'json')
609        path_params = {}
610        if 'account_id' in params:
611            path_params['accountId'] = params['account_id']
612        if 'folder_id' in params:
613            path_params['folderId'] = params['folder_id']
614        if 'service_id' in params:
615            path_params['serviceId'] = params['service_id']
616        if 'user_id' in params:
617            path_params['userId'] = params['user_id']
618
619        query_params = {}
620        if 'cloud_storage_folder_path' in params:
621            query_params['cloud_storage_folder_path'] = params['cloud_storage_folder_path']
622        if 'cloud_storage_folderid_plain' in params:
623            query_params['cloud_storage_folderid_plain'] = params['cloud_storage_folderid_plain']
624        if 'count' in params:
625            query_params['count'] = params['count']
626        if 'order' in params:
627            query_params['order'] = params['order']
628        if 'order_by' in params:
629            query_params['order_by'] = params['order_by']
630        if 'search_text' in params:
631            query_params['search_text'] = params['search_text']
632        if 'sky_drive_skip_token' in params:
633            query_params['sky_drive_skip_token'] = params['sky_drive_skip_token']
634        if 'start_position' in params:
635            query_params['start_position'] = params['start_position']
636
637        header_params = {}
638
639        form_params = []
640        local_var_files = {}
641
642        body_params = None
643        # HTTP header `Accept`
644        header_params['Accept'] = self.api_client.\
645            select_header_accept(['application/json'])
646
647        # Authentication setting
648        auth_settings = []
649
650        return self.api_client.call_api(resource_path, 'GET',
651                                        path_params,
652                                        query_params,
653                                        header_params,
654                                        body=body_params,
655                                        post_params=form_params,
656                                        files=local_var_files,
657                                        response_type='ExternalFolder',
658                                        auth_settings=auth_settings,
659                                        callback=params.get('callback'),
660                                        _return_http_data_only=params.get('_return_http_data_only'),
661                                        _preload_content=params.get('_preload_content', True),
662                                        _request_timeout=params.get('_request_timeout'),
663                                        collection_formats=collection_formats)
664
665    def list_folders(self, account_id, service_id, user_id, **kwargs):
666        """
667        Retrieves a list of all the items in a specified folder from the specified cloud storage provider.
668        Retrieves a list of all the items in a specified folder from the specified cloud storage provider. 
669        This method makes a synchronous HTTP request by default. To make an
670        asynchronous HTTP request, please define a `callback` function
671        to be invoked when receiving the response.
672        >>> def callback_function(response):
673        >>>     pprint(response)
674        >>>
675        >>> thread = api.list_folders(account_id, service_id, user_id, callback=callback_function)
676
677        :param callback function: The callback function
678            for asynchronous request. (optional)
679        :param str account_id: The external account number (int) or account ID Guid. (required)
680        :param str service_id: The ID of the service to access.   Valid values are the service name (\"Box\") or the numerical serviceId (\"4136\"). (required)
681        :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)
682        :param str cloud_storage_folder_path: A comma separated list of folder IDs included in the request. 
683        :param str count: An optional value that sets how many items are included in the response.   The default setting for this is 25. 
684        :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 
685        :param str order_by: An optional value that sets the file attribute used to sort the item list.   Valid values are:   * modified * name  
686        :param str search_text:
687        :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.  
688        :return: ExternalFolder
689                 If the method is called asynchronously,
690                 returns the request thread.
691        """
692        kwargs['_return_http_data_only'] = True
693        if kwargs.get('callback'):
694            return self.list_folders_with_http_info(account_id, service_id, user_id, **kwargs)
695        else:
696            (data) = self.list_folders_with_http_info(account_id, service_id, user_id, **kwargs)
697            return data
698
699    def list_folders_with_http_info(self, account_id, service_id, user_id, **kwargs):
700        """
701        Retrieves a list of all the items in a specified folder from the specified cloud storage provider.
702        Retrieves a list of all the items in a specified folder from the specified cloud storage provider. 
703        This method makes a synchronous HTTP request by default. To make an
704        asynchronous HTTP request, please define a `callback` function
705        to be invoked when receiving the response.
706        >>> def callback_function(response):
707        >>>     pprint(response)
708        >>>
709        >>> thread = api.list_folders_with_http_info(account_id, service_id, user_id, callback=callback_function)
710
711        :param callback function: The callback function
712            for asynchronous request. (optional)
713        :param str account_id: The external account number (int) or account ID Guid. (required)
714        :param str service_id: The ID of the service to access.   Valid values are the service name (\"Box\") or the numerical serviceId (\"4136\"). (required)
715        :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)
716        :param str cloud_storage_folder_path: A comma separated list of folder IDs included in the request. 
717        :param str count: An optional value that sets how many items are included in the response.   The default setting for this is 25. 
718        :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 
719        :param str order_by: An optional value that sets the file attribute used to sort the item list.   Valid values are:   * modified * name  
720        :param str search_text:
721        :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.  
722        :return: ExternalFolder
723                 If the method is called asynchronously,
724                 returns the request thread.
725        """
726
727        all_params = ['account_id', 'service_id', 'user_id', 'cloud_storage_folder_path', 'count', 'order', 'order_by', 'search_text', 'start_position']
728        all_params.append('callback')
729        all_params.append('_return_http_data_only')
730        all_params.append('_preload_content')
731        all_params.append('_request_timeout')
732
733        params = locals()
734        for key, val in iteritems(params['kwargs']):
735            if key not in all_params:
736                raise TypeError(
737                    "Got an unexpected keyword argument '%s'"
738                    " to method list_folders" % key
739                )
740            params[key] = val
741        del params['kwargs']
742        # verify the required parameter 'account_id' is set
743        if ('account_id' not in params) or (params['account_id'] is None):
744            raise ValueError("Missing the required parameter `account_id` when calling `list_folders`")
745        # verify the required parameter 'service_id' is set
746        if ('service_id' not in params) or (params['service_id'] is None):
747            raise ValueError("Missing the required parameter `service_id` when calling `list_folders`")
748        # verify the required parameter 'user_id' is set
749        if ('user_id' not in params) or (params['user_id'] is None):
750            raise ValueError("Missing the required parameter `user_id` when calling `list_folders`")
751
752
753        collection_formats = {}
754
755        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/cloud_storage/{serviceId}/folders'.replace('{format}', 'json')
756        path_params = {}
757        if 'account_id' in params:
758            path_params['accountId'] = params['account_id']
759        if 'service_id' in params:
760            path_params['serviceId'] = params['service_id']
761        if 'user_id' in params:
762            path_params['userId'] = params['user_id']
763
764        query_params = {}
765        if 'cloud_storage_folder_path' in params:
766            query_params['cloud_storage_folder_path'] = params['cloud_storage_folder_path']
767        if 'count' in params:
768            query_params['count'] = params['count']
769        if 'order' in params:
770            query_params['order'] = params['order']
771        if 'order_by' in params:
772            query_params['order_by'] = params['order_by']
773        if 'search_text' in params:
774            query_params['search_text'] = params['search_text']
775        if 'start_position' in params:
776            query_params['start_position'] = params['start_position']
777
778        header_params = {}
779
780        form_params = []
781        local_var_files = {}
782
783        body_params = None
784        # HTTP header `Accept`
785        header_params['Accept'] = self.api_client.\
786            select_header_accept(['application/json'])
787
788        # Authentication setting
789        auth_settings = []
790
791        return self.api_client.call_api(resource_path, 'GET',
792                                        path_params,
793                                        query_params,
794                                        header_params,
795                                        body=body_params,
796                                        post_params=form_params,
797                                        files=local_var_files,
798                                        response_type='ExternalFolder',
799                                        auth_settings=auth_settings,
800                                        callback=params.get('callback'),
801                                        _return_http_data_only=params.get('_return_http_data_only'),
802                                        _preload_content=params.get('_preload_content', True),
803                                        _request_timeout=params.get('_request_timeout'),
804                                        collection_formats=collection_formats)
805
806    def list_providers(self, account_id, user_id, **kwargs):
807        """
808        Get the Cloud Storage Provider configuration for the specified user.
809        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.
810        This method makes a synchronous HTTP request by default. To make an
811        asynchronous HTTP request, please define a `callback` function
812        to be invoked when receiving the response.
813        >>> def callback_function(response):
814        >>>     pprint(response)
815        >>>
816        >>> thread = api.list_providers(account_id, user_id, callback=callback_function)
817
818        :param callback function: The callback function
819            for asynchronous request. (optional)
820        :param str account_id: The external account number (int) or account ID Guid. (required)
821        :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)
822        :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.  
823        :return: CloudStorageProviders
824                 If the method is called asynchronously,
825                 returns the request thread.
826        """
827        kwargs['_return_http_data_only'] = True
828        if kwargs.get('callback'):
829            return self.list_providers_with_http_info(account_id, user_id, **kwargs)
830        else:
831            (data) = self.list_providers_with_http_info(account_id, user_id, **kwargs)
832            return data
833
834    def list_providers_with_http_info(self, account_id, user_id, **kwargs):
835        """
836        Get the Cloud Storage Provider configuration for the specified user.
837        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.
838        This method makes a synchronous HTTP request by default. To make an
839        asynchronous HTTP request, please define a `callback` function
840        to be invoked when receiving the response.
841        >>> def callback_function(response):
842        >>>     pprint(response)
843        >>>
844        >>> thread = api.list_providers_with_http_info(account_id, user_id, callback=callback_function)
845
846        :param callback function: The callback function
847            for asynchronous request. (optional)
848        :param str account_id: The external account number (int) or account ID Guid. (required)
849        :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)
850        :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.  
851        :return: CloudStorageProviders
852                 If the method is called asynchronously,
853                 returns the request thread.
854        """
855
856        all_params = ['account_id', 'user_id', 'redirect_url']
857        all_params.append('callback')
858        all_params.append('_return_http_data_only')
859        all_params.append('_preload_content')
860        all_params.append('_request_timeout')
861
862        params = locals()
863        for key, val in iteritems(params['kwargs']):
864            if key not in all_params:
865                raise TypeError(
866                    "Got an unexpected keyword argument '%s'"
867                    " to method list_providers" % key
868                )
869            params[key] = val
870        del params['kwargs']
871        # verify the required parameter 'account_id' is set
872        if ('account_id' not in params) or (params['account_id'] is None):
873            raise ValueError("Missing the required parameter `account_id` when calling `list_providers`")
874        # verify the required parameter 'user_id' is set
875        if ('user_id' not in params) or (params['user_id'] is None):
876            raise ValueError("Missing the required parameter `user_id` when calling `list_providers`")
877
878
879        collection_formats = {}
880
881        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/cloud_storage'.replace('{format}', 'json')
882        path_params = {}
883        if 'account_id' in params:
884            path_params['accountId'] = params['account_id']
885        if 'user_id' in params:
886            path_params['userId'] = params['user_id']
887
888        query_params = {}
889        if 'redirect_url' in params:
890            query_params['redirectUrl'] = params['redirect_url']
891
892        header_params = {}
893
894        form_params = []
895        local_var_files = {}
896
897        body_params = None
898        # HTTP header `Accept`
899        header_params['Accept'] = self.api_client.\
900            select_header_accept(['application/json'])
901
902        # Authentication setting
903        auth_settings = []
904
905        return self.api_client.call_api(resource_path, 'GET',
906                                        path_params,
907                                        query_params,
908                                        header_params,
909                                        body=body_params,
910                                        post_params=form_params,
911                                        files=local_var_files,
912                                        response_type='CloudStorageProviders',
913                                        auth_settings=auth_settings,
914                                        callback=params.get('callback'),
915                                        _return_http_data_only=params.get('_return_http_data_only'),
916                                        _preload_content=params.get('_preload_content', True),
917                                        _request_timeout=params.get('_request_timeout'),
918                                        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 sky_drive_skip_token:
535        :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.  
536        :return: ExternalFolder
537                 If the method is called asynchronously,
538                 returns the request thread.
539        """
540        kwargs['_return_http_data_only'] = True
541        if kwargs.get('callback'):
542            return self.list_with_http_info(account_id, folder_id, service_id, user_id, **kwargs)
543        else:
544            (data) = self.list_with_http_info(account_id, folder_id, service_id, user_id, **kwargs)
545            return data
546
547    def list_with_http_info(self, account_id, folder_id, service_id, user_id, **kwargs):
548        """
549        Gets a list of all the items from the specified cloud storage provider.
550        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.
551        This method makes a synchronous HTTP request by default. To make an
552        asynchronous HTTP request, please define a `callback` function
553        to be invoked when receiving the response.
554        >>> def callback_function(response):
555        >>>     pprint(response)
556        >>>
557        >>> thread = api.list_with_http_info(account_id, folder_id, service_id, user_id, callback=callback_function)
558
559        :param callback function: The callback function
560            for asynchronous request. (optional)
561        :param str account_id: The external account number (int) or account ID Guid. (required)
562        :param str folder_id: The ID of the folder being accessed. (required)
563        :param str service_id: The ID of the service to access.   Valid values are the service name (\"Box\") or the numerical serviceId (\"4136\"). (required)
564        :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)
565        :param str cloud_storage_folder_path:
566        :param str cloud_storage_folderid_plain:
567        :param str count: An optional value that sets how many items are included in the response.   The default setting for this is 25. 
568        :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 
569        :param str order_by: An optional value that sets the file attribute used to sort the item list.   Valid values are:   * modified * name  
570        :param str search_text:
571        :param str sky_drive_skip_token:
572        :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.  
573        :return: ExternalFolder
574                 If the method is called asynchronously,
575                 returns the request thread.
576        """
577
578        all_params = ['account_id', 'folder_id', 'service_id', 'user_id', 'cloud_storage_folder_path', 'cloud_storage_folderid_plain', 'count', 'order', 'order_by', 'search_text', 'sky_drive_skip_token', 'start_position']
579        all_params.append('callback')
580        all_params.append('_return_http_data_only')
581        all_params.append('_preload_content')
582        all_params.append('_request_timeout')
583
584        params = locals()
585        for key, val in iteritems(params['kwargs']):
586            if key not in all_params:
587                raise TypeError(
588                    "Got an unexpected keyword argument '%s'"
589                    " to method list" % key
590                )
591            params[key] = val
592        del params['kwargs']
593        # verify the required parameter 'account_id' is set
594        if ('account_id' not in params) or (params['account_id'] is None):
595            raise ValueError("Missing the required parameter `account_id` when calling `list`")
596        # verify the required parameter 'folder_id' is set
597        if ('folder_id' not in params) or (params['folder_id'] is None):
598            raise ValueError("Missing the required parameter `folder_id` when calling `list`")
599        # verify the required parameter 'service_id' is set
600        if ('service_id' not in params) or (params['service_id'] is None):
601            raise ValueError("Missing the required parameter `service_id` when calling `list`")
602        # verify the required parameter 'user_id' is set
603        if ('user_id' not in params) or (params['user_id'] is None):
604            raise ValueError("Missing the required parameter `user_id` when calling `list`")
605
606
607        collection_formats = {}
608
609        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/cloud_storage/{serviceId}/folders/{folderId}'.replace('{format}', 'json')
610        path_params = {}
611        if 'account_id' in params:
612            path_params['accountId'] = params['account_id']
613        if 'folder_id' in params:
614            path_params['folderId'] = params['folder_id']
615        if 'service_id' in params:
616            path_params['serviceId'] = params['service_id']
617        if 'user_id' in params:
618            path_params['userId'] = params['user_id']
619
620        query_params = {}
621        if 'cloud_storage_folder_path' in params:
622            query_params['cloud_storage_folder_path'] = params['cloud_storage_folder_path']
623        if 'cloud_storage_folderid_plain' in params:
624            query_params['cloud_storage_folderid_plain'] = params['cloud_storage_folderid_plain']
625        if 'count' in params:
626            query_params['count'] = params['count']
627        if 'order' in params:
628            query_params['order'] = params['order']
629        if 'order_by' in params:
630            query_params['order_by'] = params['order_by']
631        if 'search_text' in params:
632            query_params['search_text'] = params['search_text']
633        if 'sky_drive_skip_token' in params:
634            query_params['sky_drive_skip_token'] = params['sky_drive_skip_token']
635        if 'start_position' in params:
636            query_params['start_position'] = params['start_position']
637
638        header_params = {}
639
640        form_params = []
641        local_var_files = {}
642
643        body_params = None
644        # HTTP header `Accept`
645        header_params['Accept'] = self.api_client.\
646            select_header_accept(['application/json'])
647
648        # Authentication setting
649        auth_settings = []
650
651        return self.api_client.call_api(resource_path, 'GET',
652                                        path_params,
653                                        query_params,
654                                        header_params,
655                                        body=body_params,
656                                        post_params=form_params,
657                                        files=local_var_files,
658                                        response_type='ExternalFolder',
659                                        auth_settings=auth_settings,
660                                        callback=params.get('callback'),
661                                        _return_http_data_only=params.get('_return_http_data_only'),
662                                        _preload_content=params.get('_preload_content', True),
663                                        _request_timeout=params.get('_request_timeout'),
664                                        collection_formats=collection_formats)
665
666    def list_folders(self, account_id, service_id, user_id, **kwargs):
667        """
668        Retrieves a list of all the items in a specified folder from the specified cloud storage provider.
669        Retrieves a list of all the items in a specified folder from the specified cloud storage provider. 
670        This method makes a synchronous HTTP request by default. To make an
671        asynchronous HTTP request, please define a `callback` function
672        to be invoked when receiving the response.
673        >>> def callback_function(response):
674        >>>     pprint(response)
675        >>>
676        >>> thread = api.list_folders(account_id, service_id, user_id, callback=callback_function)
677
678        :param callback function: The callback function
679            for asynchronous request. (optional)
680        :param str account_id: The external account number (int) or account ID Guid. (required)
681        :param str service_id: The ID of the service to access.   Valid values are the service name (\"Box\") or the numerical serviceId (\"4136\"). (required)
682        :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)
683        :param str cloud_storage_folder_path: A comma separated list of folder IDs included in the request. 
684        :param str count: An optional value that sets how many items are included in the response.   The default setting for this is 25. 
685        :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 
686        :param str order_by: An optional value that sets the file attribute used to sort the item list.   Valid values are:   * modified * name  
687        :param str search_text:
688        :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.  
689        :return: ExternalFolder
690                 If the method is called asynchronously,
691                 returns the request thread.
692        """
693        kwargs['_return_http_data_only'] = True
694        if kwargs.get('callback'):
695            return self.list_folders_with_http_info(account_id, service_id, user_id, **kwargs)
696        else:
697            (data) = self.list_folders_with_http_info(account_id, service_id, user_id, **kwargs)
698            return data
699
700    def list_folders_with_http_info(self, account_id, service_id, user_id, **kwargs):
701        """
702        Retrieves a list of all the items in a specified folder from the specified cloud storage provider.
703        Retrieves a list of all the items in a specified folder from the specified cloud storage provider. 
704        This method makes a synchronous HTTP request by default. To make an
705        asynchronous HTTP request, please define a `callback` function
706        to be invoked when receiving the response.
707        >>> def callback_function(response):
708        >>>     pprint(response)
709        >>>
710        >>> thread = api.list_folders_with_http_info(account_id, service_id, user_id, callback=callback_function)
711
712        :param callback function: The callback function
713            for asynchronous request. (optional)
714        :param str account_id: The external account number (int) or account ID Guid. (required)
715        :param str service_id: The ID of the service to access.   Valid values are the service name (\"Box\") or the numerical serviceId (\"4136\"). (required)
716        :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)
717        :param str cloud_storage_folder_path: A comma separated list of folder IDs included in the request. 
718        :param str count: An optional value that sets how many items are included in the response.   The default setting for this is 25. 
719        :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 
720        :param str order_by: An optional value that sets the file attribute used to sort the item list.   Valid values are:   * modified * name  
721        :param str search_text:
722        :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.  
723        :return: ExternalFolder
724                 If the method is called asynchronously,
725                 returns the request thread.
726        """
727
728        all_params = ['account_id', 'service_id', 'user_id', 'cloud_storage_folder_path', 'count', 'order', 'order_by', 'search_text', 'start_position']
729        all_params.append('callback')
730        all_params.append('_return_http_data_only')
731        all_params.append('_preload_content')
732        all_params.append('_request_timeout')
733
734        params = locals()
735        for key, val in iteritems(params['kwargs']):
736            if key not in all_params:
737                raise TypeError(
738                    "Got an unexpected keyword argument '%s'"
739                    " to method list_folders" % key
740                )
741            params[key] = val
742        del params['kwargs']
743        # verify the required parameter 'account_id' is set
744        if ('account_id' not in params) or (params['account_id'] is None):
745            raise ValueError("Missing the required parameter `account_id` when calling `list_folders`")
746        # verify the required parameter 'service_id' is set
747        if ('service_id' not in params) or (params['service_id'] is None):
748            raise ValueError("Missing the required parameter `service_id` when calling `list_folders`")
749        # verify the required parameter 'user_id' is set
750        if ('user_id' not in params) or (params['user_id'] is None):
751            raise ValueError("Missing the required parameter `user_id` when calling `list_folders`")
752
753
754        collection_formats = {}
755
756        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/cloud_storage/{serviceId}/folders'.replace('{format}', 'json')
757        path_params = {}
758        if 'account_id' in params:
759            path_params['accountId'] = params['account_id']
760        if 'service_id' in params:
761            path_params['serviceId'] = params['service_id']
762        if 'user_id' in params:
763            path_params['userId'] = params['user_id']
764
765        query_params = {}
766        if 'cloud_storage_folder_path' in params:
767            query_params['cloud_storage_folder_path'] = params['cloud_storage_folder_path']
768        if 'count' in params:
769            query_params['count'] = params['count']
770        if 'order' in params:
771            query_params['order'] = params['order']
772        if 'order_by' in params:
773            query_params['order_by'] = params['order_by']
774        if 'search_text' in params:
775            query_params['search_text'] = params['search_text']
776        if 'start_position' in params:
777            query_params['start_position'] = params['start_position']
778
779        header_params = {}
780
781        form_params = []
782        local_var_files = {}
783
784        body_params = None
785        # HTTP header `Accept`
786        header_params['Accept'] = self.api_client.\
787            select_header_accept(['application/json'])
788
789        # Authentication setting
790        auth_settings = []
791
792        return self.api_client.call_api(resource_path, 'GET',
793                                        path_params,
794                                        query_params,
795                                        header_params,
796                                        body=body_params,
797                                        post_params=form_params,
798                                        files=local_var_files,
799                                        response_type='ExternalFolder',
800                                        auth_settings=auth_settings,
801                                        callback=params.get('callback'),
802                                        _return_http_data_only=params.get('_return_http_data_only'),
803                                        _preload_content=params.get('_preload_content', True),
804                                        _request_timeout=params.get('_request_timeout'),
805                                        collection_formats=collection_formats)
806
807    def list_providers(self, account_id, user_id, **kwargs):
808        """
809        Get the Cloud Storage Provider configuration for the specified user.
810        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.
811        This method makes a synchronous HTTP request by default. To make an
812        asynchronous HTTP request, please define a `callback` function
813        to be invoked when receiving the response.
814        >>> def callback_function(response):
815        >>>     pprint(response)
816        >>>
817        >>> thread = api.list_providers(account_id, user_id, callback=callback_function)
818
819        :param callback function: The callback function
820            for asynchronous request. (optional)
821        :param str account_id: The external account number (int) or account ID Guid. (required)
822        :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)
823        :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.  
824        :return: CloudStorageProviders
825                 If the method is called asynchronously,
826                 returns the request thread.
827        """
828        kwargs['_return_http_data_only'] = True
829        if kwargs.get('callback'):
830            return self.list_providers_with_http_info(account_id, user_id, **kwargs)
831        else:
832            (data) = self.list_providers_with_http_info(account_id, user_id, **kwargs)
833            return data
834
835    def list_providers_with_http_info(self, account_id, user_id, **kwargs):
836        """
837        Get the Cloud Storage Provider configuration for the specified user.
838        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.
839        This method makes a synchronous HTTP request by default. To make an
840        asynchronous HTTP request, please define a `callback` function
841        to be invoked when receiving the response.
842        >>> def callback_function(response):
843        >>>     pprint(response)
844        >>>
845        >>> thread = api.list_providers_with_http_info(account_id, user_id, callback=callback_function)
846
847        :param callback function: The callback function
848            for asynchronous request. (optional)
849        :param str account_id: The external account number (int) or account ID Guid. (required)
850        :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)
851        :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.  
852        :return: CloudStorageProviders
853                 If the method is called asynchronously,
854                 returns the request thread.
855        """
856
857        all_params = ['account_id', 'user_id', 'redirect_url']
858        all_params.append('callback')
859        all_params.append('_return_http_data_only')
860        all_params.append('_preload_content')
861        all_params.append('_request_timeout')
862
863        params = locals()
864        for key, val in iteritems(params['kwargs']):
865            if key not in all_params:
866                raise TypeError(
867                    "Got an unexpected keyword argument '%s'"
868                    " to method list_providers" % key
869                )
870            params[key] = val
871        del params['kwargs']
872        # verify the required parameter 'account_id' is set
873        if ('account_id' not in params) or (params['account_id'] is None):
874            raise ValueError("Missing the required parameter `account_id` when calling `list_providers`")
875        # verify the required parameter 'user_id' is set
876        if ('user_id' not in params) or (params['user_id'] is None):
877            raise ValueError("Missing the required parameter `user_id` when calling `list_providers`")
878
879
880        collection_formats = {}
881
882        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/cloud_storage'.replace('{format}', 'json')
883        path_params = {}
884        if 'account_id' in params:
885            path_params['accountId'] = params['account_id']
886        if 'user_id' in params:
887            path_params['userId'] = params['user_id']
888
889        query_params = {}
890        if 'redirect_url' in params:
891            query_params['redirectUrl'] = params['redirect_url']
892
893        header_params = {}
894
895        form_params = []
896        local_var_files = {}
897
898        body_params = None
899        # HTTP header `Accept`
900        header_params['Accept'] = self.api_client.\
901            select_header_accept(['application/json'])
902
903        # Authentication setting
904        auth_settings = []
905
906        return self.api_client.call_api(resource_path, 'GET',
907                                        path_params,
908                                        query_params,
909                                        header_params,
910                                        body=body_params,
911                                        post_params=form_params,
912                                        files=local_var_files,
913                                        response_type='CloudStorageProviders',
914                                        auth_settings=auth_settings,
915                                        callback=params.get('callback'),
916                                        _return_http_data_only=params.get('_return_http_data_only'),
917                                        _preload_content=params.get('_preload_content', True),
918                                        _request_timeout=params.get('_request_timeout'),
919                                        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 sky_drive_skip_token:
535        :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.  
536        :return: ExternalFolder
537                 If the method is called asynchronously,
538                 returns the request thread.
539        """
540        kwargs['_return_http_data_only'] = True
541        if kwargs.get('callback'):
542            return self.list_with_http_info(account_id, folder_id, service_id, user_id, **kwargs)
543        else:
544            (data) = self.list_with_http_info(account_id, folder_id, service_id, user_id, **kwargs)
545            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 sky_drive_skip_token:
  • 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)
547    def list_with_http_info(self, account_id, folder_id, service_id, user_id, **kwargs):
548        """
549        Gets a list of all the items from the specified cloud storage provider.
550        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.
551        This method makes a synchronous HTTP request by default. To make an
552        asynchronous HTTP request, please define a `callback` function
553        to be invoked when receiving the response.
554        >>> def callback_function(response):
555        >>>     pprint(response)
556        >>>
557        >>> thread = api.list_with_http_info(account_id, folder_id, service_id, user_id, callback=callback_function)
558
559        :param callback function: The callback function
560            for asynchronous request. (optional)
561        :param str account_id: The external account number (int) or account ID Guid. (required)
562        :param str folder_id: The ID of the folder being accessed. (required)
563        :param str service_id: The ID of the service to access.   Valid values are the service name (\"Box\") or the numerical serviceId (\"4136\"). (required)
564        :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)
565        :param str cloud_storage_folder_path:
566        :param str cloud_storage_folderid_plain:
567        :param str count: An optional value that sets how many items are included in the response.   The default setting for this is 25. 
568        :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 
569        :param str order_by: An optional value that sets the file attribute used to sort the item list.   Valid values are:   * modified * name  
570        :param str search_text:
571        :param str sky_drive_skip_token:
572        :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.  
573        :return: ExternalFolder
574                 If the method is called asynchronously,
575                 returns the request thread.
576        """
577
578        all_params = ['account_id', 'folder_id', 'service_id', 'user_id', 'cloud_storage_folder_path', 'cloud_storage_folderid_plain', 'count', 'order', 'order_by', 'search_text', 'sky_drive_skip_token', 'start_position']
579        all_params.append('callback')
580        all_params.append('_return_http_data_only')
581        all_params.append('_preload_content')
582        all_params.append('_request_timeout')
583
584        params = locals()
585        for key, val in iteritems(params['kwargs']):
586            if key not in all_params:
587                raise TypeError(
588                    "Got an unexpected keyword argument '%s'"
589                    " to method list" % key
590                )
591            params[key] = val
592        del params['kwargs']
593        # verify the required parameter 'account_id' is set
594        if ('account_id' not in params) or (params['account_id'] is None):
595            raise ValueError("Missing the required parameter `account_id` when calling `list`")
596        # verify the required parameter 'folder_id' is set
597        if ('folder_id' not in params) or (params['folder_id'] is None):
598            raise ValueError("Missing the required parameter `folder_id` when calling `list`")
599        # verify the required parameter 'service_id' is set
600        if ('service_id' not in params) or (params['service_id'] is None):
601            raise ValueError("Missing the required parameter `service_id` when calling `list`")
602        # verify the required parameter 'user_id' is set
603        if ('user_id' not in params) or (params['user_id'] is None):
604            raise ValueError("Missing the required parameter `user_id` when calling `list`")
605
606
607        collection_formats = {}
608
609        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/cloud_storage/{serviceId}/folders/{folderId}'.replace('{format}', 'json')
610        path_params = {}
611        if 'account_id' in params:
612            path_params['accountId'] = params['account_id']
613        if 'folder_id' in params:
614            path_params['folderId'] = params['folder_id']
615        if 'service_id' in params:
616            path_params['serviceId'] = params['service_id']
617        if 'user_id' in params:
618            path_params['userId'] = params['user_id']
619
620        query_params = {}
621        if 'cloud_storage_folder_path' in params:
622            query_params['cloud_storage_folder_path'] = params['cloud_storage_folder_path']
623        if 'cloud_storage_folderid_plain' in params:
624            query_params['cloud_storage_folderid_plain'] = params['cloud_storage_folderid_plain']
625        if 'count' in params:
626            query_params['count'] = params['count']
627        if 'order' in params:
628            query_params['order'] = params['order']
629        if 'order_by' in params:
630            query_params['order_by'] = params['order_by']
631        if 'search_text' in params:
632            query_params['search_text'] = params['search_text']
633        if 'sky_drive_skip_token' in params:
634            query_params['sky_drive_skip_token'] = params['sky_drive_skip_token']
635        if 'start_position' in params:
636            query_params['start_position'] = params['start_position']
637
638        header_params = {}
639
640        form_params = []
641        local_var_files = {}
642
643        body_params = None
644        # HTTP header `Accept`
645        header_params['Accept'] = self.api_client.\
646            select_header_accept(['application/json'])
647
648        # Authentication setting
649        auth_settings = []
650
651        return self.api_client.call_api(resource_path, 'GET',
652                                        path_params,
653                                        query_params,
654                                        header_params,
655                                        body=body_params,
656                                        post_params=form_params,
657                                        files=local_var_files,
658                                        response_type='ExternalFolder',
659                                        auth_settings=auth_settings,
660                                        callback=params.get('callback'),
661                                        _return_http_data_only=params.get('_return_http_data_only'),
662                                        _preload_content=params.get('_preload_content', True),
663                                        _request_timeout=params.get('_request_timeout'),
664                                        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 sky_drive_skip_token:
  • 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)
666    def list_folders(self, account_id, service_id, user_id, **kwargs):
667        """
668        Retrieves a list of all the items in a specified folder from the specified cloud storage provider.
669        Retrieves a list of all the items in a specified folder from the specified cloud storage provider. 
670        This method makes a synchronous HTTP request by default. To make an
671        asynchronous HTTP request, please define a `callback` function
672        to be invoked when receiving the response.
673        >>> def callback_function(response):
674        >>>     pprint(response)
675        >>>
676        >>> thread = api.list_folders(account_id, service_id, user_id, callback=callback_function)
677
678        :param callback function: The callback function
679            for asynchronous request. (optional)
680        :param str account_id: The external account number (int) or account ID Guid. (required)
681        :param str service_id: The ID of the service to access.   Valid values are the service name (\"Box\") or the numerical serviceId (\"4136\"). (required)
682        :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)
683        :param str cloud_storage_folder_path: A comma separated list of folder IDs included in the request. 
684        :param str count: An optional value that sets how many items are included in the response.   The default setting for this is 25. 
685        :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 
686        :param str order_by: An optional value that sets the file attribute used to sort the item list.   Valid values are:   * modified * name  
687        :param str search_text:
688        :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.  
689        :return: ExternalFolder
690                 If the method is called asynchronously,
691                 returns the request thread.
692        """
693        kwargs['_return_http_data_only'] = True
694        if kwargs.get('callback'):
695            return self.list_folders_with_http_info(account_id, service_id, user_id, **kwargs)
696        else:
697            (data) = self.list_folders_with_http_info(account_id, service_id, user_id, **kwargs)
698            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)
700    def list_folders_with_http_info(self, account_id, service_id, user_id, **kwargs):
701        """
702        Retrieves a list of all the items in a specified folder from the specified cloud storage provider.
703        Retrieves a list of all the items in a specified folder from the specified cloud storage provider. 
704        This method makes a synchronous HTTP request by default. To make an
705        asynchronous HTTP request, please define a `callback` function
706        to be invoked when receiving the response.
707        >>> def callback_function(response):
708        >>>     pprint(response)
709        >>>
710        >>> thread = api.list_folders_with_http_info(account_id, service_id, user_id, callback=callback_function)
711
712        :param callback function: The callback function
713            for asynchronous request. (optional)
714        :param str account_id: The external account number (int) or account ID Guid. (required)
715        :param str service_id: The ID of the service to access.   Valid values are the service name (\"Box\") or the numerical serviceId (\"4136\"). (required)
716        :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)
717        :param str cloud_storage_folder_path: A comma separated list of folder IDs included in the request. 
718        :param str count: An optional value that sets how many items are included in the response.   The default setting for this is 25. 
719        :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 
720        :param str order_by: An optional value that sets the file attribute used to sort the item list.   Valid values are:   * modified * name  
721        :param str search_text:
722        :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.  
723        :return: ExternalFolder
724                 If the method is called asynchronously,
725                 returns the request thread.
726        """
727
728        all_params = ['account_id', 'service_id', 'user_id', 'cloud_storage_folder_path', 'count', 'order', 'order_by', 'search_text', 'start_position']
729        all_params.append('callback')
730        all_params.append('_return_http_data_only')
731        all_params.append('_preload_content')
732        all_params.append('_request_timeout')
733
734        params = locals()
735        for key, val in iteritems(params['kwargs']):
736            if key not in all_params:
737                raise TypeError(
738                    "Got an unexpected keyword argument '%s'"
739                    " to method list_folders" % key
740                )
741            params[key] = val
742        del params['kwargs']
743        # verify the required parameter 'account_id' is set
744        if ('account_id' not in params) or (params['account_id'] is None):
745            raise ValueError("Missing the required parameter `account_id` when calling `list_folders`")
746        # verify the required parameter 'service_id' is set
747        if ('service_id' not in params) or (params['service_id'] is None):
748            raise ValueError("Missing the required parameter `service_id` when calling `list_folders`")
749        # verify the required parameter 'user_id' is set
750        if ('user_id' not in params) or (params['user_id'] is None):
751            raise ValueError("Missing the required parameter `user_id` when calling `list_folders`")
752
753
754        collection_formats = {}
755
756        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/cloud_storage/{serviceId}/folders'.replace('{format}', 'json')
757        path_params = {}
758        if 'account_id' in params:
759            path_params['accountId'] = params['account_id']
760        if 'service_id' in params:
761            path_params['serviceId'] = params['service_id']
762        if 'user_id' in params:
763            path_params['userId'] = params['user_id']
764
765        query_params = {}
766        if 'cloud_storage_folder_path' in params:
767            query_params['cloud_storage_folder_path'] = params['cloud_storage_folder_path']
768        if 'count' in params:
769            query_params['count'] = params['count']
770        if 'order' in params:
771            query_params['order'] = params['order']
772        if 'order_by' in params:
773            query_params['order_by'] = params['order_by']
774        if 'search_text' in params:
775            query_params['search_text'] = params['search_text']
776        if 'start_position' in params:
777            query_params['start_position'] = params['start_position']
778
779        header_params = {}
780
781        form_params = []
782        local_var_files = {}
783
784        body_params = None
785        # HTTP header `Accept`
786        header_params['Accept'] = self.api_client.\
787            select_header_accept(['application/json'])
788
789        # Authentication setting
790        auth_settings = []
791
792        return self.api_client.call_api(resource_path, 'GET',
793                                        path_params,
794                                        query_params,
795                                        header_params,
796                                        body=body_params,
797                                        post_params=form_params,
798                                        files=local_var_files,
799                                        response_type='ExternalFolder',
800                                        auth_settings=auth_settings,
801                                        callback=params.get('callback'),
802                                        _return_http_data_only=params.get('_return_http_data_only'),
803                                        _preload_content=params.get('_preload_content', True),
804                                        _request_timeout=params.get('_request_timeout'),
805                                        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)
807    def list_providers(self, account_id, user_id, **kwargs):
808        """
809        Get the Cloud Storage Provider configuration for the specified user.
810        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.
811        This method makes a synchronous HTTP request by default. To make an
812        asynchronous HTTP request, please define a `callback` function
813        to be invoked when receiving the response.
814        >>> def callback_function(response):
815        >>>     pprint(response)
816        >>>
817        >>> thread = api.list_providers(account_id, user_id, callback=callback_function)
818
819        :param callback function: The callback function
820            for asynchronous request. (optional)
821        :param str account_id: The external account number (int) or account ID Guid. (required)
822        :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)
823        :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.  
824        :return: CloudStorageProviders
825                 If the method is called asynchronously,
826                 returns the request thread.
827        """
828        kwargs['_return_http_data_only'] = True
829        if kwargs.get('callback'):
830            return self.list_providers_with_http_info(account_id, user_id, **kwargs)
831        else:
832            (data) = self.list_providers_with_http_info(account_id, user_id, **kwargs)
833            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)
835    def list_providers_with_http_info(self, account_id, user_id, **kwargs):
836        """
837        Get the Cloud Storage Provider configuration for the specified user.
838        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.
839        This method makes a synchronous HTTP request by default. To make an
840        asynchronous HTTP request, please define a `callback` function
841        to be invoked when receiving the response.
842        >>> def callback_function(response):
843        >>>     pprint(response)
844        >>>
845        >>> thread = api.list_providers_with_http_info(account_id, user_id, callback=callback_function)
846
847        :param callback function: The callback function
848            for asynchronous request. (optional)
849        :param str account_id: The external account number (int) or account ID Guid. (required)
850        :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)
851        :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.  
852        :return: CloudStorageProviders
853                 If the method is called asynchronously,
854                 returns the request thread.
855        """
856
857        all_params = ['account_id', 'user_id', 'redirect_url']
858        all_params.append('callback')
859        all_params.append('_return_http_data_only')
860        all_params.append('_preload_content')
861        all_params.append('_request_timeout')
862
863        params = locals()
864        for key, val in iteritems(params['kwargs']):
865            if key not in all_params:
866                raise TypeError(
867                    "Got an unexpected keyword argument '%s'"
868                    " to method list_providers" % key
869                )
870            params[key] = val
871        del params['kwargs']
872        # verify the required parameter 'account_id' is set
873        if ('account_id' not in params) or (params['account_id'] is None):
874            raise ValueError("Missing the required parameter `account_id` when calling `list_providers`")
875        # verify the required parameter 'user_id' is set
876        if ('user_id' not in params) or (params['user_id'] is None):
877            raise ValueError("Missing the required parameter `user_id` when calling `list_providers`")
878
879
880        collection_formats = {}
881
882        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/cloud_storage'.replace('{format}', 'json')
883        path_params = {}
884        if 'account_id' in params:
885            path_params['accountId'] = params['account_id']
886        if 'user_id' in params:
887            path_params['userId'] = params['user_id']
888
889        query_params = {}
890        if 'redirect_url' in params:
891            query_params['redirectUrl'] = params['redirect_url']
892
893        header_params = {}
894
895        form_params = []
896        local_var_files = {}
897
898        body_params = None
899        # HTTP header `Accept`
900        header_params['Accept'] = self.api_client.\
901            select_header_accept(['application/json'])
902
903        # Authentication setting
904        auth_settings = []
905
906        return self.api_client.call_api(resource_path, 'GET',
907                                        path_params,
908                                        query_params,
909                                        header_params,
910                                        body=body_params,
911                                        post_params=form_params,
912                                        files=local_var_files,
913                                        response_type='CloudStorageProviders',
914                                        auth_settings=auth_settings,
915                                        callback=params.get('callback'),
916                                        _return_http_data_only=params.get('_return_http_data_only'),
917                                        _preload_content=params.get('_preload_content', True),
918                                        _request_timeout=params.get('_request_timeout'),
919                                        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.