class PureCloud::AuditApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/purecloudplatformclientv2/api/audit_api.rb, line 23
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

get_audits_query_realtime_servicemapping(opts = {}) click to toggle source

Get service mapping information used in audits.

@param [Hash] opts the optional parameters @return [AuditQueryServiceMapping]

# File lib/purecloudplatformclientv2/api/audit_api.rb, line 31
def get_audits_query_realtime_servicemapping(opts = {})
  data, _status_code, _headers = get_audits_query_realtime_servicemapping_with_http_info(opts)
  return data
end
get_audits_query_realtime_servicemapping_with_http_info(opts = {}) click to toggle source

Get service mapping information used in audits.

@param [Hash] opts the optional parameters @return [Array<(AuditQueryServiceMapping, Fixnum, Hash)>] AuditQueryServiceMapping data, response status code and response headers

# File lib/purecloudplatformclientv2/api/audit_api.rb, line 40
def get_audits_query_realtime_servicemapping_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AuditApi.get_audits_query_realtime_servicemapping ..."
  end
  
  # resource path
  local_var_path = "/api/v2/audits/query/realtime/servicemapping".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud OAuth']
  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 => 'AuditQueryServiceMapping')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuditApi#get_audits_query_realtime_servicemapping\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_audits_query_servicemapping(opts = {}) click to toggle source

Get service mapping information used in audits.

@param [Hash] opts the optional parameters @return [AuditQueryServiceMapping]

# File lib/purecloudplatformclientv2/api/audit_api.rb, line 86
def get_audits_query_servicemapping(opts = {})
  data, _status_code, _headers = get_audits_query_servicemapping_with_http_info(opts)
  return data
end
get_audits_query_servicemapping_with_http_info(opts = {}) click to toggle source

Get service mapping information used in audits.

@param [Hash] opts the optional parameters @return [Array<(AuditQueryServiceMapping, Fixnum, Hash)>] AuditQueryServiceMapping data, response status code and response headers

# File lib/purecloudplatformclientv2/api/audit_api.rb, line 95
def get_audits_query_servicemapping_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AuditApi.get_audits_query_servicemapping ..."
  end
  
  # resource path
  local_var_path = "/api/v2/audits/query/servicemapping".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud OAuth']
  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 => 'AuditQueryServiceMapping')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuditApi#get_audits_query_servicemapping\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_audits_query_transaction_id(transaction_id, opts = {}) click to toggle source

Get status of audit query execution

@param transaction_id Transaction ID @param [Hash] opts the optional parameters @return [AuditQueryExecutionStatusResponse]

# File lib/purecloudplatformclientv2/api/audit_api.rb, line 142
def get_audits_query_transaction_id(transaction_id, opts = {})
  data, _status_code, _headers = get_audits_query_transaction_id_with_http_info(transaction_id, opts)
  return data
end
get_audits_query_transaction_id_results(transaction_id, opts = {}) click to toggle source

Get results of audit query

@param transaction_id Transaction ID @param [Hash] opts the optional parameters @option opts [String] :cursor Indicates where to resume query results (not required for first page) @option opts [Integer] :page_size Page size (default to 25) @option opts [Array<String>] :expand Which fields, if any, to expand @return [AuditQueryExecutionResultsResponse]

# File lib/purecloudplatformclientv2/api/audit_api.rb, line 210
def get_audits_query_transaction_id_results(transaction_id, opts = {})
  data, _status_code, _headers = get_audits_query_transaction_id_results_with_http_info(transaction_id, opts)
  return data
end
get_audits_query_transaction_id_results_with_http_info(transaction_id, opts = {}) click to toggle source

Get results of audit query

@param transaction_id Transaction ID @param [Hash] opts the optional parameters @option opts [String] :cursor Indicates where to resume query results (not required for first page) @option opts [Integer] :page_size Page size @option opts [Array<String>] :expand Which fields, if any, to expand @return [Array<(AuditQueryExecutionResultsResponse, Fixnum, Hash)>] AuditQueryExecutionResultsResponse data, response status code and response headers

