class DependencyTracker::AnalysisApi
Attributes
Public Class Methods
# File lib/dependency-tracker-client/api/analysis_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Retrieves an analysis trail @param component [String] The UUID of the component @param vulnerability [String] The UUID of the vulnerability @param [Hash] opts the optional parameters @option opts [String] :project The UUID of the project @return [Analysis]
# File lib/dependency-tracker-client/api/analysis_api.rb, line 28 def retrieve_analysis(component, vulnerability, opts = {}) data, _status_code, _headers = retrieve_analysis_with_http_info(component, vulnerability, opts) data end
Retrieves an analysis trail @param component [String] The UUID of the component @param vulnerability [String] The UUID of the vulnerability @param [Hash] opts the optional parameters @option opts [String] :project The UUID of the project @return [Array<(Analysis
, Integer, Hash)>] Analysis
data, response status code and response headers
# File lib/dependency-tracker-client/api/analysis_api.rb, line 39 def retrieve_analysis_with_http_info(component, vulnerability, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AnalysisApi.retrieve_analysis ...' end # verify the required parameter 'component' is set if @api_client.config.client_side_validation && component.nil? fail ArgumentError, "Missing the required parameter 'component' when calling AnalysisApi.retrieve_analysis" end # verify the required parameter 'vulnerability' is set if @api_client.config.client_side_validation && vulnerability.nil? fail ArgumentError, "Missing the required parameter 'vulnerability' when calling AnalysisApi.retrieve_analysis" end # resource path local_var_path = '/v1/analysis' # query parameters query_params = opts[:query_params] || {} query_params[:'component'] = component query_params[:'vulnerability'] = vulnerability query_params[:'project'] = opts[:'project'] if !opts[:'project'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Analysis' # auth_names auth_names = opts[:auth_names] || ['X-Api-Key'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AnalysisApi#retrieve_analysis\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Records an analysis decision @param [Hash] opts the optional parameters @option opts [AnalysisRequest] :body @return [Analysis]
# File lib/dependency-tracker-client/api/analysis_api.rb, line 97 def update_analysis(opts = {}) data, _status_code, _headers = update_analysis_with_http_info(opts) data end
Records an analysis decision @param [Hash] opts the optional parameters @option opts [AnalysisRequest] :body @return [Array<(Analysis
, Integer, Hash)>] Analysis
data, response status code and response headers
# File lib/dependency-tracker-client/api/analysis_api.rb, line 106 def update_analysis_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AnalysisApi.update_analysis ...' end # resource path local_var_path = '/v1/analysis' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body']) # return_type return_type = opts[:return_type] || 'Analysis' # auth_names auth_names = opts[:auth_names] || ['X-Api-Key'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AnalysisApi#update_analysis\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Records an analysis decision @param [Hash] opts the optional parameters @option opts [AnalysisRequest] :body @return [Analysis]
# File lib/dependency-tracker-client/api/analysis_api.rb, line 155 def update_global_analysis(opts = {}) data, _status_code, _headers = update_global_analysis_with_http_info(opts) data end
Records an analysis decision @param [Hash] opts the optional parameters @option opts [AnalysisRequest] :body @return [Array<(Analysis
, Integer, Hash)>] Analysis
data, response status code and response headers
# File lib/dependency-tracker-client/api/analysis_api.rb, line 164 def update_global_analysis_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AnalysisApi.update_global_analysis ...' end # resource path local_var_path = '/v1/analysis/global' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body']) # return_type return_type = opts[:return_type] || 'Analysis' # auth_names auth_names = opts[:auth_names] || ['X-Api-Key'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AnalysisApi#update_global_analysis\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end