docusign_esign.apis.diagnostics_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 DiagnosticsApi(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 delete_request_logs(self, **kwargs):
 44        """
 45        Deletes the request log files.
 46        Deletes the request log files.
 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.delete_request_logs(callback=callback_function)
 54
 55        :param callback function: The callback function
 56            for asynchronous request. (optional)
 57        :return: None
 58                 If the method is called asynchronously,
 59                 returns the request thread.
 60        """
 61        kwargs['_return_http_data_only'] = True
 62        if kwargs.get('callback'):
 63            return self.delete_request_logs_with_http_info(**kwargs)
 64        else:
 65            (data) = self.delete_request_logs_with_http_info(**kwargs)
 66            return data
 67
 68    def delete_request_logs_with_http_info(self, **kwargs):
 69        """
 70        Deletes the request log files.
 71        Deletes the request log files.
 72        This method makes a synchronous HTTP request by default. To make an
 73        asynchronous HTTP request, please define a `callback` function
 74        to be invoked when receiving the response.
 75        >>> def callback_function(response):
 76        >>>     pprint(response)
 77        >>>
 78        >>> thread = api.delete_request_logs_with_http_info(callback=callback_function)
 79
 80        :param callback function: The callback function
 81            for asynchronous request. (optional)
 82        :return: None
 83                 If the method is called asynchronously,
 84                 returns the request thread.
 85        """
 86
 87        all_params = []
 88        all_params.append('callback')
 89        all_params.append('_return_http_data_only')
 90        all_params.append('_preload_content')
 91        all_params.append('_request_timeout')
 92
 93        params = locals()
 94        for key, val in iteritems(params['kwargs']):
 95            if key not in all_params:
 96                raise TypeError(
 97                    "Got an unexpected keyword argument '%s'"
 98                    " to method delete_request_logs" % key
 99                )
100            params[key] = val
101        del params['kwargs']
102
103        collection_formats = {}
104
105        resource_path = '/v2.1/diagnostics/request_logs'.replace('{format}', 'json')
106        path_params = {}
107
108        query_params = {}
109
110        header_params = {}
111
112        form_params = []
113        local_var_files = {}
114
115        body_params = None
116        # HTTP header `Accept`
117        header_params['Accept'] = self.api_client.\
118            select_header_accept(['application/json'])
119
120        # Authentication setting
121        auth_settings = []
122
123        return self.api_client.call_api(resource_path, 'DELETE',
124                                        path_params,
125                                        query_params,
126                                        header_params,
127                                        body=body_params,
128                                        post_params=form_params,
129                                        files=local_var_files,
130                                        response_type=None,
131                                        auth_settings=auth_settings,
132                                        callback=params.get('callback'),
133                                        _return_http_data_only=params.get('_return_http_data_only'),
134                                        _preload_content=params.get('_preload_content', True),
135                                        _request_timeout=params.get('_request_timeout'),
136                                        collection_formats=collection_formats)
137
138    def get_request_log(self, request_log_id, **kwargs):
139        """
140        Gets a request logging log file.
141        Retrieves information for a single log entry.  **Request** The `requestLogfId` property can be retrieved by getting the list of log entries. The Content-Transfer-Encoding header can be set to base64 to retrieve the API request/response as base 64 string. Otherwise the bytes of the request/response are returned.  **Response** If the Content-Transfer-Encoding header was set to base64, the log is returned as a base64 string.
142        This method makes a synchronous HTTP request by default. To make an
143        asynchronous HTTP request, please define a `callback` function
144        to be invoked when receiving the response.
145        >>> def callback_function(response):
146        >>>     pprint(response)
147        >>>
148        >>> thread = api.get_request_log(request_log_id, callback=callback_function)
149
150        :param callback function: The callback function
151            for asynchronous request. (optional)
152        :param str request_log_id: (required)
153        :return: file
154                 If the method is called asynchronously,
155                 returns the request thread.
156        """
157        kwargs['_return_http_data_only'] = True
158        if kwargs.get('callback'):
159            return self.get_request_log_with_http_info(request_log_id, **kwargs)
160        else:
161            (data) = self.get_request_log_with_http_info(request_log_id, **kwargs)
162            return data
163
164    def get_request_log_with_http_info(self, request_log_id, **kwargs):
165        """
166        Gets a request logging log file.
167        Retrieves information for a single log entry.  **Request** The `requestLogfId` property can be retrieved by getting the list of log entries. The Content-Transfer-Encoding header can be set to base64 to retrieve the API request/response as base 64 string. Otherwise the bytes of the request/response are returned.  **Response** If the Content-Transfer-Encoding header was set to base64, the log is returned as a base64 string.
168        This method makes a synchronous HTTP request by default. To make an
169        asynchronous HTTP request, please define a `callback` function
170        to be invoked when receiving the response.
171        >>> def callback_function(response):
172        >>>     pprint(response)
173        >>>
174        >>> thread = api.get_request_log_with_http_info(request_log_id, callback=callback_function)
175
176        :param callback function: The callback function
177            for asynchronous request. (optional)
178        :param str request_log_id: (required)
179        :return: file
180                 If the method is called asynchronously,
181                 returns the request thread.
182        """
183
184        all_params = ['request_log_id']
185        all_params.append('callback')
186        all_params.append('_return_http_data_only')
187        all_params.append('_preload_content')
188        all_params.append('_request_timeout')
189
190        params = locals()
191        for key, val in iteritems(params['kwargs']):
192            if key not in all_params:
193                raise TypeError(
194                    "Got an unexpected keyword argument '%s'"
195                    " to method get_request_log" % key
196                )
197            params[key] = val
198        del params['kwargs']
199        # verify the required parameter 'request_log_id' is set
200        if ('request_log_id' not in params) or (params['request_log_id'] is None):
201            raise ValueError("Missing the required parameter `request_log_id` when calling `get_request_log`")
202
203
204        collection_formats = {}
205
206        resource_path = '/v2.1/diagnostics/request_logs/{requestLogId}'.replace('{format}', 'json')
207        path_params = {}
208        if 'request_log_id' in params:
209            path_params['requestLogId'] = params['request_log_id']
210
211        query_params = {}
212
213        header_params = {}
214
215        form_params = []
216        local_var_files = {}
217
218        body_params = None
219        # HTTP header `Accept`
220        header_params['Accept'] = self.api_client.\
221            select_header_accept(['text/plain'])
222
223        # Authentication setting
224        auth_settings = []
225
226        return self.api_client.call_api(resource_path, 'GET',
227                                        path_params,
228                                        query_params,
229                                        header_params,
230                                        body=body_params,
231                                        post_params=form_params,
232                                        files=local_var_files,
233                                        response_type='file',
234                                        auth_settings=auth_settings,
235                                        callback=params.get('callback'),
236                                        _return_http_data_only=params.get('_return_http_data_only'),
237                                        _preload_content=params.get('_preload_content', True),
238                                        _request_timeout=params.get('_request_timeout'),
239                                        collection_formats=collection_formats)
240
241    def get_request_log_settings(self, **kwargs):
242        """
243        Gets the API request logging settings.
244        Retrieves the current API request logging setting for the user and remaining log entries.  **Response** The response includes the current API request logging setting for the user, along with the maximum log entries and remaining log entries.
245        This method makes a synchronous HTTP request by default. To make an
246        asynchronous HTTP request, please define a `callback` function
247        to be invoked when receiving the response.
248        >>> def callback_function(response):
249        >>>     pprint(response)
250        >>>
251        >>> thread = api.get_request_log_settings(callback=callback_function)
252
253        :param callback function: The callback function
254            for asynchronous request. (optional)
255        :return: DiagnosticsSettingsInformation
256                 If the method is called asynchronously,
257                 returns the request thread.
258        """
259        kwargs['_return_http_data_only'] = True
260        if kwargs.get('callback'):
261            return self.get_request_log_settings_with_http_info(**kwargs)
262        else:
263            (data) = self.get_request_log_settings_with_http_info(**kwargs)
264            return data
265
266    def get_request_log_settings_with_http_info(self, **kwargs):
267        """
268        Gets the API request logging settings.
269        Retrieves the current API request logging setting for the user and remaining log entries.  **Response** The response includes the current API request logging setting for the user, along with the maximum log entries and remaining log entries.
270        This method makes a synchronous HTTP request by default. To make an
271        asynchronous HTTP request, please define a `callback` function
272        to be invoked when receiving the response.
273        >>> def callback_function(response):
274        >>>     pprint(response)
275        >>>
276        >>> thread = api.get_request_log_settings_with_http_info(callback=callback_function)
277
278        :param callback function: The callback function
279            for asynchronous request. (optional)
280        :return: DiagnosticsSettingsInformation
281                 If the method is called asynchronously,
282                 returns the request thread.
283        """
284
285        all_params = []
286        all_params.append('callback')
287        all_params.append('_return_http_data_only')
288        all_params.append('_preload_content')
289        all_params.append('_request_timeout')
290
291        params = locals()
292        for key, val in iteritems(params['kwargs']):
293            if key not in all_params:
294                raise TypeError(
295                    "Got an unexpected keyword argument '%s'"
296                    " to method get_request_log_settings" % key
297                )
298            params[key] = val
299        del params['kwargs']
300
301        collection_formats = {}
302
303        resource_path = '/v2.1/diagnostics/settings'.replace('{format}', 'json')
304        path_params = {}
305
306        query_params = {}
307
308        header_params = {}
309
310        form_params = []
311        local_var_files = {}
312
313        body_params = None
314        # HTTP header `Accept`
315        header_params['Accept'] = self.api_client.\
316            select_header_accept(['application/json'])
317
318        # Authentication setting
319        auth_settings = []
320
321        return self.api_client.call_api(resource_path, 'GET',
322                                        path_params,
323                                        query_params,
324                                        header_params,
325                                        body=body_params,
326                                        post_params=form_params,
327                                        files=local_var_files,
328                                        response_type='DiagnosticsSettingsInformation',
329                                        auth_settings=auth_settings,
330                                        callback=params.get('callback'),
331                                        _return_http_data_only=params.get('_return_http_data_only'),
332                                        _preload_content=params.get('_preload_content', True),
333                                        _request_timeout=params.get('_request_timeout'),
334                                        collection_formats=collection_formats)
335
336    def get_resources(self, **kwargs):
337        """
338        Lists resources for REST version specified
339        Retrieves the base resources available for the DocuSign REST APIs.  You do not need an integrator key to view the REST API versions and resources.  Example: https://demo.docusign.net/restapi/v2 lists all of the base resources available in version 2 of the REST API on the DocuSign Demo system.  To view descriptions and samples of the service operations for all versions, remove the version number and add /help to the URL.  Example: https://demo.docusign.net/restapi/help lists the REST API operations on the DocuSign Demo system with XML and JSON request and response samples.
340        This method makes a synchronous HTTP request by default. To make an
341        asynchronous HTTP request, please define a `callback` function
342        to be invoked when receiving the response.
343        >>> def callback_function(response):
344        >>>     pprint(response)
345        >>>
346        >>> thread = api.get_resources(callback=callback_function)
347
348        :param callback function: The callback function
349            for asynchronous request. (optional)
350        :return: ResourceInformation
351                 If the method is called asynchronously,
352                 returns the request thread.
353        """
354        kwargs['_return_http_data_only'] = True
355        if kwargs.get('callback'):
356            return self.get_resources_with_http_info(**kwargs)
357        else:
358            (data) = self.get_resources_with_http_info(**kwargs)
359            return data
360
361    def get_resources_with_http_info(self, **kwargs):
362        """
363        Lists resources for REST version specified
364        Retrieves the base resources available for the DocuSign REST APIs.  You do not need an integrator key to view the REST API versions and resources.  Example: https://demo.docusign.net/restapi/v2 lists all of the base resources available in version 2 of the REST API on the DocuSign Demo system.  To view descriptions and samples of the service operations for all versions, remove the version number and add /help to the URL.  Example: https://demo.docusign.net/restapi/help lists the REST API operations on the DocuSign Demo system with XML and JSON request and response samples.
365        This method makes a synchronous HTTP request by default. To make an
366        asynchronous HTTP request, please define a `callback` function
367        to be invoked when receiving the response.
368        >>> def callback_function(response):
369        >>>     pprint(response)
370        >>>
371        >>> thread = api.get_resources_with_http_info(callback=callback_function)
372
373        :param callback function: The callback function
374            for asynchronous request. (optional)
375        :return: ResourceInformation
376                 If the method is called asynchronously,
377                 returns the request thread.
378        """
379
380        all_params = []
381        all_params.append('callback')
382        all_params.append('_return_http_data_only')
383        all_params.append('_preload_content')
384        all_params.append('_request_timeout')
385
386        params = locals()
387        for key, val in iteritems(params['kwargs']):
388            if key not in all_params:
389                raise TypeError(
390                    "Got an unexpected keyword argument '%s'"
391                    " to method get_resources" % key
392                )
393            params[key] = val
394        del params['kwargs']
395
396        collection_formats = {}
397
398        resource_path = '/v2.1'.replace('{format}', 'json')
399        path_params = {}
400
401        query_params = {}
402
403        header_params = {}
404
405        form_params = []
406        local_var_files = {}
407
408        body_params = None
409        # HTTP header `Accept`
410        header_params['Accept'] = self.api_client.\
411            select_header_accept(['application/json'])
412
413        # Authentication setting
414        auth_settings = []
415
416        return self.api_client.call_api(resource_path, 'GET',
417                                        path_params,
418                                        query_params,
419                                        header_params,
420                                        body=body_params,
421                                        post_params=form_params,
422                                        files=local_var_files,
423                                        response_type='ResourceInformation',
424                                        auth_settings=auth_settings,
425                                        callback=params.get('callback'),
426                                        _return_http_data_only=params.get('_return_http_data_only'),
427                                        _preload_content=params.get('_preload_content', True),
428                                        _request_timeout=params.get('_request_timeout'),
429                                        collection_formats=collection_formats)
430
431    def get_service(self, **kwargs):
432        """
433        Retrieves the available REST API versions.
434        Retrieves the available REST API versions.  DocuSign Production system: https://www.docusign.net/restapi/service_information DocuSign Demo system: https://demo.docusign.net/restapi/service_information  You do not need an integrator key to view the REST API versions and resources.
435        This method makes a synchronous HTTP request by default. To make an
436        asynchronous HTTP request, please define a `callback` function
437        to be invoked when receiving the response.
438        >>> def callback_function(response):
439        >>>     pprint(response)
440        >>>
441        >>> thread = api.get_service(callback=callback_function)
442
443        :param callback function: The callback function
444            for asynchronous request. (optional)
445        :return: ServiceInformation
446                 If the method is called asynchronously,
447                 returns the request thread.
448        """
449        kwargs['_return_http_data_only'] = True
450        if kwargs.get('callback'):
451            return self.get_service_with_http_info(**kwargs)
452        else:
453            (data) = self.get_service_with_http_info(**kwargs)
454            return data
455
456    def get_service_with_http_info(self, **kwargs):
457        """
458        Retrieves the available REST API versions.
459        Retrieves the available REST API versions.  DocuSign Production system: https://www.docusign.net/restapi/service_information DocuSign Demo system: https://demo.docusign.net/restapi/service_information  You do not need an integrator key to view the REST API versions and resources.
460        This method makes a synchronous HTTP request by default. To make an
461        asynchronous HTTP request, please define a `callback` function
462        to be invoked when receiving the response.
463        >>> def callback_function(response):
464        >>>     pprint(response)
465        >>>
466        >>> thread = api.get_service_with_http_info(callback=callback_function)
467
468        :param callback function: The callback function
469            for asynchronous request. (optional)
470        :return: ServiceInformation
471                 If the method is called asynchronously,
472                 returns the request thread.
473        """
474
475        all_params = []
476        all_params.append('callback')
477        all_params.append('_return_http_data_only')
478        all_params.append('_preload_content')
479        all_params.append('_request_timeout')
480
481        params = locals()
482        for key, val in iteritems(params['kwargs']):
483            if key not in all_params:
484                raise TypeError(
485                    "Got an unexpected keyword argument '%s'"
486                    " to method get_service" % key
487                )
488            params[key] = val
489        del params['kwargs']
490
491        collection_formats = {}
492
493        resource_path = '/service_information'.replace('{format}', 'json')
494        path_params = {}
495
496        query_params = {}
497
498        header_params = {}
499
500        form_params = []
501        local_var_files = {}
502
503        body_params = None
504        # HTTP header `Accept`
505        header_params['Accept'] = self.api_client.\
506            select_header_accept(['application/json'])
507
508        # Authentication setting
509        auth_settings = []
510
511        return self.api_client.call_api(resource_path, 'GET',
512                                        path_params,
513                                        query_params,
514                                        header_params,
515                                        body=body_params,
516                                        post_params=form_params,
517                                        files=local_var_files,
518                                        response_type='ServiceInformation',
519                                        auth_settings=auth_settings,
520                                        callback=params.get('callback'),
521                                        _return_http_data_only=params.get('_return_http_data_only'),
522                                        _preload_content=params.get('_preload_content', True),
523                                        _request_timeout=params.get('_request_timeout'),
524                                        collection_formats=collection_formats)
525
526    def list_request_logs(self, **kwargs):
527        """
528        Gets the API request logging log files.
529        Retrieves a list of log entries as a JSON or xml object or as a zip file containing the entries.  If the Accept header is set to application/zip, the response is a zip file containing individual text files, each representing an API request.  If the Accept header is set to `application/json` or `application/xml`, the response returns list of log entries in either JSON or XML. An example JSON response body is shown below. 
530        This method makes a synchronous HTTP request by default. To make an
531        asynchronous HTTP request, please define a `callback` function
532        to be invoked when receiving the response.
533        >>> def callback_function(response):
534        >>>     pprint(response)
535        >>>
536        >>> thread = api.list_request_logs(callback=callback_function)
537
538        :param callback function: The callback function
539            for asynchronous request. (optional)
540        :param str encoding:
541        :return: ApiRequestLogsResult
542                 If the method is called asynchronously,
543                 returns the request thread.
544        """
545        kwargs['_return_http_data_only'] = True
546        if kwargs.get('callback'):
547            return self.list_request_logs_with_http_info(**kwargs)
548        else:
549            (data) = self.list_request_logs_with_http_info(**kwargs)
550            return data
551
552    def list_request_logs_with_http_info(self, **kwargs):
553        """
554        Gets the API request logging log files.
555        Retrieves a list of log entries as a JSON or xml object or as a zip file containing the entries.  If the Accept header is set to application/zip, the response is a zip file containing individual text files, each representing an API request.  If the Accept header is set to `application/json` or `application/xml`, the response returns list of log entries in either JSON or XML. An example JSON response body is shown below. 
556        This method makes a synchronous HTTP request by default. To make an
557        asynchronous HTTP request, please define a `callback` function
558        to be invoked when receiving the response.
559        >>> def callback_function(response):
560        >>>     pprint(response)
561        >>>
562        >>> thread = api.list_request_logs_with_http_info(callback=callback_function)
563
564        :param callback function: The callback function
565            for asynchronous request. (optional)
566        :param str encoding:
567        :return: ApiRequestLogsResult
568                 If the method is called asynchronously,
569                 returns the request thread.
570        """
571
572        all_params = ['encoding']
573        all_params.append('callback')
574        all_params.append('_return_http_data_only')
575        all_params.append('_preload_content')
576        all_params.append('_request_timeout')
577
578        params = locals()
579        for key, val in iteritems(params['kwargs']):
580            if key not in all_params:
581                raise TypeError(
582                    "Got an unexpected keyword argument '%s'"
583                    " to method list_request_logs" % key
584                )
585            params[key] = val
586        del params['kwargs']
587
588
589        collection_formats = {}
590
591        resource_path = '/v2.1/diagnostics/request_logs'.replace('{format}', 'json')
592        path_params = {}
593
594        query_params = {}
595        if 'encoding' in params:
596            query_params['encoding'] = params['encoding']
597
598        header_params = {}
599
600        form_params = []
601        local_var_files = {}
602
603        body_params = None
604        # HTTP header `Accept`
605        header_params['Accept'] = self.api_client.\
606            select_header_accept(['application/json'])
607
608        # Authentication setting
609        auth_settings = []
610
611        return self.api_client.call_api(resource_path, 'GET',
612                                        path_params,
613                                        query_params,
614                                        header_params,
615                                        body=body_params,
616                                        post_params=form_params,
617                                        files=local_var_files,
618                                        response_type='ApiRequestLogsResult',
619                                        auth_settings=auth_settings,
620                                        callback=params.get('callback'),
621                                        _return_http_data_only=params.get('_return_http_data_only'),
622                                        _preload_content=params.get('_preload_content', True),
623                                        _request_timeout=params.get('_request_timeout'),
624                                        collection_formats=collection_formats)
625
626    def update_request_log_settings(self, **kwargs):
627        """
628        Enables or disables API request logging for troubleshooting.
629        Enables or disables API request logging for troubleshooting.  When enabled (`apiRequestLogging` is set to true), REST API requests and responses for the user are added to a log. A log can have up to 50 requests/responses and the current number of log entries can be determined by getting the settings. Logging is automatically disabled when the log limit of 50 is reached.  You can call [ML:GetRequestLog] or [ML:GetRequestLogs] to download the log files (individually or as a zip file). Call [ML:DeleteRequestLogs] to clear the log by deleting current entries.  Private information, such as passwords and integrator key information, which is normally located in the call header is omitted from the request/response log.  ###### Note: API request logging only captures requests from the authenticated user. Any call that does not authenticate the user and resolve a userId isn't logged. Meaning that login_information, NewAccounts, or other distributor-credential calls are not logged. 
630        This method makes a synchronous HTTP request by default. To make an
631        asynchronous HTTP request, please define a `callback` function
632        to be invoked when receiving the response.
633        >>> def callback_function(response):
634        >>>     pprint(response)
635        >>>
636        >>> thread = api.update_request_log_settings(callback=callback_function)
637
638        :param callback function: The callback function
639            for asynchronous request. (optional)
640        :param DiagnosticsSettingsInformation diagnostics_settings_information:
641        :return: DiagnosticsSettingsInformation
642                 If the method is called asynchronously,
643                 returns the request thread.
644        """
645        kwargs['_return_http_data_only'] = True
646        if kwargs.get('callback'):
647            return self.update_request_log_settings_with_http_info(**kwargs)
648        else:
649            (data) = self.update_request_log_settings_with_http_info(**kwargs)
650            return data
651
652    def update_request_log_settings_with_http_info(self, **kwargs):
653        """
654        Enables or disables API request logging for troubleshooting.
655        Enables or disables API request logging for troubleshooting.  When enabled (`apiRequestLogging` is set to true), REST API requests and responses for the user are added to a log. A log can have up to 50 requests/responses and the current number of log entries can be determined by getting the settings. Logging is automatically disabled when the log limit of 50 is reached.  You can call [ML:GetRequestLog] or [ML:GetRequestLogs] to download the log files (individually or as a zip file). Call [ML:DeleteRequestLogs] to clear the log by deleting current entries.  Private information, such as passwords and integrator key information, which is normally located in the call header is omitted from the request/response log.  ###### Note: API request logging only captures requests from the authenticated user. Any call that does not authenticate the user and resolve a userId isn't logged. Meaning that login_information, NewAccounts, or other distributor-credential calls are not logged. 
656        This method makes a synchronous HTTP request by default. To make an
657        asynchronous HTTP request, please define a `callback` function
658        to be invoked when receiving the response.
659        >>> def callback_function(response):
660        >>>     pprint(response)
661        >>>
662        >>> thread = api.update_request_log_settings_with_http_info(callback=callback_function)
663
664        :param callback function: The callback function
665            for asynchronous request. (optional)
666        :param DiagnosticsSettingsInformation diagnostics_settings_information:
667        :return: DiagnosticsSettingsInformation
668                 If the method is called asynchronously,
669                 returns the request thread.
670        """
671
672        all_params = ['diagnostics_settings_information']
673        all_params.append('callback')
674        all_params.append('_return_http_data_only')
675        all_params.append('_preload_content')
676        all_params.append('_request_timeout')
677
678        params = locals()
679        for key, val in iteritems(params['kwargs']):
680            if key not in all_params:
681                raise TypeError(
682                    "Got an unexpected keyword argument '%s'"
683                    " to method update_request_log_settings" % key
684                )
685            params[key] = val
686        del params['kwargs']
687
688
689        collection_formats = {}
690
691        resource_path = '/v2.1/diagnostics/settings'.replace('{format}', 'json')
692        path_params = {}
693
694        query_params = {}
695
696        header_params = {}
697
698        form_params = []
699        local_var_files = {}
700
701        body_params = None
702        if 'diagnostics_settings_information' in params:
703            body_params = params['diagnostics_settings_information']
704        # HTTP header `Accept`
705        header_params['Accept'] = self.api_client.\
706            select_header_accept(['application/json'])
707
708        # Authentication setting
709        auth_settings = []
710
711        return self.api_client.call_api(resource_path, 'PUT',
712                                        path_params,
713                                        query_params,
714                                        header_params,
715                                        body=body_params,
716                                        post_params=form_params,
717                                        files=local_var_files,
718                                        response_type='DiagnosticsSettingsInformation',
719                                        auth_settings=auth_settings,
720                                        callback=params.get('callback'),
721                                        _return_http_data_only=params.get('_return_http_data_only'),
722                                        _preload_content=params.get('_preload_content', True),
723                                        _request_timeout=params.get('_request_timeout'),
724                                        collection_formats=collection_formats)
class DiagnosticsApi:
 28class DiagnosticsApi(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 delete_request_logs(self, **kwargs):
 45        """
 46        Deletes the request log files.
 47        Deletes the request log files.
 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.delete_request_logs(callback=callback_function)
 55
 56        :param callback function: The callback function
 57            for asynchronous request. (optional)
 58        :return: None
 59                 If the method is called asynchronously,
 60                 returns the request thread.
 61        """
 62        kwargs['_return_http_data_only'] = True
 63        if kwargs.get('callback'):
 64            return self.delete_request_logs_with_http_info(**kwargs)
 65        else:
 66            (data) = self.delete_request_logs_with_http_info(**kwargs)
 67            return data
 68
 69    def delete_request_logs_with_http_info(self, **kwargs):
 70        """
 71        Deletes the request log files.
 72        Deletes the request log files.
 73        This method makes a synchronous HTTP request by default. To make an
 74        asynchronous HTTP request, please define a `callback` function
 75        to be invoked when receiving the response.
 76        >>> def callback_function(response):
 77        >>>     pprint(response)
 78        >>>
 79        >>> thread = api.delete_request_logs_with_http_info(callback=callback_function)
 80
 81        :param callback function: The callback function
 82            for asynchronous request. (optional)
 83        :return: None
 84                 If the method is called asynchronously,
 85                 returns the request thread.
 86        """
 87
 88        all_params = []
 89        all_params.append('callback')
 90        all_params.append('_return_http_data_only')
 91        all_params.append('_preload_content')
 92        all_params.append('_request_timeout')
 93
 94        params = locals()
 95        for key, val in iteritems(params['kwargs']):
 96            if key not in all_params:
 97                raise TypeError(
 98                    "Got an unexpected keyword argument '%s'"
 99                    " to method delete_request_logs" % key
100                )
101            params[key] = val
102        del params['kwargs']
103
104        collection_formats = {}
105
106        resource_path = '/v2.1/diagnostics/request_logs'.replace('{format}', 'json')
107        path_params = {}
108
109        query_params = {}
110
111        header_params = {}
112
113        form_params = []
114        local_var_files = {}
115
116        body_params = None
117        # HTTP header `Accept`
118        header_params['Accept'] = self.api_client.\
119            select_header_accept(['application/json'])
120
121        # Authentication setting
122        auth_settings = []
123
124        return self.api_client.call_api(resource_path, 'DELETE',
125                                        path_params,
126                                        query_params,
127                                        header_params,
128                                        body=body_params,
129                                        post_params=form_params,
130                                        files=local_var_files,
131                                        response_type=None,
132                                        auth_settings=auth_settings,
133                                        callback=params.get('callback'),
134                                        _return_http_data_only=params.get('_return_http_data_only'),
135                                        _preload_content=params.get('_preload_content', True),
136                                        _request_timeout=params.get('_request_timeout'),
137                                        collection_formats=collection_formats)
138
139    def get_request_log(self, request_log_id, **kwargs):
140        """
141        Gets a request logging log file.
142        Retrieves information for a single log entry.  **Request** The `requestLogfId` property can be retrieved by getting the list of log entries. The Content-Transfer-Encoding header can be set to base64 to retrieve the API request/response as base 64 string. Otherwise the bytes of the request/response are returned.  **Response** If the Content-Transfer-Encoding header was set to base64, the log is returned as a base64 string.
143        This method makes a synchronous HTTP request by default. To make an
144        asynchronous HTTP request, please define a `callback` function
145        to be invoked when receiving the response.
146        >>> def callback_function(response):
147        >>>     pprint(response)
148        >>>
149        >>> thread = api.get_request_log(request_log_id, callback=callback_function)
150
151        :param callback function: The callback function
152            for asynchronous request. (optional)
153        :param str request_log_id: (required)
154        :return: file
155                 If the method is called asynchronously,
156                 returns the request thread.
157        """
158        kwargs['_return_http_data_only'] = True
159        if kwargs.get('callback'):
160            return self.get_request_log_with_http_info(request_log_id, **kwargs)
161        else:
162            (data) = self.get_request_log_with_http_info(request_log_id, **kwargs)
163            return data
164
165    def get_request_log_with_http_info(self, request_log_id, **kwargs):
166        """
167        Gets a request logging log file.
168        Retrieves information for a single log entry.  **Request** The `requestLogfId` property can be retrieved by getting the list of log entries. The Content-Transfer-Encoding header can be set to base64 to retrieve the API request/response as base 64 string. Otherwise the bytes of the request/response are returned.  **Response** If the Content-Transfer-Encoding header was set to base64, the log is returned as a base64 string.
169        This method makes a synchronous HTTP request by default. To make an
170        asynchronous HTTP request, please define a `callback` function
171        to be invoked when receiving the response.
172        >>> def callback_function(response):
173        >>>     pprint(response)
174        >>>
175        >>> thread = api.get_request_log_with_http_info(request_log_id, callback=callback_function)
176
177        :param callback function: The callback function
178            for asynchronous request. (optional)
179        :param str request_log_id: (required)
180        :return: file
181                 If the method is called asynchronously,
182                 returns the request thread.
183        """
184
185        all_params = ['request_log_id']
186        all_params.append('callback')
187        all_params.append('_return_http_data_only')
188        all_params.append('_preload_content')
189        all_params.append('_request_timeout')
190
191        params = locals()
192        for key, val in iteritems(params['kwargs']):
193            if key not in all_params:
194                raise TypeError(
195                    "Got an unexpected keyword argument '%s'"
196                    " to method get_request_log" % key
197                )
198            params[key] = val
199        del params['kwargs']
200        # verify the required parameter 'request_log_id' is set
201        if ('request_log_id' not in params) or (params['request_log_id'] is None):
202            raise ValueError("Missing the required parameter `request_log_id` when calling `get_request_log`")
203
204
205        collection_formats = {}
206
207        resource_path = '/v2.1/diagnostics/request_logs/{requestLogId}'.replace('{format}', 'json')
208        path_params = {}
209        if 'request_log_id' in params:
210            path_params['requestLogId'] = params['request_log_id']
211
212        query_params = {}
213
214        header_params = {}
215
216        form_params = []
217        local_var_files = {}
218
219        body_params = None
220        # HTTP header `Accept`
221        header_params['Accept'] = self.api_client.\
222            select_header_accept(['text/plain'])
223
224        # Authentication setting
225        auth_settings = []
226
227        return self.api_client.call_api(resource_path, 'GET',
228                                        path_params,
229                                        query_params,
230                                        header_params,
231                                        body=body_params,
232                                        post_params=form_params,
233                                        files=local_var_files,
234                                        response_type='file',
235                                        auth_settings=auth_settings,
236                                        callback=params.get('callback'),
237                                        _return_http_data_only=params.get('_return_http_data_only'),
238                                        _preload_content=params.get('_preload_content', True),
239                                        _request_timeout=params.get('_request_timeout'),
240                                        collection_formats=collection_formats)
241
242    def get_request_log_settings(self, **kwargs):
243        """
244        Gets the API request logging settings.
245        Retrieves the current API request logging setting for the user and remaining log entries.  **Response** The response includes the current API request logging setting for the user, along with the maximum log entries and remaining log entries.
246        This method makes a synchronous HTTP request by default. To make an
247        asynchronous HTTP request, please define a `callback` function
248        to be invoked when receiving the response.
249        >>> def callback_function(response):
250        >>>     pprint(response)
251        >>>
252        >>> thread = api.get_request_log_settings(callback=callback_function)
253
254        :param callback function: The callback function
255            for asynchronous request. (optional)
256        :return: DiagnosticsSettingsInformation
257                 If the method is called asynchronously,
258                 returns the request thread.
259        """
260        kwargs['_return_http_data_only'] = True
261        if kwargs.get('callback'):
262            return self.get_request_log_settings_with_http_info(**kwargs)
263        else:
264            (data) = self.get_request_log_settings_with_http_info(**kwargs)
265            return data
266
267    def get_request_log_settings_with_http_info(self, **kwargs):
268        """
269        Gets the API request logging settings.
270        Retrieves the current API request logging setting for the user and remaining log entries.  **Response** The response includes the current API request logging setting for the user, along with the maximum log entries and remaining log entries.
271        This method makes a synchronous HTTP request by default. To make an
272        asynchronous HTTP request, please define a `callback` function
273        to be invoked when receiving the response.
274        >>> def callback_function(response):
275        >>>     pprint(response)
276        >>>
277        >>> thread = api.get_request_log_settings_with_http_info(callback=callback_function)
278
279        :param callback function: The callback function
280            for asynchronous request. (optional)
281        :return: DiagnosticsSettingsInformation
282                 If the method is called asynchronously,
283                 returns the request thread.
284        """
285
286        all_params = []
287        all_params.append('callback')
288        all_params.append('_return_http_data_only')
289        all_params.append('_preload_content')
290        all_params.append('_request_timeout')
291
292        params = locals()
293        for key, val in iteritems(params['kwargs']):
294            if key not in all_params:
295                raise TypeError(
296                    "Got an unexpected keyword argument '%s'"
297                    " to method get_request_log_settings" % key
298                )
299            params[key] = val
300        del params['kwargs']
301
302        collection_formats = {}
303
304        resource_path = '/v2.1/diagnostics/settings'.replace('{format}', 'json')
305        path_params = {}
306
307        query_params = {}
308
309        header_params = {}
310
311        form_params = []
312        local_var_files = {}
313
314        body_params = None
315        # HTTP header `Accept`
316        header_params['Accept'] = self.api_client.\
317            select_header_accept(['application/json'])
318
319        # Authentication setting
320        auth_settings = []
321
322        return self.api_client.call_api(resource_path, 'GET',
323                                        path_params,
324                                        query_params,
325                                        header_params,
326                                        body=body_params,
327                                        post_params=form_params,
328                                        files=local_var_files,
329                                        response_type='DiagnosticsSettingsInformation',
330                                        auth_settings=auth_settings,
331                                        callback=params.get('callback'),
332                                        _return_http_data_only=params.get('_return_http_data_only'),
333                                        _preload_content=params.get('_preload_content', True),
334                                        _request_timeout=params.get('_request_timeout'),
335                                        collection_formats=collection_formats)
336
337    def get_resources(self, **kwargs):
338        """
339        Lists resources for REST version specified
340        Retrieves the base resources available for the DocuSign REST APIs.  You do not need an integrator key to view the REST API versions and resources.  Example: https://demo.docusign.net/restapi/v2 lists all of the base resources available in version 2 of the REST API on the DocuSign Demo system.  To view descriptions and samples of the service operations for all versions, remove the version number and add /help to the URL.  Example: https://demo.docusign.net/restapi/help lists the REST API operations on the DocuSign Demo system with XML and JSON request and response samples.
341        This method makes a synchronous HTTP request by default. To make an
342        asynchronous HTTP request, please define a `callback` function
343        to be invoked when receiving the response.
344        >>> def callback_function(response):
345        >>>     pprint(response)
346        >>>
347        >>> thread = api.get_resources(callback=callback_function)
348
349        :param callback function: The callback function
350            for asynchronous request. (optional)
351        :return: ResourceInformation
352                 If the method is called asynchronously,
353                 returns the request thread.
354        """
355        kwargs['_return_http_data_only'] = True
356        if kwargs.get('callback'):
357            return self.get_resources_with_http_info(**kwargs)
358        else:
359            (data) = self.get_resources_with_http_info(**kwargs)
360            return data
361
362    def get_resources_with_http_info(self, **kwargs):
363        """
364        Lists resources for REST version specified
365        Retrieves the base resources available for the DocuSign REST APIs.  You do not need an integrator key to view the REST API versions and resources.  Example: https://demo.docusign.net/restapi/v2 lists all of the base resources available in version 2 of the REST API on the DocuSign Demo system.  To view descriptions and samples of the service operations for all versions, remove the version number and add /help to the URL.  Example: https://demo.docusign.net/restapi/help lists the REST API operations on the DocuSign Demo system with XML and JSON request and response samples.
366        This method makes a synchronous HTTP request by default. To make an
367        asynchronous HTTP request, please define a `callback` function
368        to be invoked when receiving the response.
369        >>> def callback_function(response):
370        >>>     pprint(response)
371        >>>
372        >>> thread = api.get_resources_with_http_info(callback=callback_function)
373
374        :param callback function: The callback function
375            for asynchronous request. (optional)
376        :return: ResourceInformation
377                 If the method is called asynchronously,
378                 returns the request thread.
379        """
380
381        all_params = []
382        all_params.append('callback')
383        all_params.append('_return_http_data_only')
384        all_params.append('_preload_content')
385        all_params.append('_request_timeout')
386
387        params = locals()
388        for key, val in iteritems(params['kwargs']):
389            if key not in all_params:
390                raise TypeError(
391                    "Got an unexpected keyword argument '%s'"
392                    " to method get_resources" % key
393                )
394            params[key] = val
395        del params['kwargs']
396
397        collection_formats = {}
398
399        resource_path = '/v2.1'.replace('{format}', 'json')
400        path_params = {}
401
402        query_params = {}
403
404        header_params = {}
405
406        form_params = []
407        local_var_files = {}
408
409        body_params = None
410        # HTTP header `Accept`
411        header_params['Accept'] = self.api_client.\
412            select_header_accept(['application/json'])
413
414        # Authentication setting
415        auth_settings = []
416
417        return self.api_client.call_api(resource_path, 'GET',
418                                        path_params,
419                                        query_params,
420                                        header_params,
421                                        body=body_params,
422                                        post_params=form_params,
423                                        files=local_var_files,
424                                        response_type='ResourceInformation',
425                                        auth_settings=auth_settings,
426                                        callback=params.get('callback'),
427                                        _return_http_data_only=params.get('_return_http_data_only'),
428                                        _preload_content=params.get('_preload_content', True),
429                                        _request_timeout=params.get('_request_timeout'),
430                                        collection_formats=collection_formats)
431
432    def get_service(self, **kwargs):
433        """
434        Retrieves the available REST API versions.
435        Retrieves the available REST API versions.  DocuSign Production system: https://www.docusign.net/restapi/service_information DocuSign Demo system: https://demo.docusign.net/restapi/service_information  You do not need an integrator key to view the REST API versions and resources.
436        This method makes a synchronous HTTP request by default. To make an
437        asynchronous HTTP request, please define a `callback` function
438        to be invoked when receiving the response.
439        >>> def callback_function(response):
440        >>>     pprint(response)
441        >>>
442        >>> thread = api.get_service(callback=callback_function)
443
444        :param callback function: The callback function
445            for asynchronous request. (optional)
446        :return: ServiceInformation
447                 If the method is called asynchronously,
448                 returns the request thread.
449        """
450        kwargs['_return_http_data_only'] = True
451        if kwargs.get('callback'):
452            return self.get_service_with_http_info(**kwargs)
453        else:
454            (data) = self.get_service_with_http_info(**kwargs)
455            return data
456
457    def get_service_with_http_info(self, **kwargs):
458        """
459        Retrieves the available REST API versions.
460        Retrieves the available REST API versions.  DocuSign Production system: https://www.docusign.net/restapi/service_information DocuSign Demo system: https://demo.docusign.net/restapi/service_information  You do not need an integrator key to view the REST API versions and resources.
461        This method makes a synchronous HTTP request by default. To make an
462        asynchronous HTTP request, please define a `callback` function
463        to be invoked when receiving the response.
464        >>> def callback_function(response):
465        >>>     pprint(response)
466        >>>
467        >>> thread = api.get_service_with_http_info(callback=callback_function)
468
469        :param callback function: The callback function
470            for asynchronous request. (optional)
471        :return: ServiceInformation
472                 If the method is called asynchronously,
473                 returns the request thread.
474        """
475
476        all_params = []
477        all_params.append('callback')
478        all_params.append('_return_http_data_only')
479        all_params.append('_preload_content')
480        all_params.append('_request_timeout')
481
482        params = locals()
483        for key, val in iteritems(params['kwargs']):
484            if key not in all_params:
485                raise TypeError(
486                    "Got an unexpected keyword argument '%s'"
487                    " to method get_service" % key
488                )
489            params[key] = val
490        del params['kwargs']
491
492        collection_formats = {}
493
494        resource_path = '/service_information'.replace('{format}', 'json')
495        path_params = {}
496
497        query_params = {}
498
499        header_params = {}
500
501        form_params = []
502        local_var_files = {}
503
504        body_params = None
505        # HTTP header `Accept`
506        header_params['Accept'] = self.api_client.\
507            select_header_accept(['application/json'])
508
509        # Authentication setting
510        auth_settings = []
511
512        return self.api_client.call_api(resource_path, 'GET',
513                                        path_params,
514                                        query_params,
515                                        header_params,
516                                        body=body_params,
517                                        post_params=form_params,
518                                        files=local_var_files,
519                                        response_type='ServiceInformation',
520                                        auth_settings=auth_settings,
521                                        callback=params.get('callback'),
522                                        _return_http_data_only=params.get('_return_http_data_only'),
523                                        _preload_content=params.get('_preload_content', True),
524                                        _request_timeout=params.get('_request_timeout'),
525                                        collection_formats=collection_formats)
526
527    def list_request_logs(self, **kwargs):
528        """
529        Gets the API request logging log files.
530        Retrieves a list of log entries as a JSON or xml object or as a zip file containing the entries.  If the Accept header is set to application/zip, the response is a zip file containing individual text files, each representing an API request.  If the Accept header is set to `application/json` or `application/xml`, the response returns list of log entries in either JSON or XML. An example JSON response body is shown below. 
531        This method makes a synchronous HTTP request by default. To make an
532        asynchronous HTTP request, please define a `callback` function
533        to be invoked when receiving the response.
534        >>> def callback_function(response):
535        >>>     pprint(response)
536        >>>
537        >>> thread = api.list_request_logs(callback=callback_function)
538
539        :param callback function: The callback function
540            for asynchronous request. (optional)
541        :param str encoding:
542        :return: ApiRequestLogsResult
543                 If the method is called asynchronously,
544                 returns the request thread.
545        """
546        kwargs['_return_http_data_only'] = True
547        if kwargs.get('callback'):
548            return self.list_request_logs_with_http_info(**kwargs)
549        else:
550            (data) = self.list_request_logs_with_http_info(**kwargs)
551            return data
552
553    def list_request_logs_with_http_info(self, **kwargs):
554        """
555        Gets the API request logging log files.
556        Retrieves a list of log entries as a JSON or xml object or as a zip file containing the entries.  If the Accept header is set to application/zip, the response is a zip file containing individual text files, each representing an API request.  If the Accept header is set to `application/json` or `application/xml`, the response returns list of log entries in either JSON or XML. An example JSON response body is shown below. 
557        This method makes a synchronous HTTP request by default. To make an
558        asynchronous HTTP request, please define a `callback` function
559        to be invoked when receiving the response.
560        >>> def callback_function(response):
561        >>>     pprint(response)
562        >>>
563        >>> thread = api.list_request_logs_with_http_info(callback=callback_function)
564
565        :param callback function: The callback function
566            for asynchronous request. (optional)
567        :param str encoding:
568        :return: ApiRequestLogsResult
569                 If the method is called asynchronously,
570                 returns the request thread.
571        """
572
573        all_params = ['encoding']
574        all_params.append('callback')
575        all_params.append('_return_http_data_only')
576        all_params.append('_preload_content')
577        all_params.append('_request_timeout')
578
579        params = locals()
580        for key, val in iteritems(params['kwargs']):
581            if key not in all_params:
582                raise TypeError(
583                    "Got an unexpected keyword argument '%s'"
584                    " to method list_request_logs" % key
585                )
586            params[key] = val
587        del params['kwargs']
588
589
590        collection_formats = {}
591
592        resource_path = '/v2.1/diagnostics/request_logs'.replace('{format}', 'json')
593        path_params = {}
594
595        query_params = {}
596        if 'encoding' in params:
597            query_params['encoding'] = params['encoding']
598
599        header_params = {}
600
601        form_params = []
602        local_var_files = {}
603
604        body_params = None
605        # HTTP header `Accept`
606        header_params['Accept'] = self.api_client.\
607            select_header_accept(['application/json'])
608
609        # Authentication setting
610        auth_settings = []
611
612        return self.api_client.call_api(resource_path, 'GET',
613                                        path_params,
614                                        query_params,
615                                        header_params,
616                                        body=body_params,
617                                        post_params=form_params,
618                                        files=local_var_files,
619                                        response_type='ApiRequestLogsResult',
620                                        auth_settings=auth_settings,
621                                        callback=params.get('callback'),
622                                        _return_http_data_only=params.get('_return_http_data_only'),
623                                        _preload_content=params.get('_preload_content', True),
624                                        _request_timeout=params.get('_request_timeout'),
625                                        collection_formats=collection_formats)
626
627    def update_request_log_settings(self, **kwargs):
628        """
629        Enables or disables API request logging for troubleshooting.
630        Enables or disables API request logging for troubleshooting.  When enabled (`apiRequestLogging` is set to true), REST API requests and responses for the user are added to a log. A log can have up to 50 requests/responses and the current number of log entries can be determined by getting the settings. Logging is automatically disabled when the log limit of 50 is reached.  You can call [ML:GetRequestLog] or [ML:GetRequestLogs] to download the log files (individually or as a zip file). Call [ML:DeleteRequestLogs] to clear the log by deleting current entries.  Private information, such as passwords and integrator key information, which is normally located in the call header is omitted from the request/response log.  ###### Note: API request logging only captures requests from the authenticated user. Any call that does not authenticate the user and resolve a userId isn't logged. Meaning that login_information, NewAccounts, or other distributor-credential calls are not logged. 
631        This method makes a synchronous HTTP request by default. To make an
632        asynchronous HTTP request, please define a `callback` function
633        to be invoked when receiving the response.
634        >>> def callback_function(response):
635        >>>     pprint(response)
636        >>>
637        >>> thread = api.update_request_log_settings(callback=callback_function)
638
639        :param callback function: The callback function
640            for asynchronous request. (optional)
641        :param DiagnosticsSettingsInformation diagnostics_settings_information:
642        :return: DiagnosticsSettingsInformation
643                 If the method is called asynchronously,
644                 returns the request thread.
645        """
646        kwargs['_return_http_data_only'] = True
647        if kwargs.get('callback'):
648            return self.update_request_log_settings_with_http_info(**kwargs)
649        else:
650            (data) = self.update_request_log_settings_with_http_info(**kwargs)
651            return data
652
653    def update_request_log_settings_with_http_info(self, **kwargs):
654        """
655        Enables or disables API request logging for troubleshooting.
656        Enables or disables API request logging for troubleshooting.  When enabled (`apiRequestLogging` is set to true), REST API requests and responses for the user are added to a log. A log can have up to 50 requests/responses and the current number of log entries can be determined by getting the settings. Logging is automatically disabled when the log limit of 50 is reached.  You can call [ML:GetRequestLog] or [ML:GetRequestLogs] to download the log files (individually or as a zip file). Call [ML:DeleteRequestLogs] to clear the log by deleting current entries.  Private information, such as passwords and integrator key information, which is normally located in the call header is omitted from the request/response log.  ###### Note: API request logging only captures requests from the authenticated user. Any call that does not authenticate the user and resolve a userId isn't logged. Meaning that login_information, NewAccounts, or other distributor-credential calls are not logged. 
657        This method makes a synchronous HTTP request by default. To make an
658        asynchronous HTTP request, please define a `callback` function
659        to be invoked when receiving the response.
660        >>> def callback_function(response):
661        >>>     pprint(response)
662        >>>
663        >>> thread = api.update_request_log_settings_with_http_info(callback=callback_function)
664
665        :param callback function: The callback function
666            for asynchronous request. (optional)
667        :param DiagnosticsSettingsInformation diagnostics_settings_information:
668        :return: DiagnosticsSettingsInformation
669                 If the method is called asynchronously,
670                 returns the request thread.
671        """
672
673        all_params = ['diagnostics_settings_information']
674        all_params.append('callback')
675        all_params.append('_return_http_data_only')
676        all_params.append('_preload_content')
677        all_params.append('_request_timeout')
678
679        params = locals()
680        for key, val in iteritems(params['kwargs']):
681            if key not in all_params:
682                raise TypeError(
683                    "Got an unexpected keyword argument '%s'"
684                    " to method update_request_log_settings" % key
685                )
686            params[key] = val
687        del params['kwargs']
688
689
690        collection_formats = {}
691
692        resource_path = '/v2.1/diagnostics/settings'.replace('{format}', 'json')
693        path_params = {}
694
695        query_params = {}
696
697        header_params = {}
698
699        form_params = []
700        local_var_files = {}
701
702        body_params = None
703        if 'diagnostics_settings_information' in params:
704            body_params = params['diagnostics_settings_information']
705        # HTTP header `Accept`
706        header_params['Accept'] = self.api_client.\
707            select_header_accept(['application/json'])
708
709        # Authentication setting
710        auth_settings = []
711
712        return self.api_client.call_api(resource_path, 'PUT',
713                                        path_params,
714                                        query_params,
715                                        header_params,
716                                        body=body_params,
717                                        post_params=form_params,
718                                        files=local_var_files,
719                                        response_type='DiagnosticsSettingsInformation',
720                                        auth_settings=auth_settings,
721                                        callback=params.get('callback'),
722                                        _return_http_data_only=params.get('_return_http_data_only'),
723                                        _preload_content=params.get('_preload_content', True),
724                                        _request_timeout=params.get('_request_timeout'),
725                                        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

DiagnosticsApi(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 delete_request_logs(self, **kwargs)
44    def delete_request_logs(self, **kwargs):
45        """
46        Deletes the request log files.
47        Deletes the request log files.
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.delete_request_logs(callback=callback_function)
55
56        :param callback function: The callback function
57            for asynchronous request. (optional)
58        :return: None
59                 If the method is called asynchronously,
60                 returns the request thread.
61        """
62        kwargs['_return_http_data_only'] = True
63        if kwargs.get('callback'):
64            return self.delete_request_logs_with_http_info(**kwargs)
65        else:
66            (data) = self.delete_request_logs_with_http_info(**kwargs)
67            return data

Deletes the request log files. Deletes the request log files. 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_request_logs(callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
Returns

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

def delete_request_logs_with_http_info(self, **kwargs)
 69    def delete_request_logs_with_http_info(self, **kwargs):
 70        """
 71        Deletes the request log files.
 72        Deletes the request log files.
 73        This method makes a synchronous HTTP request by default. To make an
 74        asynchronous HTTP request, please define a `callback` function
 75        to be invoked when receiving the response.
 76        >>> def callback_function(response):
 77        >>>     pprint(response)
 78        >>>
 79        >>> thread = api.delete_request_logs_with_http_info(callback=callback_function)
 80
 81        :param callback function: The callback function
 82            for asynchronous request. (optional)
 83        :return: None
 84                 If the method is called asynchronously,
 85                 returns the request thread.
 86        """
 87
 88        all_params = []
 89        all_params.append('callback')
 90        all_params.append('_return_http_data_only')
 91        all_params.append('_preload_content')
 92        all_params.append('_request_timeout')
 93
 94        params = locals()
 95        for key, val in iteritems(params['kwargs']):
 96            if key not in all_params:
 97                raise TypeError(
 98                    "Got an unexpected keyword argument '%s'"
 99                    " to method delete_request_logs" % key
100                )
101            params[key] = val
102        del params['kwargs']
103
104        collection_formats = {}
105
106        resource_path = '/v2.1/diagnostics/request_logs'.replace('{format}', 'json')
107        path_params = {}
108
109        query_params = {}
110
111        header_params = {}
112
113        form_params = []
114        local_var_files = {}
115
116        body_params = None
117        # HTTP header `Accept`
118        header_params['Accept'] = self.api_client.\
119            select_header_accept(['application/json'])
120
121        # Authentication setting
122        auth_settings = []
123
124        return self.api_client.call_api(resource_path, 'DELETE',
125                                        path_params,
126                                        query_params,
127                                        header_params,
128                                        body=body_params,
129                                        post_params=form_params,
130                                        files=local_var_files,
131                                        response_type=None,
132                                        auth_settings=auth_settings,
133                                        callback=params.get('callback'),
134                                        _return_http_data_only=params.get('_return_http_data_only'),
135                                        _preload_content=params.get('_preload_content', True),
136                                        _request_timeout=params.get('_request_timeout'),
137                                        collection_formats=collection_formats)

Deletes the request log files. Deletes the request log files. 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_request_logs_with_http_info(callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
Returns

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

def get_request_log(self, request_log_id, **kwargs)
139    def get_request_log(self, request_log_id, **kwargs):
140        """
141        Gets a request logging log file.
142        Retrieves information for a single log entry.  **Request** The `requestLogfId` property can be retrieved by getting the list of log entries. The Content-Transfer-Encoding header can be set to base64 to retrieve the API request/response as base 64 string. Otherwise the bytes of the request/response are returned.  **Response** If the Content-Transfer-Encoding header was set to base64, the log is returned as a base64 string.
143        This method makes a synchronous HTTP request by default. To make an
144        asynchronous HTTP request, please define a `callback` function
145        to be invoked when receiving the response.
146        >>> def callback_function(response):
147        >>>     pprint(response)
148        >>>
149        >>> thread = api.get_request_log(request_log_id, callback=callback_function)
150
151        :param callback function: The callback function
152            for asynchronous request. (optional)
153        :param str request_log_id: (required)
154        :return: file
155                 If the method is called asynchronously,
156                 returns the request thread.
157        """
158        kwargs['_return_http_data_only'] = True
159        if kwargs.get('callback'):
160            return self.get_request_log_with_http_info(request_log_id, **kwargs)
161        else:
162            (data) = self.get_request_log_with_http_info(request_log_id, **kwargs)
163            return data

Gets a request logging log file. Retrieves information for a single log entry. Request The requestLogfId property can be retrieved by getting the list of log entries. The Content-Transfer-Encoding header can be set to base64 to retrieve the API request/response as base 64 string. Otherwise the bytes of the request/response are returned. Response If the Content-Transfer-Encoding header was set to base64, the log is returned as a base64 string. 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_request_log(request_log_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str request_log_id: (required)
Returns

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

def get_request_log_with_http_info(self, request_log_id, **kwargs)
165    def get_request_log_with_http_info(self, request_log_id, **kwargs):
166        """
167        Gets a request logging log file.
168        Retrieves information for a single log entry.  **Request** The `requestLogfId` property can be retrieved by getting the list of log entries. The Content-Transfer-Encoding header can be set to base64 to retrieve the API request/response as base 64 string. Otherwise the bytes of the request/response are returned.  **Response** If the Content-Transfer-Encoding header was set to base64, the log is returned as a base64 string.
169        This method makes a synchronous HTTP request by default. To make an
170        asynchronous HTTP request, please define a `callback` function
171        to be invoked when receiving the response.
172        >>> def callback_function(response):
173        >>>     pprint(response)
174        >>>
175        >>> thread = api.get_request_log_with_http_info(request_log_id, callback=callback_function)
176
177        :param callback function: The callback function
178            for asynchronous request. (optional)
179        :param str request_log_id: (required)
180        :return: file
181                 If the method is called asynchronously,
182                 returns the request thread.
183        """
184
185        all_params = ['request_log_id']
186        all_params.append('callback')
187        all_params.append('_return_http_data_only')
188        all_params.append('_preload_content')
189        all_params.append('_request_timeout')
190
191        params = locals()
192        for key, val in iteritems(params['kwargs']):
193            if key not in all_params:
194                raise TypeError(
195                    "Got an unexpected keyword argument '%s'"
196                    " to method get_request_log" % key
197                )
198            params[key] = val
199        del params['kwargs']
200        # verify the required parameter 'request_log_id' is set
201        if ('request_log_id' not in params) or (params['request_log_id'] is None):
202            raise ValueError("Missing the required parameter `request_log_id` when calling `get_request_log`")
203
204
205        collection_formats = {}
206
207        resource_path = '/v2.1/diagnostics/request_logs/{requestLogId}'.replace('{format}', 'json')
208        path_params = {}
209        if 'request_log_id' in params:
210            path_params['requestLogId'] = params['request_log_id']
211
212        query_params = {}
213
214        header_params = {}
215
216        form_params = []
217        local_var_files = {}
218
219        body_params = None
220        # HTTP header `Accept`
221        header_params['Accept'] = self.api_client.\
222            select_header_accept(['text/plain'])
223
224        # Authentication setting
225        auth_settings = []
226
227        return self.api_client.call_api(resource_path, 'GET',
228                                        path_params,
229                                        query_params,
230                                        header_params,
231                                        body=body_params,
232                                        post_params=form_params,
233                                        files=local_var_files,
234                                        response_type='file',
235                                        auth_settings=auth_settings,
236                                        callback=params.get('callback'),
237                                        _return_http_data_only=params.get('_return_http_data_only'),
238                                        _preload_content=params.get('_preload_content', True),
239                                        _request_timeout=params.get('_request_timeout'),
240                                        collection_formats=collection_formats)

Gets a request logging log file. Retrieves information for a single log entry. Request The requestLogfId property can be retrieved by getting the list of log entries. The Content-Transfer-Encoding header can be set to base64 to retrieve the API request/response as base 64 string. Otherwise the bytes of the request/response are returned. Response If the Content-Transfer-Encoding header was set to base64, the log is returned as a base64 string. 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_request_log_with_http_info(request_log_id, callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str request_log_id: (required)
Returns

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

def get_request_log_settings(self, **kwargs)
242    def get_request_log_settings(self, **kwargs):
243        """
244        Gets the API request logging settings.
245        Retrieves the current API request logging setting for the user and remaining log entries.  **Response** The response includes the current API request logging setting for the user, along with the maximum log entries and remaining log entries.
246        This method makes a synchronous HTTP request by default. To make an
247        asynchronous HTTP request, please define a `callback` function
248        to be invoked when receiving the response.
249        >>> def callback_function(response):
250        >>>     pprint(response)
251        >>>
252        >>> thread = api.get_request_log_settings(callback=callback_function)
253
254        :param callback function: The callback function
255            for asynchronous request. (optional)
256        :return: DiagnosticsSettingsInformation
257                 If the method is called asynchronously,
258                 returns the request thread.
259        """
260        kwargs['_return_http_data_only'] = True
261        if kwargs.get('callback'):
262            return self.get_request_log_settings_with_http_info(**kwargs)
263        else:
264            (data) = self.get_request_log_settings_with_http_info(**kwargs)
265            return data

Gets the API request logging settings. Retrieves the current API request logging setting for the user and remaining log entries. Response The response includes the current API request logging setting for the user, along with the maximum log entries and remaining log entries. 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_request_log_settings(callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
Returns

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

def get_request_log_settings_with_http_info(self, **kwargs)
267    def get_request_log_settings_with_http_info(self, **kwargs):
268        """
269        Gets the API request logging settings.
270        Retrieves the current API request logging setting for the user and remaining log entries.  **Response** The response includes the current API request logging setting for the user, along with the maximum log entries and remaining log entries.
271        This method makes a synchronous HTTP request by default. To make an
272        asynchronous HTTP request, please define a `callback` function
273        to be invoked when receiving the response.
274        >>> def callback_function(response):
275        >>>     pprint(response)
276        >>>
277        >>> thread = api.get_request_log_settings_with_http_info(callback=callback_function)
278
279        :param callback function: The callback function
280            for asynchronous request. (optional)
281        :return: DiagnosticsSettingsInformation
282                 If the method is called asynchronously,
283                 returns the request thread.
284        """
285
286        all_params = []
287        all_params.append('callback')
288        all_params.append('_return_http_data_only')
289        all_params.append('_preload_content')
290        all_params.append('_request_timeout')
291
292        params = locals()
293        for key, val in iteritems(params['kwargs']):
294            if key not in all_params:
295                raise TypeError(
296                    "Got an unexpected keyword argument '%s'"
297                    " to method get_request_log_settings" % key
298                )
299            params[key] = val
300        del params['kwargs']
301
302        collection_formats = {}
303
304        resource_path = '/v2.1/diagnostics/settings'.replace('{format}', 'json')
305        path_params = {}
306
307        query_params = {}
308
309        header_params = {}
310
311        form_params = []
312        local_var_files = {}
313
314        body_params = None
315        # HTTP header `Accept`
316        header_params['Accept'] = self.api_client.\
317            select_header_accept(['application/json'])
318
319        # Authentication setting
320        auth_settings = []
321
322        return self.api_client.call_api(resource_path, 'GET',
323                                        path_params,
324                                        query_params,
325                                        header_params,
326                                        body=body_params,
327                                        post_params=form_params,
328                                        files=local_var_files,
329                                        response_type='DiagnosticsSettingsInformation',
330                                        auth_settings=auth_settings,
331                                        callback=params.get('callback'),
332                                        _return_http_data_only=params.get('_return_http_data_only'),
333                                        _preload_content=params.get('_preload_content', True),
334                                        _request_timeout=params.get('_request_timeout'),
335                                        collection_formats=collection_formats)

Gets the API request logging settings. Retrieves the current API request logging setting for the user and remaining log entries. Response The response includes the current API request logging setting for the user, along with the maximum log entries and remaining log entries. 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_request_log_settings_with_http_info(callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
Returns

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

def get_resources(self, **kwargs)
337    def get_resources(self, **kwargs):
338        """
339        Lists resources for REST version specified
340        Retrieves the base resources available for the DocuSign REST APIs.  You do not need an integrator key to view the REST API versions and resources.  Example: https://demo.docusign.net/restapi/v2 lists all of the base resources available in version 2 of the REST API on the DocuSign Demo system.  To view descriptions and samples of the service operations for all versions, remove the version number and add /help to the URL.  Example: https://demo.docusign.net/restapi/help lists the REST API operations on the DocuSign Demo system with XML and JSON request and response samples.
341        This method makes a synchronous HTTP request by default. To make an
342        asynchronous HTTP request, please define a `callback` function
343        to be invoked when receiving the response.
344        >>> def callback_function(response):
345        >>>     pprint(response)
346        >>>
347        >>> thread = api.get_resources(callback=callback_function)
348
349        :param callback function: The callback function
350            for asynchronous request. (optional)
351        :return: ResourceInformation
352                 If the method is called asynchronously,
353                 returns the request thread.
354        """
355        kwargs['_return_http_data_only'] = True
356        if kwargs.get('callback'):
357            return self.get_resources_with_http_info(**kwargs)
358        else:
359            (data) = self.get_resources_with_http_info(**kwargs)
360            return data

Lists resources for REST version specified Retrieves the base resources available for the DocuSign REST APIs. You do not need an integrator key to view the REST API versions and resources. Example: https://demo.docusign.net/restapi/v2 lists all of the base resources available in version 2 of the REST API on the DocuSign Demo system. To view descriptions and samples of the service operations for all versions, remove the version number and add /help to the URL. Example: https://demo.docusign.net/restapi/help lists the REST API operations on the DocuSign Demo system with XML and JSON request and response samples. 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_resources(callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
Returns

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

def get_resources_with_http_info(self, **kwargs)
362    def get_resources_with_http_info(self, **kwargs):
363        """
364        Lists resources for REST version specified
365        Retrieves the base resources available for the DocuSign REST APIs.  You do not need an integrator key to view the REST API versions and resources.  Example: https://demo.docusign.net/restapi/v2 lists all of the base resources available in version 2 of the REST API on the DocuSign Demo system.  To view descriptions and samples of the service operations for all versions, remove the version number and add /help to the URL.  Example: https://demo.docusign.net/restapi/help lists the REST API operations on the DocuSign Demo system with XML and JSON request and response samples.
366        This method makes a synchronous HTTP request by default. To make an
367        asynchronous HTTP request, please define a `callback` function
368        to be invoked when receiving the response.
369        >>> def callback_function(response):
370        >>>     pprint(response)
371        >>>
372        >>> thread = api.get_resources_with_http_info(callback=callback_function)
373
374        :param callback function: The callback function
375            for asynchronous request. (optional)
376        :return: ResourceInformation
377                 If the method is called asynchronously,
378                 returns the request thread.
379        """
380
381        all_params = []
382        all_params.append('callback')
383        all_params.append('_return_http_data_only')
384        all_params.append('_preload_content')
385        all_params.append('_request_timeout')
386
387        params = locals()
388        for key, val in iteritems(params['kwargs']):
389            if key not in all_params:
390                raise TypeError(
391                    "Got an unexpected keyword argument '%s'"
392                    " to method get_resources" % key
393                )
394            params[key] = val
395        del params['kwargs']
396
397        collection_formats = {}
398
399        resource_path = '/v2.1'.replace('{format}', 'json')
400        path_params = {}
401
402        query_params = {}
403
404        header_params = {}
405
406        form_params = []
407        local_var_files = {}
408
409        body_params = None
410        # HTTP header `Accept`
411        header_params['Accept'] = self.api_client.\
412            select_header_accept(['application/json'])
413
414        # Authentication setting
415        auth_settings = []
416
417        return self.api_client.call_api(resource_path, 'GET',
418                                        path_params,
419                                        query_params,
420                                        header_params,
421                                        body=body_params,
422                                        post_params=form_params,
423                                        files=local_var_files,
424                                        response_type='ResourceInformation',
425                                        auth_settings=auth_settings,
426                                        callback=params.get('callback'),
427                                        _return_http_data_only=params.get('_return_http_data_only'),
428                                        _preload_content=params.get('_preload_content', True),
429                                        _request_timeout=params.get('_request_timeout'),
430                                        collection_formats=collection_formats)

Lists resources for REST version specified Retrieves the base resources available for the DocuSign REST APIs. You do not need an integrator key to view the REST API versions and resources. Example: https://demo.docusign.net/restapi/v2 lists all of the base resources available in version 2 of the REST API on the DocuSign Demo system. To view descriptions and samples of the service operations for all versions, remove the version number and add /help to the URL. Example: https://demo.docusign.net/restapi/help lists the REST API operations on the DocuSign Demo system with XML and JSON request and response samples. 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_resources_with_http_info(callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
Returns

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

def get_service(self, **kwargs)
432    def get_service(self, **kwargs):
433        """
434        Retrieves the available REST API versions.
435        Retrieves the available REST API versions.  DocuSign Production system: https://www.docusign.net/restapi/service_information DocuSign Demo system: https://demo.docusign.net/restapi/service_information  You do not need an integrator key to view the REST API versions and resources.
436        This method makes a synchronous HTTP request by default. To make an
437        asynchronous HTTP request, please define a `callback` function
438        to be invoked when receiving the response.
439        >>> def callback_function(response):
440        >>>     pprint(response)
441        >>>
442        >>> thread = api.get_service(callback=callback_function)
443
444        :param callback function: The callback function
445            for asynchronous request. (optional)
446        :return: ServiceInformation
447                 If the method is called asynchronously,
448                 returns the request thread.
449        """
450        kwargs['_return_http_data_only'] = True
451        if kwargs.get('callback'):
452            return self.get_service_with_http_info(**kwargs)
453        else:
454            (data) = self.get_service_with_http_info(**kwargs)
455            return data

Retrieves the available REST API versions. Retrieves the available REST API versions. DocuSign Production system: https://www.docusign.net/restapi/service_information DocuSign Demo system: https://demo.docusign.net/restapi/service_information You do not need an integrator key to view the REST API versions and resources. 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_service(callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
Returns

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

def get_service_with_http_info(self, **kwargs)
457    def get_service_with_http_info(self, **kwargs):
458        """
459        Retrieves the available REST API versions.
460        Retrieves the available REST API versions.  DocuSign Production system: https://www.docusign.net/restapi/service_information DocuSign Demo system: https://demo.docusign.net/restapi/service_information  You do not need an integrator key to view the REST API versions and resources.
461        This method makes a synchronous HTTP request by default. To make an
462        asynchronous HTTP request, please define a `callback` function
463        to be invoked when receiving the response.
464        >>> def callback_function(response):
465        >>>     pprint(response)
466        >>>
467        >>> thread = api.get_service_with_http_info(callback=callback_function)
468
469        :param callback function: The callback function
470            for asynchronous request. (optional)
471        :return: ServiceInformation
472                 If the method is called asynchronously,
473                 returns the request thread.
474        """
475
476        all_params = []
477        all_params.append('callback')
478        all_params.append('_return_http_data_only')
479        all_params.append('_preload_content')
480        all_params.append('_request_timeout')
481
482        params = locals()
483        for key, val in iteritems(params['kwargs']):
484            if key not in all_params:
485                raise TypeError(
486                    "Got an unexpected keyword argument '%s'"
487                    " to method get_service" % key
488                )
489            params[key] = val
490        del params['kwargs']
491
492        collection_formats = {}
493
494        resource_path = '/service_information'.replace('{format}', 'json')
495        path_params = {}
496
497        query_params = {}
498
499        header_params = {}
500
501        form_params = []
502        local_var_files = {}
503
504        body_params = None
505        # HTTP header `Accept`
506        header_params['Accept'] = self.api_client.\
507            select_header_accept(['application/json'])
508
509        # Authentication setting
510        auth_settings = []
511
512        return self.api_client.call_api(resource_path, 'GET',
513                                        path_params,
514                                        query_params,
515                                        header_params,
516                                        body=body_params,
517                                        post_params=form_params,
518                                        files=local_var_files,
519                                        response_type='ServiceInformation',
520                                        auth_settings=auth_settings,
521                                        callback=params.get('callback'),
522                                        _return_http_data_only=params.get('_return_http_data_only'),
523                                        _preload_content=params.get('_preload_content', True),
524                                        _request_timeout=params.get('_request_timeout'),
525                                        collection_formats=collection_formats)

Retrieves the available REST API versions. Retrieves the available REST API versions. DocuSign Production system: https://www.docusign.net/restapi/service_information DocuSign Demo system: https://demo.docusign.net/restapi/service_information You do not need an integrator key to view the REST API versions and resources. 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_service_with_http_info(callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
Returns

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

def list_request_logs(self, **kwargs)
527    def list_request_logs(self, **kwargs):
528        """
529        Gets the API request logging log files.
530        Retrieves a list of log entries as a JSON or xml object or as a zip file containing the entries.  If the Accept header is set to application/zip, the response is a zip file containing individual text files, each representing an API request.  If the Accept header is set to `application/json` or `application/xml`, the response returns list of log entries in either JSON or XML. An example JSON response body is shown below. 
531        This method makes a synchronous HTTP request by default. To make an
532        asynchronous HTTP request, please define a `callback` function
533        to be invoked when receiving the response.
534        >>> def callback_function(response):
535        >>>     pprint(response)
536        >>>
537        >>> thread = api.list_request_logs(callback=callback_function)
538
539        :param callback function: The callback function
540            for asynchronous request. (optional)
541        :param str encoding:
542        :return: ApiRequestLogsResult
543                 If the method is called asynchronously,
544                 returns the request thread.
545        """
546        kwargs['_return_http_data_only'] = True
547        if kwargs.get('callback'):
548            return self.list_request_logs_with_http_info(**kwargs)
549        else:
550            (data) = self.list_request_logs_with_http_info(**kwargs)
551            return data

Gets the API request logging log files. Retrieves a list of log entries as a JSON or xml object or as a zip file containing the entries. If the Accept header is set to application/zip, the response is a zip file containing individual text files, each representing an API request. If the Accept header is set to application/json or application/xml, the response returns list of log entries in either JSON or XML. An example JSON response body is shown below. 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_request_logs(callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str encoding:
Returns

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

def list_request_logs_with_http_info(self, **kwargs)
553    def list_request_logs_with_http_info(self, **kwargs):
554        """
555        Gets the API request logging log files.
556        Retrieves a list of log entries as a JSON or xml object or as a zip file containing the entries.  If the Accept header is set to application/zip, the response is a zip file containing individual text files, each representing an API request.  If the Accept header is set to `application/json` or `application/xml`, the response returns list of log entries in either JSON or XML. An example JSON response body is shown below. 
557        This method makes a synchronous HTTP request by default. To make an
558        asynchronous HTTP request, please define a `callback` function
559        to be invoked when receiving the response.
560        >>> def callback_function(response):
561        >>>     pprint(response)
562        >>>
563        >>> thread = api.list_request_logs_with_http_info(callback=callback_function)
564
565        :param callback function: The callback function
566            for asynchronous request. (optional)
567        :param str encoding:
568        :return: ApiRequestLogsResult
569                 If the method is called asynchronously,
570                 returns the request thread.
571        """
572
573        all_params = ['encoding']
574        all_params.append('callback')
575        all_params.append('_return_http_data_only')
576        all_params.append('_preload_content')
577        all_params.append('_request_timeout')
578
579        params = locals()
580        for key, val in iteritems(params['kwargs']):
581            if key not in all_params:
582                raise TypeError(
583                    "Got an unexpected keyword argument '%s'"
584                    " to method list_request_logs" % key
585                )
586            params[key] = val
587        del params['kwargs']
588
589
590        collection_formats = {}
591
592        resource_path = '/v2.1/diagnostics/request_logs'.replace('{format}', 'json')
593        path_params = {}
594
595        query_params = {}
596        if 'encoding' in params:
597            query_params['encoding'] = params['encoding']
598
599        header_params = {}
600
601        form_params = []
602        local_var_files = {}
603
604        body_params = None
605        # HTTP header `Accept`
606        header_params['Accept'] = self.api_client.\
607            select_header_accept(['application/json'])
608
609        # Authentication setting
610        auth_settings = []
611
612        return self.api_client.call_api(resource_path, 'GET',
613                                        path_params,
614                                        query_params,
615                                        header_params,
616                                        body=body_params,
617                                        post_params=form_params,
618                                        files=local_var_files,
619                                        response_type='ApiRequestLogsResult',
620                                        auth_settings=auth_settings,
621                                        callback=params.get('callback'),
622                                        _return_http_data_only=params.get('_return_http_data_only'),
623                                        _preload_content=params.get('_preload_content', True),
624                                        _request_timeout=params.get('_request_timeout'),
625                                        collection_formats=collection_formats)

Gets the API request logging log files. Retrieves a list of log entries as a JSON or xml object or as a zip file containing the entries. If the Accept header is set to application/zip, the response is a zip file containing individual text files, each representing an API request. If the Accept header is set to application/json or application/xml, the response returns list of log entries in either JSON or XML. An example JSON response body is shown below. 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_request_logs_with_http_info(callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • str encoding:
Returns

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

def update_request_log_settings(self, **kwargs)
627    def update_request_log_settings(self, **kwargs):
628        """
629        Enables or disables API request logging for troubleshooting.
630        Enables or disables API request logging for troubleshooting.  When enabled (`apiRequestLogging` is set to true), REST API requests and responses for the user are added to a log. A log can have up to 50 requests/responses and the current number of log entries can be determined by getting the settings. Logging is automatically disabled when the log limit of 50 is reached.  You can call [ML:GetRequestLog] or [ML:GetRequestLogs] to download the log files (individually or as a zip file). Call [ML:DeleteRequestLogs] to clear the log by deleting current entries.  Private information, such as passwords and integrator key information, which is normally located in the call header is omitted from the request/response log.  ###### Note: API request logging only captures requests from the authenticated user. Any call that does not authenticate the user and resolve a userId isn't logged. Meaning that login_information, NewAccounts, or other distributor-credential calls are not logged. 
631        This method makes a synchronous HTTP request by default. To make an
632        asynchronous HTTP request, please define a `callback` function
633        to be invoked when receiving the response.
634        >>> def callback_function(response):
635        >>>     pprint(response)
636        >>>
637        >>> thread = api.update_request_log_settings(callback=callback_function)
638
639        :param callback function: The callback function
640            for asynchronous request. (optional)
641        :param DiagnosticsSettingsInformation diagnostics_settings_information:
642        :return: DiagnosticsSettingsInformation
643                 If the method is called asynchronously,
644                 returns the request thread.
645        """
646        kwargs['_return_http_data_only'] = True
647        if kwargs.get('callback'):
648            return self.update_request_log_settings_with_http_info(**kwargs)
649        else:
650            (data) = self.update_request_log_settings_with_http_info(**kwargs)
651            return data

Enables or disables API request logging for troubleshooting. Enables or disables API request logging for troubleshooting. When enabled (apiRequestLogging is set to true), REST API requests and responses for the user are added to a log. A log can have up to 50 requests/responses and the current number of log entries can be determined by getting the settings. Logging is automatically disabled when the log limit of 50 is reached. You can call [ML:GetRequestLog] or [ML:GetRequestLogs] to download the log files (individually or as a zip file). Call [ML:DeleteRequestLogs] to clear the log by deleting current entries. Private information, such as passwords and integrator key information, which is normally located in the call header is omitted from the request/response log. ###### Note: API request logging only captures requests from the authenticated user. Any call that does not authenticate the user and resolve a userId isn't logged. Meaning that login_information, NewAccounts, or other distributor-credential calls are not logged. 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.update_request_log_settings(callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • DiagnosticsSettingsInformation diagnostics_settings_information:
Returns

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

def update_request_log_settings_with_http_info(self, **kwargs)
653    def update_request_log_settings_with_http_info(self, **kwargs):
654        """
655        Enables or disables API request logging for troubleshooting.
656        Enables or disables API request logging for troubleshooting.  When enabled (`apiRequestLogging` is set to true), REST API requests and responses for the user are added to a log. A log can have up to 50 requests/responses and the current number of log entries can be determined by getting the settings. Logging is automatically disabled when the log limit of 50 is reached.  You can call [ML:GetRequestLog] or [ML:GetRequestLogs] to download the log files (individually or as a zip file). Call [ML:DeleteRequestLogs] to clear the log by deleting current entries.  Private information, such as passwords and integrator key information, which is normally located in the call header is omitted from the request/response log.  ###### Note: API request logging only captures requests from the authenticated user. Any call that does not authenticate the user and resolve a userId isn't logged. Meaning that login_information, NewAccounts, or other distributor-credential calls are not logged. 
657        This method makes a synchronous HTTP request by default. To make an
658        asynchronous HTTP request, please define a `callback` function
659        to be invoked when receiving the response.
660        >>> def callback_function(response):
661        >>>     pprint(response)
662        >>>
663        >>> thread = api.update_request_log_settings_with_http_info(callback=callback_function)
664
665        :param callback function: The callback function
666            for asynchronous request. (optional)
667        :param DiagnosticsSettingsInformation diagnostics_settings_information:
668        :return: DiagnosticsSettingsInformation
669                 If the method is called asynchronously,
670                 returns the request thread.
671        """
672
673        all_params = ['diagnostics_settings_information']
674        all_params.append('callback')
675        all_params.append('_return_http_data_only')
676        all_params.append('_preload_content')
677        all_params.append('_request_timeout')
678
679        params = locals()
680        for key, val in iteritems(params['kwargs']):
681            if key not in all_params:
682                raise TypeError(
683                    "Got an unexpected keyword argument '%s'"
684                    " to method update_request_log_settings" % key
685                )
686            params[key] = val
687        del params['kwargs']
688
689
690        collection_formats = {}
691
692        resource_path = '/v2.1/diagnostics/settings'.replace('{format}', 'json')
693        path_params = {}
694
695        query_params = {}
696
697        header_params = {}
698
699        form_params = []
700        local_var_files = {}
701
702        body_params = None
703        if 'diagnostics_settings_information' in params:
704            body_params = params['diagnostics_settings_information']
705        # HTTP header `Accept`
706        header_params['Accept'] = self.api_client.\
707            select_header_accept(['application/json'])
708
709        # Authentication setting
710        auth_settings = []
711
712        return self.api_client.call_api(resource_path, 'PUT',
713                                        path_params,
714                                        query_params,
715                                        header_params,
716                                        body=body_params,
717                                        post_params=form_params,
718                                        files=local_var_files,
719                                        response_type='DiagnosticsSettingsInformation',
720                                        auth_settings=auth_settings,
721                                        callback=params.get('callback'),
722                                        _return_http_data_only=params.get('_return_http_data_only'),
723                                        _preload_content=params.get('_preload_content', True),
724                                        _request_timeout=params.get('_request_timeout'),
725                                        collection_formats=collection_formats)

Enables or disables API request logging for troubleshooting. Enables or disables API request logging for troubleshooting. When enabled (apiRequestLogging is set to true), REST API requests and responses for the user are added to a log. A log can have up to 50 requests/responses and the current number of log entries can be determined by getting the settings. Logging is automatically disabled when the log limit of 50 is reached. You can call [ML:GetRequestLog] or [ML:GetRequestLogs] to download the log files (individually or as a zip file). Call [ML:DeleteRequestLogs] to clear the log by deleting current entries. Private information, such as passwords and integrator key information, which is normally located in the call header is omitted from the request/response log. ###### Note: API request logging only captures requests from the authenticated user. Any call that does not authenticate the user and resolve a userId isn't logged. Meaning that login_information, NewAccounts, or other distributor-credential calls are not logged. 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.update_request_log_settings_with_http_info(callback=callback_function)
Parameters
  • callback function: The callback function for asynchronous request. (optional)
  • DiagnosticsSettingsInformation diagnostics_settings_information:
Returns

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