=begin
#Enterprise Mission Assurance Support Service (eMASS)
#The Enterprise Mission Assurance Support Service (eMASS) Representational State Transfer (REST) Application Programming Interface (API) enables users to perform assessments and complete actions associated with system records. The `emasser` is a command-line interface (CLI) tool that implements all of the eMASS endpoints defined in the eMASS REST API v3.2, dated October 21, 2021.
Register CLI New users will need to register an API key with the eMASS development team prior to accessing the site for the first time. The eMASS REST API requires a client certificate (SSL/TLS, DoD PKI only) where {url}/api/register (POST) is used to register the client certificate. Every call to the eMASS REST API will require the use of the agreed upon public key certificate and API key. The API key must be provided in the request header for all endpoint calls (api-key). If the service receives an untrusted certificate or API key, a 401 error response code will be returned along with an error message. Available Request Headers:
key | Example Value | Description |
`api-key` | api-key-provided-by-emass | This API key must be provided in the request header for all endpoint calls |
`user-uid` | USER.UID.KEY | This User unique identifier key must be provided in the request header for all PUT, POST, and DELETE endpoint calls |
| | Note: For DoD users this is the DoD ID Number (EIDIPI) on their DoD CAC |
Approve API Client for Actionable Requests Users are required to log-in to eMASS and grant permissions for a client to update data within eMASS on their behalf. This is only required for actionable requests (PUT, POST, DELETE). The Registration Endpoint and all GET requests can be accessed without completing this process with the correct permissions. Please note that leaving a field parameter blank (for PUT/POST requests) has the potential to clear information in the active eMASS records. To establish an account with eMASS and/or acquire an api-key/user-uid, contact one of the listed POC:
OpenAPI spec version: v3.2
Contact: disa.meade.id.mbx.emass-tier-iii-support@mail.mil
Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 3.0.26
=end
module SwaggerClient
class PACApi
attr_accessor :api_client
def initialize(api_client = ApiClient.default)
@api_client = api_client
end
# Submit system package for review
# Adds a Package Approval Chain (PAC) for given `systemId` path parameter
# @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 [PacResponsePost]
def add_system_pac(body, system_id, opts = {})
data, _status_code, _headers = add_system_pac_with_http_info(body, system_id, opts)
data
end
# Submit system package for review
# Adds a Package Approval Chain (PAC) for given `systemId` path parameter
# @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<(PacResponsePost, Integer, Hash)>] PacResponsePost data, response status code and response headers
def add_system_pac_with_http_info(body, system_id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: PACApi.add_system_pac ...'
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 PACApi.add_system_pac"
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 PACApi.add_system_pac"
end
# resource path
local_var_path = '/api/systems/{systemId}/approval/pac'.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] || 'PacResponsePost'
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: PACApi#add_system_pac\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Get location of system package in PAC
# Returns the location of a system's package in the Package Approval Chain (PAC) for matching `systemId` path parameter
# @param system_id **System Id**: The unique system record identifier.
# @param [Hash] opts the optional parameters
# @return [PacResponseGet]
def get_system_pac(system_id, opts = {})
data, _status_code, _headers = get_system_pac_with_http_info(system_id, opts)
data
end
# Get location of system package in PAC
# Returns the location of a system's package in the Package Approval Chain (PAC) for matching `systemId` path parameter
# @param system_id **System Id**: The unique system record identifier.
# @param [Hash] opts the optional parameters
# @return [Array<(PacResponseGet, Integer, Hash)>] PacResponseGet data, response status code and response headers
def get_system_pac_with_http_info(system_id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: PACApi.get_system_pac ...'
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 PACApi.get_system_pac"
end
# resource path
local_var_path = '/api/systems/{systemId}/approval/pac'.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'])
# form parameters
form_params = opts[:form_params] || {}
# http body (model)
post_body = opts[:body]
return_type = opts[:return_type] || 'PacResponseGet'
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: PACApi#get_system_pac\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
end
end