lib/purecloud/api/analytics_api.rb in purecloud-0.35.1 vs lib/purecloud/api/analytics_api.rb in purecloud-0.36.1

- old
+ new

@@ -1,95 +1,56 @@ +=begin +PureCloud API + +PureCloud API + +OpenAPI spec version: v1 +Contact: chuck.pulfer@inin.com +Generated by: https://github.com/swagger-api/swagger-codegen.git + +License: ININ +http://www.inin.com + +Terms of Service: http://www.inin.com + +=end + require "uri" module PureCloud class AnalyticsApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end - # Query for conversation aggregates + # Delete a scheduled report job. # + # @param schedule_id Schedule ID # @param [Hash] opts the optional parameters - # @option opts [AggregationQuery] :body query - # @return [AggregateQueryResponse] - def post_conversations_aggregates_query(opts = {}) - data, status_code, headers = post_conversations_aggregates_query_with_http_info(opts) + # @return [String] + def delete_reporting_schedules_schedule_id(schedule_id, opts = {}) + data, status_code, headers = delete_reporting_schedules_schedule_id_with_http_info(schedule_id, opts) return data end - # Query for conversation aggregates + # Delete a scheduled report job. # + # @param schedule_id Schedule ID # @param [Hash] opts the optional parameters - # @option opts [AggregationQuery] :body query - # @return [Array<(AggregateQueryResponse, Fixnum, Hash)>] AggregateQueryResponse data, response status code and response headers - def post_conversations_aggregates_query_with_http_info(opts = {}) + # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers + def delete_reporting_schedules_schedule_id_with_http_info(schedule_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: AnalyticsApi#post_conversations_aggregates_query ..." + @api_client.config.logger.debug "Calling API: AnalyticsApi#delete_reporting_schedules_schedule_id ..." end - # resource path - path = "/api/v2/analytics/conversations/aggregates/query".sub('{format}','json') - - # query parameters - query_params = {} - - # header parameters - header_params = {} - - # HTTP header 'Accept' (if needed) - _header_accept = ['application/json'] - _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result - - # HTTP header 'Content-Type' - _header_content_type = ['application/json'] - header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) - - # form parameters - form_params = {} - - # http body (model) - post_body = @api_client.object_to_http_body(opts[:'body']) + # verify the required parameter 'schedule_id' is set + fail "Missing the required parameter 'schedule_id' when calling delete_reporting_schedules_schedule_id" if schedule_id.nil? - - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:POST, path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'AggregateQueryResponse') - if @api_client.config.debugging - @api_client.config.logger.debug "API called: AnalyticsApi#post_conversations_aggregates_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Query for conversation details - # - # @param [Hash] opts the optional parameters - # @option opts [ConversationQuery] :body query - # @return [AnalyticsConversationQueryResponse] - def post_conversations_details_query(opts = {}) - data, status_code, headers = post_conversations_details_query_with_http_info(opts) - return data - end - - # Query for conversation details - # - # @param [Hash] opts the optional parameters - # @option opts [ConversationQuery] :body query - # @return [Array<(AnalyticsConversationQueryResponse, Fixnum, Hash)>] AnalyticsConversationQueryResponse data, response status code and response headers - def post_conversations_details_query_with_http_info(opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: AnalyticsApi#post_conversations_details_query ..." - end - # resource path - path = "/api/v2/analytics/conversations/details/query".sub('{format}','json') + local_var_path = "/api/v2/analytics/reporting/schedules/{scheduleId}".sub('{format}','json').sub('{' + 'scheduleId' + '}', schedule_id.to_s) # query parameters query_params = {} # header parameters @@ -105,23 +66,22 @@ # form parameters form_params = {} # http body (model) - post_body = @api_client.object_to_http_body(opts[:'body']) + post_body = nil - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:POST, path, + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, - :return_type => 'AnalyticsConversationQueryResponse') + :return_type => 'String') if @api_client.config.debugging - @api_client.config.logger.debug "API called: AnalyticsApi#post_conversations_details_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: AnalyticsApi#delete_reporting_schedules_schedule_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a conversation by id @@ -146,11 +106,11 @@ # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling get_conversations_conversation_id_details" if conversation_id.nil? # resource path - path = "/api/v2/analytics/conversations/{conversationId}/details".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s) + local_var_path = "/api/v2/analytics/conversations/{conversationId}/details".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s) # query parameters query_params = {} # header parameters @@ -168,13 +128,12 @@ form_params = {} # http body (model) post_body = nil - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:GET, path, + 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, @@ -183,40 +142,42 @@ @api_client.config.logger.debug "API called: AnalyticsApi#get_conversations_conversation_id_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Index conversation properties + # Get list of reporting metadata. # - # @param conversation_id conversationId # @param [Hash] opts the optional parameters - # @option opts [PropertyIndexRequest] :body request - # @return [PropertyIndexRequest] - def post_conversations_conversation_id_details_properties(conversation_id, opts = {}) - data, status_code, headers = post_conversations_conversation_id_details_properties_with_http_info(conversation_id, opts) + # @option opts [Integer] :page_number Page number (default to 1) + # @option opts [Integer] :page_size Page size (default to 25) + # @option opts [String] :locale Locale + # @return [ReportMetaDataEntityListing] + def get_reporting_metadata(opts = {}) + data, status_code, headers = get_reporting_metadata_with_http_info(opts) return data end - # Index conversation properties + # Get list of reporting metadata. # - # @param conversation_id conversationId # @param [Hash] opts the optional parameters - # @option opts [PropertyIndexRequest] :body request - # @return [Array<(PropertyIndexRequest, Fixnum, Hash)>] PropertyIndexRequest data, response status code and response headers - def post_conversations_conversation_id_details_properties_with_http_info(conversation_id, opts = {}) + # @option opts [Integer] :page_number Page number + # @option opts [Integer] :page_size Page size + # @option opts [String] :locale Locale + # @return [Array<(ReportMetaDataEntityListing, Fixnum, Hash)>] ReportMetaDataEntityListing data, response status code and response headers + def get_reporting_metadata_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: AnalyticsApi#post_conversations_conversation_id_details_properties ..." + @api_client.config.logger.debug "Calling API: AnalyticsApi#get_reporting_metadata ..." end - # verify the required parameter 'conversation_id' is set - fail "Missing the required parameter 'conversation_id' when calling post_conversations_conversation_id_details_properties" if conversation_id.nil? - # resource path - path = "/api/v2/analytics/conversations/{conversationId}/details/properties".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s) + local_var_path = "/api/v2/analytics/reporting/metadata".sub('{format}','json') # query parameters query_params = {} + query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] + query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] + query_params[:'locale'] = opts[:'locale'] if opts[:'locale'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) @@ -229,52 +190,57 @@ # form parameters form_params = {} # http body (model) - post_body = @api_client.object_to_http_body(opts[:'body']) + post_body = nil - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:POST, path, + 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 => 'PropertyIndexRequest') + :return_type => 'ReportMetaDataEntityListing') if @api_client.config.debugging - @api_client.config.logger.debug "API called: AnalyticsApi#post_conversations_conversation_id_details_properties\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: AnalyticsApi#get_reporting_metadata\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Query for evaluation aggregates + # Get a reporting metadata. # + # @param report_id Report ID # @param [Hash] opts the optional parameters - # @option opts [AggregationQuery] :body query - # @return [AggregateQueryResponse] - def post_evaluations_aggregates_query(opts = {}) - data, status_code, headers = post_evaluations_aggregates_query_with_http_info(opts) + # @option opts [String] :locale Locale + # @return [ReportMetaData] + def get_reporting_report_id_metadata(report_id, opts = {}) + data, status_code, headers = get_reporting_report_id_metadata_with_http_info(report_id, opts) return data end - # Query for evaluation aggregates + # Get a reporting metadata. # + # @param report_id Report ID # @param [Hash] opts the optional parameters - # @option opts [AggregationQuery] :body query - # @return [Array<(AggregateQueryResponse, Fixnum, Hash)>] AggregateQueryResponse data, response status code and response headers - def post_evaluations_aggregates_query_with_http_info(opts = {}) + # @option opts [String] :locale Locale + # @return [Array<(ReportMetaData, Fixnum, Hash)>] ReportMetaData data, response status code and response headers + def get_reporting_report_id_metadata_with_http_info(report_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: AnalyticsApi#post_evaluations_aggregates_query ..." + @api_client.config.logger.debug "Calling API: AnalyticsApi#get_reporting_report_id_metadata ..." end + # verify the required parameter 'report_id' is set + fail "Missing the required parameter 'report_id' when calling get_reporting_report_id_metadata" if report_id.nil? + # resource path - path = "/api/v2/analytics/evaluations/aggregates/query".sub('{format}','json') + local_var_path = "/api/v2/analytics/reporting/{reportId}/metadata".sub('{format}','json').sub('{' + 'reportId' + '}', report_id.to_s) # query parameters query_params = {} + query_params[:'locale'] = opts[:'locale'] if opts[:'locale'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) @@ -287,49 +253,46 @@ # form parameters form_params = {} # http body (model) - post_body = @api_client.object_to_http_body(opts[:'body']) + post_body = nil - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:POST, path, + 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 => 'AggregateQueryResponse') + :return_type => 'ReportMetaData') if @api_client.config.debugging - @api_client.config.logger.debug "API called: AnalyticsApi#post_evaluations_aggregates_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: AnalyticsApi#get_reporting_report_id_metadata\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Query for queue observations - # + # Get a list of report formats + # Get a list of report formats. # @param [Hash] opts the optional parameters - # @option opts [ObservationQuery] :body query - # @return [ObservationQueryResponse] - def post_queues_observations_query(opts = {}) - data, status_code, headers = post_queues_observations_query_with_http_info(opts) + # @return [Array<String>] + def get_reporting_reportformats(opts = {}) + data, status_code, headers = get_reporting_reportformats_with_http_info(opts) return data end - # Query for queue observations - # + # Get a list of report formats + # Get a list of report formats. # @param [Hash] opts the optional parameters - # @option opts [ObservationQuery] :body query - # @return [Array<(ObservationQueryResponse, Fixnum, Hash)>] ObservationQueryResponse data, response status code and response headers - def post_queues_observations_query_with_http_info(opts = {}) + # @return [Array<(Array<String>, Fixnum, Hash)>] Array<String> data, response status code and response headers + def get_reporting_reportformats_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: AnalyticsApi#post_queues_observations_query ..." + @api_client.config.logger.debug "Calling API: AnalyticsApi#get_reporting_reportformats ..." end # resource path - path = "/api/v2/analytics/queues/observations/query".sub('{format}','json') + local_var_path = "/api/v2/analytics/reporting/reportformats".sub('{format}','json') # query parameters query_params = {} # header parameters @@ -345,59 +308,55 @@ # form parameters form_params = {} # http body (model) - post_body = @api_client.object_to_http_body(opts[:'body']) + post_body = nil - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:POST, path, + 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 => 'ObservationQueryResponse') + :return_type => 'Array<String>') if @api_client.config.debugging - @api_client.config.logger.debug "API called: AnalyticsApi#post_queues_observations_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: AnalyticsApi#get_reporting_reportformats\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get list of reporting metadata. - # + # Get a list of scheduled report jobs + # Get a list of scheduled report jobs. # @param [Hash] opts the optional parameters - # @option opts [Integer] :page_number Page number - # @option opts [Integer] :page_size Page size - # @option opts [String] :locale Locale - # @return [ReportMetaDataEntityListing] - def get_reporting_metadata(opts = {}) - data, status_code, headers = get_reporting_metadata_with_http_info(opts) + # @option opts [Integer] :page_number Page number (default to 1) + # @option opts [Integer] :page_size Page size (default to 25) + # @return [ReportScheduleEntityListing] + def get_reporting_schedules(opts = {}) + data, status_code, headers = get_reporting_schedules_with_http_info(opts) return data end - # Get list of reporting metadata. - # + # Get a list of scheduled report jobs + # Get a list of scheduled report jobs. # @param [Hash] opts the optional parameters # @option opts [Integer] :page_number Page number # @option opts [Integer] :page_size Page size - # @option opts [String] :locale Locale - # @return [Array<(ReportMetaDataEntityListing, Fixnum, Hash)>] ReportMetaDataEntityListing data, response status code and response headers - def get_reporting_metadata_with_http_info(opts = {}) + # @return [Array<(ReportScheduleEntityListing, Fixnum, Hash)>] ReportScheduleEntityListing data, response status code and response headers + def get_reporting_schedules_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: AnalyticsApi#get_reporting_metadata ..." + @api_client.config.logger.debug "Calling API: AnalyticsApi#get_reporting_schedules ..." end # resource path - path = "/api/v2/analytics/reporting/metadata".sub('{format}','json') + local_var_path = "/api/v2/analytics/reporting/schedules".sub('{format}','json') # query parameters query_params = {} query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] - query_params[:'locale'] = opts[:'locale'] if opts[:'locale'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) @@ -412,45 +371,49 @@ form_params = {} # http body (model) post_body = nil - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:GET, path, + 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 => 'ReportMetaDataEntityListing') + :return_type => 'ReportScheduleEntityListing') if @api_client.config.debugging - @api_client.config.logger.debug "API called: AnalyticsApi#get_reporting_metadata\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: AnalyticsApi#get_reporting_schedules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get a list of report formats - # Get a list of report formats. + # Get a scheduled report job. + # + # @param schedule_id Schedule ID # @param [Hash] opts the optional parameters - # @return [Array<String>] - def get_reporting_reportformats(opts = {}) - data, status_code, headers = get_reporting_reportformats_with_http_info(opts) + # @return [ReportSchedule] + def get_reporting_schedules_schedule_id(schedule_id, opts = {}) + data, status_code, headers = get_reporting_schedules_schedule_id_with_http_info(schedule_id, opts) return data end - # Get a list of report formats - # Get a list of report formats. + # Get a scheduled report job. + # + # @param schedule_id Schedule ID # @param [Hash] opts the optional parameters - # @return [Array<(Array<String>, Fixnum, Hash)>] Array<String> data, response status code and response headers - def get_reporting_reportformats_with_http_info(opts = {}) + # @return [Array<(ReportSchedule, Fixnum, Hash)>] ReportSchedule data, response status code and response headers + def get_reporting_schedules_schedule_id_with_http_info(schedule_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: AnalyticsApi#get_reporting_reportformats ..." + @api_client.config.logger.debug "Calling API: AnalyticsApi#get_reporting_schedules_schedule_id ..." end + # verify the required parameter 'schedule_id' is set + fail "Missing the required parameter 'schedule_id' when calling get_reporting_schedules_schedule_id" if schedule_id.nil? + # resource path - path = "/api/v2/analytics/reporting/reportformats".sub('{format}','json') + local_var_path = "/api/v2/analytics/reporting/schedules/{scheduleId}".sub('{format}','json').sub('{' + 'scheduleId' + '}', schedule_id.to_s) # query parameters query_params = {} # header parameters @@ -468,49 +431,53 @@ form_params = {} # http body (model) post_body = nil - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:GET, path, + 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 => 'Array<String>') + :return_type => 'ReportSchedule') if @api_client.config.debugging - @api_client.config.logger.debug "API called: AnalyticsApi#get_reporting_reportformats\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: AnalyticsApi#get_reporting_schedules_schedule_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get a list of scheduled report jobs - # Get a list of scheduled report jobs. + # Get list of completed scheduled report jobs. + # + # @param schedule_id Schedule ID # @param [Hash] opts the optional parameters - # @option opts [Integer] :page_number Page number - # @option opts [Integer] :page_size Page size - # @return [ReportScheduleEntityListing] - def get_reporting_schedules(opts = {}) - data, status_code, headers = get_reporting_schedules_with_http_info(opts) + # @option opts [Integer] :page_number (default to 1) + # @option opts [Integer] :page_size (default to 25) + # @return [ReportRunEntryEntityDomainListing] + def get_reporting_schedules_schedule_id_history(schedule_id, opts = {}) + data, status_code, headers = get_reporting_schedules_schedule_id_history_with_http_info(schedule_id, opts) return data end - # Get a list of scheduled report jobs - # Get a list of scheduled report jobs. + # Get list of completed scheduled report jobs. + # + # @param schedule_id Schedule ID # @param [Hash] opts the optional parameters - # @option opts [Integer] :page_number Page number - # @option opts [Integer] :page_size Page size - # @return [Array<(ReportScheduleEntityListing, Fixnum, Hash)>] ReportScheduleEntityListing data, response status code and response headers - def get_reporting_schedules_with_http_info(opts = {}) + # @option opts [Integer] :page_number + # @option opts [Integer] :page_size + # @return [Array<(ReportRunEntryEntityDomainListing, Fixnum, Hash)>] ReportRunEntryEntityDomainListing data, response status code and response headers + def get_reporting_schedules_schedule_id_history_with_http_info(schedule_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: AnalyticsApi#get_reporting_schedules ..." + @api_client.config.logger.debug "Calling API: AnalyticsApi#get_reporting_schedules_schedule_id_history ..." end + # verify the required parameter 'schedule_id' is set + fail "Missing the required parameter 'schedule_id' when calling get_reporting_schedules_schedule_id_history" if schedule_id.nil? + # resource path - path = "/api/v2/analytics/reporting/schedules".sub('{format}','json') + local_var_path = "/api/v2/analytics/reporting/schedules/{scheduleId}/history".sub('{format}','json').sub('{' + 'scheduleId' + '}', schedule_id.to_s) # query parameters query_params = {} query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] @@ -530,47 +497,49 @@ form_params = {} # http body (model) post_body = nil - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:GET, path, + 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 => 'ReportScheduleEntityListing') + :return_type => 'ReportRunEntryEntityDomainListing') if @api_client.config.debugging - @api_client.config.logger.debug "API called: AnalyticsApi#get_reporting_schedules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: AnalyticsApi#get_reporting_schedules_schedule_id_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create a scheduled report job - # Create a scheduled report job. + # Get most recently completed scheduled report job. + # + # @param schedule_id Schedule ID # @param [Hash] opts the optional parameters - # @option opts [ReportSchedule] :body ReportSchedule - # @return [ReportSchedule] - def post_reporting_schedules(opts = {}) - data, status_code, headers = post_reporting_schedules_with_http_info(opts) + # @return [ReportRunEntry] + def get_reporting_schedules_schedule_id_history_latest(schedule_id, opts = {}) + data, status_code, headers = get_reporting_schedules_schedule_id_history_latest_with_http_info(schedule_id, opts) return data end - # Create a scheduled report job - # Create a scheduled report job. + # Get most recently completed scheduled report job. + # + # @param schedule_id Schedule ID # @param [Hash] opts the optional parameters - # @option opts [ReportSchedule] :body ReportSchedule - # @return [Array<(ReportSchedule, Fixnum, Hash)>] ReportSchedule data, response status code and response headers - def post_reporting_schedules_with_http_info(opts = {}) + # @return [Array<(ReportRunEntry, Fixnum, Hash)>] ReportRunEntry data, response status code and response headers + def get_reporting_schedules_schedule_id_history_latest_with_http_info(schedule_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: AnalyticsApi#post_reporting_schedules ..." + @api_client.config.logger.debug "Calling API: AnalyticsApi#get_reporting_schedules_schedule_id_history_latest ..." end + # verify the required parameter 'schedule_id' is set + fail "Missing the required parameter 'schedule_id' when calling get_reporting_schedules_schedule_id_history_latest" if schedule_id.nil? + # resource path - path = "/api/v2/analytics/reporting/schedules".sub('{format}','json') + local_var_path = "/api/v2/analytics/reporting/schedules/{scheduleId}/history/latest".sub('{format}','json').sub('{' + 'scheduleId' + '}', schedule_id.to_s) # query parameters query_params = {} # header parameters @@ -586,52 +555,56 @@ # form parameters form_params = {} # http body (model) - post_body = @api_client.object_to_http_body(opts[:'body']) + post_body = nil - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:POST, path, + 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 => 'ReportSchedule') + :return_type => 'ReportRunEntry') if @api_client.config.debugging - @api_client.config.logger.debug "API called: AnalyticsApi#post_reporting_schedules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: AnalyticsApi#get_reporting_schedules_schedule_id_history_latest\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get a scheduled report job. - # + # A completed scheduled report job + # A completed scheduled report job. + # @param run_id Run ID # @param schedule_id Schedule ID # @param [Hash] opts the optional parameters - # @return [ReportSchedule] - def get_reporting_schedules_schedule_id(schedule_id, opts = {}) - data, status_code, headers = get_reporting_schedules_schedule_id_with_http_info(schedule_id, opts) + # @return [ReportRunEntry] + def get_reporting_schedules_schedule_id_history_run_id(run_id, schedule_id, opts = {}) + data, status_code, headers = get_reporting_schedules_schedule_id_history_run_id_with_http_info(run_id, schedule_id, opts) return data end - # Get a scheduled report job. - # + # A completed scheduled report job + # A completed scheduled report job. + # @param run_id Run ID # @param schedule_id Schedule ID # @param [Hash] opts the optional parameters - # @return [Array<(ReportSchedule, Fixnum, Hash)>] ReportSchedule data, response status code and response headers - def get_reporting_schedules_schedule_id_with_http_info(schedule_id, opts = {}) + # @return [Array<(ReportRunEntry, Fixnum, Hash)>] ReportRunEntry data, response status code and response headers + def get_reporting_schedules_schedule_id_history_run_id_with_http_info(run_id, schedule_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: AnalyticsApi#get_reporting_schedules_schedule_id ..." + @api_client.config.logger.debug "Calling API: AnalyticsApi#get_reporting_schedules_schedule_id_history_run_id ..." end + # verify the required parameter 'run_id' is set + fail "Missing the required parameter 'run_id' when calling get_reporting_schedules_schedule_id_history_run_id" if run_id.nil? + # verify the required parameter 'schedule_id' is set - fail "Missing the required parameter 'schedule_id' when calling get_reporting_schedules_schedule_id" if schedule_id.nil? + fail "Missing the required parameter 'schedule_id' when calling get_reporting_schedules_schedule_id_history_run_id" if schedule_id.nil? # resource path - path = "/api/v2/analytics/reporting/schedules/{scheduleId}".sub('{format}','json').sub('{' + 'scheduleId' + '}', schedule_id.to_s) + local_var_path = "/api/v2/analytics/reporting/schedules/{scheduleId}/history/{runId}".sub('{format}','json').sub('{' + 'runId' + '}', run_id.to_s).sub('{' + 'scheduleId' + '}', schedule_id.to_s) # query parameters query_params = {} # header parameters @@ -649,52 +622,44 @@ form_params = {} # http body (model) post_body = nil - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:GET, path, + 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 => 'ReportSchedule') + :return_type => 'ReportRunEntry') if @api_client.config.debugging - @api_client.config.logger.debug "API called: AnalyticsApi#get_reporting_schedules_schedule_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: AnalyticsApi#get_reporting_schedules_schedule_id_history_run_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update a scheduled report job. + # Get a list of report time periods. # - # @param schedule_id Schedule ID # @param [Hash] opts the optional parameters - # @option opts [ReportSchedule] :body ReportSchedule - # @return [ReportSchedule] - def put_reporting_schedules_schedule_id(schedule_id, opts = {}) - data, status_code, headers = put_reporting_schedules_schedule_id_with_http_info(schedule_id, opts) + # @return [Array<String>] + def get_reporting_timeperiods(opts = {}) + data, status_code, headers = get_reporting_timeperiods_with_http_info(opts) return data end - # Update a scheduled report job. + # Get a list of report time periods. # - # @param schedule_id Schedule ID # @param [Hash] opts the optional parameters - # @option opts [ReportSchedule] :body ReportSchedule - # @return [Array<(ReportSchedule, Fixnum, Hash)>] ReportSchedule data, response status code and response headers - def put_reporting_schedules_schedule_id_with_http_info(schedule_id, opts = {}) + # @return [Array<(Array<String>, Fixnum, Hash)>] Array<String> data, response status code and response headers + def get_reporting_timeperiods_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: AnalyticsApi#put_reporting_schedules_schedule_id ..." + @api_client.config.logger.debug "Calling API: AnalyticsApi#get_reporting_timeperiods ..." end - # verify the required parameter 'schedule_id' is set - fail "Missing the required parameter 'schedule_id' when calling put_reporting_schedules_schedule_id" if schedule_id.nil? - # resource path - path = "/api/v2/analytics/reporting/schedules/{scheduleId}".sub('{format}','json').sub('{' + 'scheduleId' + '}', schedule_id.to_s) + local_var_path = "/api/v2/analytics/reporting/timeperiods".sub('{format}','json') # query parameters query_params = {} # header parameters @@ -710,52 +675,48 @@ # form parameters form_params = {} # http body (model) - post_body = @api_client.object_to_http_body(opts[:'body']) + post_body = nil - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:PUT, path, + 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 => 'ReportSchedule') + :return_type => 'Array<String>') if @api_client.config.debugging - @api_client.config.logger.debug "API called: AnalyticsApi#put_reporting_schedules_schedule_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: AnalyticsApi#get_reporting_timeperiods\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Delete a scheduled report job. + # Query for conversation aggregates # - # @param schedule_id Schedule ID # @param [Hash] opts the optional parameters - # @return [String] - def delete_reporting_schedules_schedule_id(schedule_id, opts = {}) - data, status_code, headers = delete_reporting_schedules_schedule_id_with_http_info(schedule_id, opts) + # @option opts [AggregationQuery] :body query + # @return [AggregateQueryResponse] + def post_conversations_aggregates_query(opts = {}) + data, status_code, headers = post_conversations_aggregates_query_with_http_info(opts) return data end - # Delete a scheduled report job. + # Query for conversation aggregates # - # @param schedule_id Schedule ID # @param [Hash] opts the optional parameters - # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers - def delete_reporting_schedules_schedule_id_with_http_info(schedule_id, opts = {}) + # @option opts [AggregationQuery] :body query + # @return [Array<(AggregateQueryResponse, Fixnum, Hash)>] AggregateQueryResponse data, response status code and response headers + def post_conversations_aggregates_query_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: AnalyticsApi#delete_reporting_schedules_schedule_id ..." + @api_client.config.logger.debug "Calling API: AnalyticsApi#post_conversations_aggregates_query ..." end - # verify the required parameter 'schedule_id' is set - fail "Missing the required parameter 'schedule_id' when calling delete_reporting_schedules_schedule_id" if schedule_id.nil? - # resource path - path = "/api/v2/analytics/reporting/schedules/{scheduleId}".sub('{format}','json').sub('{' + 'scheduleId' + '}', schedule_id.to_s) + local_var_path = "/api/v2/analytics/conversations/aggregates/query".sub('{format}','json') # query parameters query_params = {} # header parameters @@ -771,61 +732,56 @@ # form parameters form_params = {} # http body (model) - post_body = nil + post_body = @api_client.object_to_http_body(opts[:'body']) - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:DELETE, path, + 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 => 'String') + :return_type => 'AggregateQueryResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: AnalyticsApi#delete_reporting_schedules_schedule_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: AnalyticsApi#post_conversations_aggregates_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get list of completed scheduled report jobs. + # Index conversation properties # - # @param schedule_id Schedule ID + # @param conversation_id conversationId # @param [Hash] opts the optional parameters - # @option opts [Integer] :page_number - # @option opts [Integer] :page_size - # @return [ReportRunEntryEntityDomainListing] - def get_reporting_schedules_schedule_id_history(schedule_id, opts = {}) - data, status_code, headers = get_reporting_schedules_schedule_id_history_with_http_info(schedule_id, opts) + # @option opts [PropertyIndexRequest] :body request + # @return [PropertyIndexRequest] + def post_conversations_conversation_id_details_properties(conversation_id, opts = {}) + data, status_code, headers = post_conversations_conversation_id_details_properties_with_http_info(conversation_id, opts) return data end - # Get list of completed scheduled report jobs. + # Index conversation properties # - # @param schedule_id Schedule ID + # @param conversation_id conversationId # @param [Hash] opts the optional parameters - # @option opts [Integer] :page_number - # @option opts [Integer] :page_size - # @return [Array<(ReportRunEntryEntityDomainListing, Fixnum, Hash)>] ReportRunEntryEntityDomainListing data, response status code and response headers - def get_reporting_schedules_schedule_id_history_with_http_info(schedule_id, opts = {}) + # @option opts [PropertyIndexRequest] :body request + # @return [Array<(PropertyIndexRequest, Fixnum, Hash)>] PropertyIndexRequest data, response status code and response headers + def post_conversations_conversation_id_details_properties_with_http_info(conversation_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: AnalyticsApi#get_reporting_schedules_schedule_id_history ..." + @api_client.config.logger.debug "Calling API: AnalyticsApi#post_conversations_conversation_id_details_properties ..." end - # verify the required parameter 'schedule_id' is set - fail "Missing the required parameter 'schedule_id' when calling get_reporting_schedules_schedule_id_history" if schedule_id.nil? + # verify the required parameter 'conversation_id' is set + fail "Missing the required parameter 'conversation_id' when calling post_conversations_conversation_id_details_properties" if conversation_id.nil? # resource path - path = "/api/v2/analytics/reporting/schedules/{scheduleId}/history".sub('{format}','json').sub('{' + 'scheduleId' + '}', schedule_id.to_s) + local_var_path = "/api/v2/analytics/conversations/{conversationId}/details/properties".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s) # query parameters query_params = {} - query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] - query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) @@ -838,52 +794,48 @@ # form parameters form_params = {} # http body (model) - post_body = nil + post_body = @api_client.object_to_http_body(opts[:'body']) - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:GET, path, + 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 => 'ReportRunEntryEntityDomainListing') + :return_type => 'PropertyIndexRequest') if @api_client.config.debugging - @api_client.config.logger.debug "API called: AnalyticsApi#get_reporting_schedules_schedule_id_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: AnalyticsApi#post_conversations_conversation_id_details_properties\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get most recently completed scheduled report job. + # Query for conversation details # - # @param schedule_id Schedule ID # @param [Hash] opts the optional parameters - # @return [ReportRunEntry] - def get_reporting_schedules_schedule_id_history_latest(schedule_id, opts = {}) - data, status_code, headers = get_reporting_schedules_schedule_id_history_latest_with_http_info(schedule_id, opts) + # @option opts [ConversationQuery] :body query + # @return [AnalyticsConversationQueryResponse] + def post_conversations_details_query(opts = {}) + data, status_code, headers = post_conversations_details_query_with_http_info(opts) return data end - # Get most recently completed scheduled report job. + # Query for conversation details # - # @param schedule_id Schedule ID # @param [Hash] opts the optional parameters - # @return [Array<(ReportRunEntry, Fixnum, Hash)>] ReportRunEntry data, response status code and response headers - def get_reporting_schedules_schedule_id_history_latest_with_http_info(schedule_id, opts = {}) + # @option opts [ConversationQuery] :body query + # @return [Array<(AnalyticsConversationQueryResponse, Fixnum, Hash)>] AnalyticsConversationQueryResponse data, response status code and response headers + def post_conversations_details_query_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: AnalyticsApi#get_reporting_schedules_schedule_id_history_latest ..." + @api_client.config.logger.debug "Calling API: AnalyticsApi#post_conversations_details_query ..." end - # verify the required parameter 'schedule_id' is set - fail "Missing the required parameter 'schedule_id' when calling get_reporting_schedules_schedule_id_history_latest" if schedule_id.nil? - # resource path - path = "/api/v2/analytics/reporting/schedules/{scheduleId}/history/latest".sub('{format}','json').sub('{' + 'scheduleId' + '}', schedule_id.to_s) + local_var_path = "/api/v2/analytics/conversations/details/query".sub('{format}','json') # query parameters query_params = {} # header parameters @@ -899,57 +851,48 @@ # form parameters form_params = {} # http body (model) - post_body = nil + post_body = @api_client.object_to_http_body(opts[:'body']) - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:GET, path, + 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 => 'ReportRunEntry') + :return_type => 'AnalyticsConversationQueryResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: AnalyticsApi#get_reporting_schedules_schedule_id_history_latest\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: AnalyticsApi#post_conversations_details_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # A completed scheduled report job - # A completed scheduled report job. - # @param run_id Run ID - # @param schedule_id Schedule ID + # Query for evaluation aggregates + # # @param [Hash] opts the optional parameters - # @return [ReportRunEntry] - def get_reporting_schedules_schedule_id_history_run_id(run_id, schedule_id, opts = {}) - data, status_code, headers = get_reporting_schedules_schedule_id_history_run_id_with_http_info(run_id, schedule_id, opts) + # @option opts [AggregationQuery] :body query + # @return [AggregateQueryResponse] + def post_evaluations_aggregates_query(opts = {}) + data, status_code, headers = post_evaluations_aggregates_query_with_http_info(opts) return data end - # A completed scheduled report job - # A completed scheduled report job. - # @param run_id Run ID - # @param schedule_id Schedule ID + # Query for evaluation aggregates + # # @param [Hash] opts the optional parameters - # @return [Array<(ReportRunEntry, Fixnum, Hash)>] ReportRunEntry data, response status code and response headers - def get_reporting_schedules_schedule_id_history_run_id_with_http_info(run_id, schedule_id, opts = {}) + # @option opts [AggregationQuery] :body query + # @return [Array<(AggregateQueryResponse, Fixnum, Hash)>] AggregateQueryResponse data, response status code and response headers + def post_evaluations_aggregates_query_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: AnalyticsApi#get_reporting_schedules_schedule_id_history_run_id ..." + @api_client.config.logger.debug "Calling API: AnalyticsApi#post_evaluations_aggregates_query ..." end - # verify the required parameter 'run_id' is set - fail "Missing the required parameter 'run_id' when calling get_reporting_schedules_schedule_id_history_run_id" if run_id.nil? - - # verify the required parameter 'schedule_id' is set - fail "Missing the required parameter 'schedule_id' when calling get_reporting_schedules_schedule_id_history_run_id" if schedule_id.nil? - # resource path - path = "/api/v2/analytics/reporting/schedules/{scheduleId}/history/{runId}".sub('{format}','json').sub('{' + 'runId' + '}', run_id.to_s).sub('{' + 'scheduleId' + '}', schedule_id.to_s) + local_var_path = "/api/v2/analytics/evaluations/aggregates/query".sub('{format}','json') # query parameters query_params = {} # header parameters @@ -965,52 +908,48 @@ # form parameters form_params = {} # http body (model) - post_body = nil + post_body = @api_client.object_to_http_body(opts[:'body']) - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:GET, path, + 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 => 'ReportRunEntry') + :return_type => 'AggregateQueryResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: AnalyticsApi#get_reporting_schedules_schedule_id_history_run_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: AnalyticsApi#post_evaluations_aggregates_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Place a scheduled report immediately into the reporting queue + # Query for queue observations # - # @param schedule_id Schedule ID # @param [Hash] opts the optional parameters - # @return [RunNowResponse] - def post_reporting_schedules_schedule_id_runreport(schedule_id, opts = {}) - data, status_code, headers = post_reporting_schedules_schedule_id_runreport_with_http_info(schedule_id, opts) + # @option opts [ObservationQuery] :body query + # @return [ObservationQueryResponse] + def post_queues_observations_query(opts = {}) + data, status_code, headers = post_queues_observations_query_with_http_info(opts) return data end - # Place a scheduled report immediately into the reporting queue + # Query for queue observations # - # @param schedule_id Schedule ID # @param [Hash] opts the optional parameters - # @return [Array<(RunNowResponse, Fixnum, Hash)>] RunNowResponse data, response status code and response headers - def post_reporting_schedules_schedule_id_runreport_with_http_info(schedule_id, opts = {}) + # @option opts [ObservationQuery] :body query + # @return [Array<(ObservationQueryResponse, Fixnum, Hash)>] ObservationQueryResponse data, response status code and response headers + def post_queues_observations_query_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: AnalyticsApi#post_reporting_schedules_schedule_id_runreport ..." + @api_client.config.logger.debug "Calling API: AnalyticsApi#post_queues_observations_query ..." end - # verify the required parameter 'schedule_id' is set - fail "Missing the required parameter 'schedule_id' when calling post_reporting_schedules_schedule_id_runreport" if schedule_id.nil? - # resource path - path = "/api/v2/analytics/reporting/schedules/{scheduleId}/runreport".sub('{format}','json').sub('{' + 'scheduleId' + '}', schedule_id.to_s) + local_var_path = "/api/v2/analytics/queues/observations/query".sub('{format}','json') # query parameters query_params = {} # header parameters @@ -1026,47 +965,48 @@ # form parameters form_params = {} # http body (model) - post_body = nil + post_body = @api_client.object_to_http_body(opts[:'body']) - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:POST, path, + 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 => 'RunNowResponse') + :return_type => 'ObservationQueryResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: AnalyticsApi#post_reporting_schedules_schedule_id_runreport\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: AnalyticsApi#post_queues_observations_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get a list of report time periods. - # + # Create a scheduled report job + # Create a scheduled report job. # @param [Hash] opts the optional parameters - # @return [Array<String>] - def get_reporting_timeperiods(opts = {}) - data, status_code, headers = get_reporting_timeperiods_with_http_info(opts) + # @option opts [ReportSchedule] :body ReportSchedule + # @return [ReportSchedule] + def post_reporting_schedules(opts = {}) + data, status_code, headers = post_reporting_schedules_with_http_info(opts) return data end - # Get a list of report time periods. - # + # Create a scheduled report job + # Create a scheduled report job. # @param [Hash] opts the optional parameters - # @return [Array<(Array<String>, Fixnum, Hash)>] Array<String> data, response status code and response headers - def get_reporting_timeperiods_with_http_info(opts = {}) + # @option opts [ReportSchedule] :body ReportSchedule + # @return [Array<(ReportSchedule, Fixnum, Hash)>] ReportSchedule data, response status code and response headers + def post_reporting_schedules_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: AnalyticsApi#get_reporting_timeperiods ..." + @api_client.config.logger.debug "Calling API: AnalyticsApi#post_reporting_schedules ..." end # resource path - path = "/api/v2/analytics/reporting/timeperiods".sub('{format}','json') + local_var_path = "/api/v2/analytics/reporting/schedules".sub('{format}','json') # query parameters query_params = {} # header parameters @@ -1082,58 +1022,54 @@ # form parameters form_params = {} # http body (model) - post_body = nil + post_body = @api_client.object_to_http_body(opts[:'body']) - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:GET, path, + 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 => 'Array<String>') + :return_type => 'ReportSchedule') if @api_client.config.debugging - @api_client.config.logger.debug "API called: AnalyticsApi#get_reporting_timeperiods\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: AnalyticsApi#post_reporting_schedules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get a reporting metadata. + # Place a scheduled report immediately into the reporting queue # - # @param report_id Report ID + # @param schedule_id Schedule ID # @param [Hash] opts the optional parameters - # @option opts [String] :locale Locale - # @return [ReportMetaData] - def get_reporting_report_id_metadata(report_id, opts = {}) - data, status_code, headers = get_reporting_report_id_metadata_with_http_info(report_id, opts) + # @return [RunNowResponse] + def post_reporting_schedules_schedule_id_runreport(schedule_id, opts = {}) + data, status_code, headers = post_reporting_schedules_schedule_id_runreport_with_http_info(schedule_id, opts) return data end - # Get a reporting metadata. + # Place a scheduled report immediately into the reporting queue # - # @param report_id Report ID + # @param schedule_id Schedule ID # @param [Hash] opts the optional parameters - # @option opts [String] :locale Locale - # @return [Array<(ReportMetaData, Fixnum, Hash)>] ReportMetaData data, response status code and response headers - def get_reporting_report_id_metadata_with_http_info(report_id, opts = {}) + # @return [Array<(RunNowResponse, Fixnum, Hash)>] RunNowResponse data, response status code and response headers + def post_reporting_schedules_schedule_id_runreport_with_http_info(schedule_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: AnalyticsApi#get_reporting_report_id_metadata ..." + @api_client.config.logger.debug "Calling API: AnalyticsApi#post_reporting_schedules_schedule_id_runreport ..." end - # verify the required parameter 'report_id' is set - fail "Missing the required parameter 'report_id' when calling get_reporting_report_id_metadata" if report_id.nil? + # verify the required parameter 'schedule_id' is set + fail "Missing the required parameter 'schedule_id' when calling post_reporting_schedules_schedule_id_runreport" if schedule_id.nil? # resource path - path = "/api/v2/analytics/reporting/{reportId}/metadata".sub('{format}','json').sub('{' + 'reportId' + '}', report_id.to_s) + local_var_path = "/api/v2/analytics/reporting/schedules/{scheduleId}/runreport".sub('{format}','json').sub('{' + 'scheduleId' + '}', schedule_id.to_s) # query parameters query_params = {} - query_params[:'locale'] = opts[:'locale'] if opts[:'locale'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) @@ -1148,21 +1084,20 @@ form_params = {} # http body (model) post_body = nil - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:GET, path, + 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 => 'ReportMetaData') + :return_type => 'RunNowResponse') if @api_client.config.debugging - @api_client.config.logger.debug "API called: AnalyticsApi#get_reporting_report_id_metadata\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: AnalyticsApi#post_reporting_schedules_schedule_id_runreport\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Query for user aggregates @@ -1184,11 +1119,11 @@ if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AnalyticsApi#post_users_aggregates_query ..." end # resource path - path = "/api/v2/analytics/users/aggregates/query".sub('{format}','json') + local_var_path = "/api/v2/analytics/users/aggregates/query".sub('{format}','json') # query parameters query_params = {} # header parameters @@ -1206,13 +1141,12 @@ form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:POST, path, + 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, @@ -1242,11 +1176,11 @@ if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AnalyticsApi#post_users_observations_query ..." end # resource path - path = "/api/v2/analytics/users/observations/query".sub('{format}','json') + local_var_path = "/api/v2/analytics/users/observations/query".sub('{format}','json') # query parameters query_params = {} # header parameters @@ -1264,13 +1198,12 @@ form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:POST, path, + 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, @@ -1278,11 +1211,69 @@ if @api_client.config.debugging @api_client.config.logger.debug "API called: AnalyticsApi#post_users_observations_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - end -end + # Update a scheduled report job. + # + # @param schedule_id Schedule ID + # @param [Hash] opts the optional parameters + # @option opts [ReportSchedule] :body ReportSchedule + # @return [ReportSchedule] + def put_reporting_schedules_schedule_id(schedule_id, opts = {}) + data, status_code, headers = put_reporting_schedules_schedule_id_with_http_info(schedule_id, opts) + return data + end + # Update a scheduled report job. + # + # @param schedule_id Schedule ID + # @param [Hash] opts the optional parameters + # @option opts [ReportSchedule] :body ReportSchedule + # @return [Array<(ReportSchedule, Fixnum, Hash)>] ReportSchedule data, response status code and response headers + def put_reporting_schedules_schedule_id_with_http_info(schedule_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: AnalyticsApi#put_reporting_schedules_schedule_id ..." + end + + # verify the required parameter 'schedule_id' is set + fail "Missing the required parameter 'schedule_id' when calling put_reporting_schedules_schedule_id" if schedule_id.nil? + + # resource path + local_var_path = "/api/v2/analytics/reporting/schedules/{scheduleId}".sub('{format}','json').sub('{' + 'scheduleId' + '}', schedule_id.to_s) + # query parameters + query_params = {} + # header parameters + header_params = {} + + # HTTP header 'Accept' (if needed) + _header_accept = ['application/json'] + _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result + + # HTTP header 'Content-Type' + _header_content_type = ['application/json'] + header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(opts[:'body']) + + auth_names = ['PureCloud Auth'] + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'ReportSchedule') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: AnalyticsApi#put_reporting_schedules_schedule_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end