class EmassClient::CACApi
Attributes
Public Class Methods
# File lib/emass_client/api/cac_api.rb, line 16 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Submit control to second role of CAC Adds a Control Approval Chain (CAC) for given ‘systemId` path parameter
POST requests will only yield successful results if the control is currently sitting at the first role of the CAC. If the control is not currently sitting at the first role, then an error will be returned. @param body Update an existing Artifact by Id @param system_id **System Id**: The unique system record identifier. @param [Hash] opts the optional parameters @return [CacResponsePost]
# File lib/emass_client/api/cac_api.rb, line 25 def add_system_cac(body, system_id, opts = {}) data, _status_code, _headers = add_system_cac_with_http_info(body, system_id, opts) data end
Submit control to second role of CAC Adds a Control Approval Chain (CAC) for given `systemId` path parameter<br><br> POST requests will only yield successful results if the control is currently sitting at the first role of the CAC. If the control is not currently sitting at the first role, then an error will be returned. @param body Update an existing Artifact by Id @param system_id **System Id**: The unique system record identifier. @param [Hash] opts the optional parameters @return [Array<(CacResponsePost
, Integer, Hash)>] CacResponsePost
data, response status code and response headers
# File lib/emass_client/api/cac_api.rb, line 36 def add_system_cac_with_http_info(body, system_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CACApi.add_system_cac ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling CACApi.add_system_cac" end # verify the required parameter 'system_id' is set if @api_client.config.client_side_validation && system_id.nil? fail ArgumentError, "Missing the required parameter 'system_id' when calling CACApi.add_system_cac" end # resource path local_var_path = '/api/systems/{systemId}/approval/cac'.sub('{' + 'systemId' + '}', system_id.to_s) # 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(body) return_type = opts[:return_type] || 'CacResponsePost' auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: CACApi#add_system_cac\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get location of one or many controls in CAC Returns the location of a system’s package in the Control Approval Chain (CAC) for matching ‘systemId` path parameter @param system_id **System Id**: The unique system record identifier. @param [Hash] opts the optional parameters @option opts [String] :control_acronyms **System Acronym**: Filter query by given system acronym (single or comma separated). @return [CacResponseGet]
# File lib/emass_client/api/cac_api.rb, line 89 def get_system_cac(system_id, opts = {}) data, _status_code, _headers = get_system_cac_with_http_info(system_id, opts) data end
Get location of one or many controls in CAC Returns the location of a system's package in the Control Approval Chain (CAC) for matching `systemId` path parameter @param system_id **System Id**: The unique system record identifier. @param [Hash] opts the optional parameters @option opts [String] :control_acronyms **System Acronym**: Filter query by given system acronym (single or comma separated). @return [Array<(CacResponseGet
, Integer, Hash)>] CacResponseGet
data, response status code and response headers
# File lib/emass_client/api/cac_api.rb, line 100 def get_system_cac_with_http_info(system_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CACApi.get_system_cac ...' end # verify the required parameter 'system_id' is set if @api_client.config.client_side_validation && system_id.nil? fail ArgumentError, "Missing the required parameter 'system_id' when calling CACApi.get_system_cac" end # resource path local_var_path = '/api/systems/{systemId}/approval/cac'.sub('{' + 'systemId' + '}', system_id.to_s) # query parameters query_params = opts[:query_params] || {} query_params[:'controlAcronyms'] = opts[:'control_acronyms'] if !opts[:'control_acronyms'].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 = opts[:return_type] || 'CacResponseGet' auth_names = opts[:auth_names] || ['apikey', 'mockType', 'userid'] 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 => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: CACApi#get_system_cac\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end