Class: DocuSign_eSign::DiagnosticsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/docusign_esign/api/diagnostics_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = DiagnosticsApi.default) ⇒ DiagnosticsApi

Returns a new instance of DiagnosticsApi.


30
31
32
# File 'lib/docusign_esign/api/diagnostics_api.rb', line 30

def initialize(api_client = DiagnosticsApi.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client


28
29
30
# File 'lib/docusign_esign/api/diagnostics_api.rb', line 28

def api_client
  @api_client
end

Instance Method Details

#delete_request_logsnil

Deletes the request log files. Deletes the request log files.

Returns:

  • (nil)

37
38
39
40
# File 'lib/docusign_esign/api/diagnostics_api.rb', line 37

def delete_request_logs()
  delete_request_logs_with_http_info()
  return nil
end

#delete_request_logs_with_http_infoArray<(nil, Fixnum, Hash)>

Deletes the request log files. Deletes the request log files.

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers


45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/docusign_esign/api/diagnostics_api.rb', line 45

def delete_request_logs_with_http_info()
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: DiagnosticsApi.delete_request_logs ..."
  end
  # resource path
  local_var_path = "/v2.1/diagnostics/request_logs".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DiagnosticsApi#delete_request_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_request_log(request_log_id) ⇒ File

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.

Parameters:

  • request_log_id

Returns:

  • (File)

82
83
84
85
# File 'lib/docusign_esign/api/diagnostics_api.rb', line 82

def get_request_log(request_log_id)
  data, _status_code, _headers = get_request_log_with_http_info(request_log_id)
  return data
end

#get_request_log_settingsDiagnosticsSettingsInformation

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.


130
131
132
133
# File 'lib/docusign_esign/api/diagnostics_api.rb', line 130

def get_request_log_settings()
  data, _status_code, _headers = get_request_log_settings_with_http_info()
  return data
end

#get_request_log_settings_with_http_infoArray<(DiagnosticsSettingsInformation, Fixnum, Hash)>

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.

Returns:


138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# File 'lib/docusign_esign/api/diagnostics_api.rb', line 138

def get_request_log_settings_with_http_info()
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: DiagnosticsApi.get_request_log_settings ..."
  end
  # resource path
  local_var_path = "/v2.1/diagnostics/settings".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DiagnosticsSettingsInformation')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DiagnosticsApi#get_request_log_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_request_log_with_http_info(request_log_id) ⇒ Array<(File, Fixnum, Hash)>

Gets a request logging log file. Retrieves information for a single log entry. *Request* The &#x60;requestLogfId&#x60; 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.

Parameters:

  • request_log_id

Returns:

  • (Array<(File, Fixnum, Hash)>)

    File data, response status code and response headers


91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# File 'lib/docusign_esign/api/diagnostics_api.rb', line 91

def get_request_log_with_http_info(request_log_id)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: DiagnosticsApi.get_request_log ..."
  end
  # verify the required parameter 'request_log_id' is set
  fail ArgumentError, "Missing the required parameter 'request_log_id' when calling DiagnosticsApi.get_request_log" if request_log_id.nil?
  # resource path
  local_var_path = "/v2.1/diagnostics/request_logs/{requestLogId}".sub('{format}','json').sub('{' + 'requestLogId' + '}', request_log_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['text/plain'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DiagnosticsApi#get_request_log\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_resourcesResourceInformation

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: 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: demo.docusign.net/restapi/help lists the REST API operations on the DocuSign Demo system with XML and JSON request and response samples.

Returns:


175
176
177
178
# File 'lib/docusign_esign/api/diagnostics_api.rb', line 175

def get_resources()
  data, _status_code, _headers = get_resources_with_http_info()
  return data
end

#get_resources_with_http_infoArray<(ResourceInformation, Fixnum, Hash)>

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: 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: demo.docusign.net/restapi/help lists the REST API operations on the DocuSign Demo system with XML and JSON request and response samples.

Returns:

  • (Array<(ResourceInformation, Fixnum, Hash)>)

    ResourceInformation data, response status code and response headers


183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
# File 'lib/docusign_esign/api/diagnostics_api.rb', line 183

def get_resources_with_http_info()
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: DiagnosticsApi.get_resources ..."
  end
  # resource path
  local_var_path = "/v2.1".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ResourceInformation')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DiagnosticsApi#get_resources\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_serviceServiceInformation

Retrieves the available REST API versions. Retrieves the available REST API versions. DocuSign Production system: www.docusign.net/restapi/service_information DocuSign Demo system: demo.docusign.net/restapi/service_information You do not need an integrator key to view the REST API versions and resources.

Returns:


220
221
222
223
# File 'lib/docusign_esign/api/diagnostics_api.rb', line 220

def get_service()
  data, _status_code, _headers = get_service_with_http_info()
  return data
end

#get_service_with_http_infoArray<(ServiceInformation, Fixnum, Hash)>

Retrieves the available REST API versions. Retrieves the available REST API versions. DocuSign Production system: www.docusign.net/restapi/service_information DocuSign Demo system: demo.docusign.net/restapi/service_information You do not need an integrator key to view the REST API versions and resources.

Returns:

  • (Array<(ServiceInformation, Fixnum, Hash)>)

    ServiceInformation data, response status code and response headers


228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
# File 'lib/docusign_esign/api/diagnostics_api.rb', line 228

def get_service_with_http_info()
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: DiagnosticsApi.get_service ..."
  end
  # resource path
  local_var_path = "/service_information".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ServiceInformation')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DiagnosticsApi#get_service\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_request_logs(options = DocuSign_eSign::ListRequestLogsOptions.default) ⇒ ApiRequestLogsResult

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.

Parameters:

  • DocuSign_eSign::ListRequestLogsOptions

    Options for modifying the behavior of the function.

Returns:


266
267
268
269
# File 'lib/docusign_esign/api/diagnostics_api.rb', line 266

def list_request_logs(options = DocuSign_eSign::ListRequestLogsOptions.default)
  data, _status_code, _headers = list_request_logs_with_http_info(options)
  return data
end

#list_request_logs_with_http_info(options = DocuSign_eSign::ListRequestLogsOptions.default) ⇒ Array<(ApiRequestLogsResult, Fixnum, Hash)>

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 &#x60;application/json&#x60; or &#x60;application/xml&#x60;, the response returns list of log entries in either JSON or XML. An example JSON response body is shown below.

Parameters:

  • DocuSign_eSign::ListRequestLogsOptions

    Options for modifying the behavior of the function.

Returns:

  • (Array<(ApiRequestLogsResult, Fixnum, Hash)>)

    ApiRequestLogsResult data, response status code and response headers


275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
# File 'lib/docusign_esign/api/diagnostics_api.rb', line 275

def list_request_logs_with_http_info(options = DocuSign_eSign::ListRequestLogsOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: DiagnosticsApi.list_request_logs ..."
  end
  # resource path
  local_var_path = "/v2.1/diagnostics/request_logs".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'encoding'] = options.encoding if !options.encoding.nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ApiRequestLogsResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DiagnosticsApi#list_request_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_request_log_settings(diagnostics_settings_information) ⇒ DiagnosticsSettingsInformation

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.

Parameters:

  • diagnostics_settings_information (optional parameter)

Returns:


314
315
316
317
# File 'lib/docusign_esign/api/diagnostics_api.rb', line 314

def update_request_log_settings(diagnostics_settings_information)
  data, _status_code, _headers = update_request_log_settings_with_http_info( diagnostics_settings_information)
  return data
end

#update_request_log_settings_with_http_info(diagnostics_settings_information) ⇒ Array<(DiagnosticsSettingsInformation, Fixnum, Hash)>

Enables or disables API request logging for troubleshooting. Enables or disables API request logging for troubleshooting. When enabled (&#x60;apiRequestLogging&#x60; 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&#39;t logged. Meaning that login_information, NewAccounts, or other distributor-credential calls are not logged.

Parameters:

  • diagnostics_settings_information (optional parameter)

Returns:


323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
# File 'lib/docusign_esign/api/diagnostics_api.rb', line 323

def update_request_log_settings_with_http_info(diagnostics_settings_information)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: DiagnosticsApi.update_request_log_settings ..."
  end
  # resource path
  local_var_path = "/v2.1/diagnostics/settings".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(diagnostics_settings_information)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DiagnosticsSettingsInformation')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DiagnosticsApi#update_request_log_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end