# File lib/purecloudplatformclientv2/api/audit_api.rb, line 223
def get_audits_query_transaction_id_results_with_http_info(transaction_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AuditApi.get_audits_query_transaction_id_results ..."
  end
  
  
  # verify the required parameter 'transaction_id' is set
  fail ArgumentError, "Missing the required parameter 'transaction_id' when calling AuditApi.get_audits_query_transaction_id_results" if transaction_id.nil?
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/audits/query/{transactionId}/results".sub('{format}','json').sub('{' + 'transactionId' + '}', transaction_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'cursor'] = opts[:'cursor'] if opts[:'cursor']
  query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size']
  query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand']

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud OAuth']
  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 => 'AuditQueryExecutionResultsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuditApi#get_audits_query_transaction_id_results\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_audits_query_transaction_id_with_http_info(transaction_id, opts = {}) click to toggle source

Get status of audit query execution

@param transaction_id Transaction ID @param [Hash] opts the optional parameters @return [Array<(AuditQueryExecutionStatusResponse, Fixnum, Hash)>] AuditQueryExecutionStatusResponse data, response status code and response headers

# File lib/purecloudplatformclientv2/api/audit_api.rb, line 152
def get_audits_query_transaction_id_with_http_info(transaction_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AuditApi.get_audits_query_transaction_id ..."
  end
  
  
  # verify the required parameter 'transaction_id' is set
  fail ArgumentError, "Missing the required parameter 'transaction_id' when calling AuditApi.get_audits_query_transaction_id" if transaction_id.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/audits/query/{transactionId}".sub('{format}','json').sub('{' + 'transactionId' + '}', transaction_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud OAuth']
  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 => 'AuditQueryExecutionStatusResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuditApi#get_audits_query_transaction_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_audits_query(body, opts = {}) click to toggle source

Create audit query execution

@param body query @param [Hash] opts the optional parameters @return [AuditQueryExecutionStatusResponse]

# File lib/purecloudplatformclientv2/api/audit_api.rb, line 299
def post_audits_query(body, opts = {})
  data, _status_code, _headers = post_audits_query_with_http_info(body, opts)
  return data
end
post_audits_query_realtime(body, opts = {}) click to toggle source

This endpoint will only retrieve 7 days worth of audits for certain services. Please use /query to get a full list and older audits.

@param body query @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand @return [AuditRealtimeQueryResultsResponse]

# File lib/purecloudplatformclientv2/api/audit_api.rb, line 365
def post_audits_query_realtime(body, opts = {})
  data, _status_code, _headers = post_audits_query_realtime_with_http_info(body, opts)
  return data
end
post_audits_query_realtime_with_http_info(body, opts = {}) click to toggle source

This endpoint will only retrieve 7 days worth of audits for certain services. Please use /query to get a full list and older audits.

@param body query @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand @return [Array<(AuditRealtimeQueryResultsResponse, Fixnum, Hash)>] AuditRealtimeQueryResultsResponse data, response status code and response headers

# File lib/purecloudplatformclientv2/api/audit_api.rb, line 376
def post_audits_query_realtime_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AuditApi.post_audits_query_realtime ..."
  end
  
  
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling AuditApi.post_audits_query_realtime" if body.nil?
  
  
  
  
  
  
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/audits/query/realtime".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand']

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['PureCloud OAuth']
  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 => 'AuditRealtimeQueryResultsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuditApi#post_audits_query_realtime\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_audits_query_with_http_info(body, opts = {}) click to toggle source

Create audit query execution

@param body query @param [Hash] opts the optional parameters @return [Array<(AuditQueryExecutionStatusResponse, Fixnum, Hash)>] AuditQueryExecutionStatusResponse data, response status code and response headers

# File lib/purecloudplatformclientv2/api/audit_api.rb, line 309
def post_audits_query_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AuditApi.post_audits_query ..."
  end
  
  
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling AuditApi.post_audits_query" if body.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/audits/query".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['PureCloud OAuth']
  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 => 'AuditQueryExecutionStatusResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuditApi#post_audits_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end