Exemple #1
0
        public void GetSetting_ReturnDiagnosticsSettingsInformation()
        {
            DiagnosticsSettingsInformation diagnosticsSettingsInformation = _diagnosticsApi.GetRequestLogSettings();

            Assert.IsNotNull(diagnosticsSettingsInformation?.ApiRequestLogMaxEntries);
            Assert.IsNotNull(diagnosticsSettingsInformation?.ApiRequestLogRemainingEntries);
            Assert.IsNotNull(diagnosticsSettingsInformation?.ApiRequestLogging);
        }
        /// <summary>
        /// Enables or disables API request logging for troubleshooting. Enables or disables API request logging for troubleshooting.\n\nWhen 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.\n\nYou 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.\n\nPrivate information, such as passwords and integrator key information, which is normally located in the call header is omitted from the request/response log.\n\n### 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.
        /// </summary>
 	    /// <param name="diagnosticsSettingsInformation">TBD Description</param>
		/// <returns>7Task of DiagnosticsSettingsInformation</returns>
        public async System.Threading.Tasks.Task<DiagnosticsSettingsInformation> UpdateRequestLogSettingsAsync (DiagnosticsSettingsInformation diagnosticsSettingsInformation)
        {
             ApiResponse<DiagnosticsSettingsInformation> response = await UpdateRequestLogSettingsAsyncWithHttpInfo(diagnosticsSettingsInformation);
             return response.Data;

        }
        /// <summary>
        /// Enables or disables API request logging for troubleshooting. Enables or disables API request logging for troubleshooting.\n\nWhen 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.\n\nYou 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.\n\nPrivate information, such as passwords and integrator key information, which is normally located in the call header is omitted from the request/response log.\n\n### 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.
        /// </summary>
	    /// <param name="diagnosticsSettingsInformation">TBD Description</param>
		/// <returns>8Task of ApiResponse (DiagnosticsSettingsInformation)</returns>
        public async System.Threading.Tasks.Task<ApiResponse<DiagnosticsSettingsInformation>> UpdateRequestLogSettingsAsyncWithHttpInfo (DiagnosticsSettingsInformation diagnosticsSettingsInformation)
        {
            
    
            var path_ = "/v2/diagnostics/settings";
    
            var pathParams = new Dictionary<String, String>();
            var queryParams = new Dictionary<String, String>();
            var headerParams = new Dictionary<String, String>();
            var formParams = new Dictionary<String, String>();
            var fileParams = new Dictionary<String, FileParameter>();
            String postBody = null;

            // to determine the Accept header
            String[] http_header_accepts = new String[] {
                "application/json"
            };
            String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts);
            if (http_header_accept != null)
                headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts));

            // set "format" to json by default
            // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json
            pathParams.Add("format", "json");
            

						
			
			

            
            
            postBody = Configuration.ApiClient.Serialize(diagnosticsSettingsInformation); // http body (model) parameter
            

            

            // make the HTTP request
            IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams);

            int statusCode = (int) response.StatusCode;
 
            if (statusCode >= 400)
                throw new ApiException (statusCode, "Error calling UpdateRequestLogSettings: " + response.Content, response.Content);
            else if (statusCode == 0)
                throw new ApiException (statusCode, "Error calling UpdateRequestLogSettings: " + response.ErrorMessage, response.ErrorMessage);

            return new ApiResponse<DiagnosticsSettingsInformation>(statusCode,
                response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
                (DiagnosticsSettingsInformation) Configuration.ApiClient.Deserialize(response, typeof(DiagnosticsSettingsInformation)));
            
        }
        /// <summary>
        /// Enables or disables API request logging for troubleshooting. Enables or disables API request logging for troubleshooting.\n\nWhen 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.\n\nYou 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.\n\nPrivate information, such as passwords and integrator key information, which is normally located in the call header is omitted from the request/response log.\n\n### 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.
        /// </summary>
 	    /// <param name="diagnosticsSettingsInformation">TBD Description</param>
		/// <returns>5DiagnosticsSettingsInformation</returns>
        public DiagnosticsSettingsInformation UpdateRequestLogSettings (DiagnosticsSettingsInformation diagnosticsSettingsInformation)
        {
             ApiResponse<DiagnosticsSettingsInformation> response = UpdateRequestLogSettingsWithHttpInfo(diagnosticsSettingsInformation);
             return response.Data;
        }