=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 RecordingApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # Delete annotation # # @param conversation_id Conversation ID # @param recording_id Recording ID # @param annotation_id Annotation ID # @param [Hash] opts the optional parameters # @return [nil] def delete_conversation_id_recordings_recording_id_annotations_annotation_id(conversation_id, recording_id, annotation_id, opts = {}) delete_conversation_id_recordings_recording_id_annotations_annotation_id_with_http_info(conversation_id, recording_id, annotation_id, opts) return nil end # Delete annotation # # @param conversation_id Conversation ID # @param recording_id Recording ID # @param annotation_id Annotation ID # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_conversation_id_recordings_recording_id_annotations_annotation_id_with_http_info(conversation_id, recording_id, annotation_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RecordingApi#delete_conversation_id_recordings_recording_id_annotations_annotation_id ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling delete_conversation_id_recordings_recording_id_annotations_annotation_id" if conversation_id.nil? # verify the required parameter 'recording_id' is set fail "Missing the required parameter 'recording_id' when calling delete_conversation_id_recordings_recording_id_annotations_annotation_id" if recording_id.nil? # verify the required parameter 'annotation_id' is set fail "Missing the required parameter 'annotation_id' when calling delete_conversation_id_recordings_recording_id_annotations_annotation_id" if annotation_id.nil? # resource path local_var_path = "/api/v2/conversations/{conversationId}/recordings/{recordingId}/annotations/{annotationId}".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'recordingId' + '}', recording_id.to_s).sub('{' + 'annotationId' + '}', annotation_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 = nil auth_names = ['PureCloud Auth'] 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: RecordingApi#delete_conversation_id_recordings_recording_id_annotations_annotation_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete media retention policies # Bulk delete of media retention policies, this will only delete the polices that match the ids specified in the query param. # @param ids # @param [Hash] opts the optional parameters # @return [String] def delete_mediaretentionpolicies(ids, opts = {}) data, status_code, headers = delete_mediaretentionpolicies_with_http_info(ids, opts) return data end # Delete media retention policies # Bulk delete of media retention policies, this will only delete the polices that match the ids specified in the query param. # @param ids # @param [Hash] opts the optional parameters # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def delete_mediaretentionpolicies_with_http_info(ids, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RecordingApi#delete_mediaretentionpolicies ..." end # verify the required parameter 'ids' is set fail "Missing the required parameter 'ids' when calling delete_mediaretentionpolicies" if ids.nil? # resource path local_var_path = "/api/v2/recording/mediaretentionpolicies".sub('{format}','json') # query parameters query_params = {} query_params[:'ids'] = ids # 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 = nil auth_names = ['PureCloud Auth'] 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 => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: RecordingApi#delete_mediaretentionpolicies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete a media retention policy # # @param policy_id Policy ID # @param [Hash] opts the optional parameters # @return [String] def delete_mediaretentionpolicies_policy_id(policy_id, opts = {}) data, status_code, headers = delete_mediaretentionpolicies_policy_id_with_http_info(policy_id, opts) return data end # Delete a media retention policy # # @param policy_id Policy ID # @param [Hash] opts the optional parameters # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def delete_mediaretentionpolicies_policy_id_with_http_info(policy_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RecordingApi#delete_mediaretentionpolicies_policy_id ..." end # verify the required parameter 'policy_id' is set fail "Missing the required parameter 'policy_id' when calling delete_mediaretentionpolicies_policy_id" if policy_id.nil? # resource path local_var_path = "/api/v2/recording/mediaretentionpolicies/{policyId}".sub('{format}','json').sub('{' + 'policyId' + '}', policy_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 = nil auth_names = ['PureCloud Auth'] 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 => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: RecordingApi#delete_mediaretentionpolicies_policy_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # deletes a single orphan recording # # @param orphan_id Orphan ID # @param [Hash] opts the optional parameters # @return [OrphanRecording] def delete_orphan_id(orphan_id, opts = {}) data, status_code, headers = delete_orphan_id_with_http_info(orphan_id, opts) return data end # deletes a single orphan recording # # @param orphan_id Orphan ID # @param [Hash] opts the optional parameters # @return [Array<(OrphanRecording, Fixnum, Hash)>] OrphanRecording data, response status code and response headers def delete_orphan_id_with_http_info(orphan_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RecordingApi#delete_orphan_id ..." end # verify the required parameter 'orphan_id' is set fail "Missing the required parameter 'orphan_id' when calling delete_orphan_id" if orphan_id.nil? # resource path local_var_path = "/api/v2/orphanrecordings/{orphanId}".sub('{format}','json').sub('{' + 'orphanId' + '}', orphan_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 = nil auth_names = ['PureCloud Auth'] 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 => 'OrphanRecording') if @api_client.config.debugging @api_client.config.logger.debug "API called: RecordingApi#delete_orphan_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get all of a Conversation's Recordings. # # @param conversation_id Conversation ID # @param [Hash] opts the optional parameters # @option opts [String] :format_id The desired media format (WEBM, WAV) (default to WEBM) # @return [Array] def get_conversation_id_recordings(conversation_id, opts = {}) data, status_code, headers = get_conversation_id_recordings_with_http_info(conversation_id, opts) return data end # Get all of a Conversation's Recordings. # # @param conversation_id Conversation ID # @param [Hash] opts the optional parameters # @option opts [String] :format_id The desired media format (WEBM, WAV) # @return [Array<(Array, Fixnum, Hash)>] Array data, response status code and response headers def get_conversation_id_recordings_with_http_info(conversation_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RecordingApi#get_conversation_id_recordings ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling get_conversation_id_recordings" if conversation_id.nil? if opts[:'format_id'] && !['WEBM', 'WAV'].include?(opts[:'format_id']) fail 'invalid value for "format_id", must be one of WEBM, WAV' end # resource path local_var_path = "/api/v2/conversations/{conversationId}/recordings".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s) # query parameters query_params = {} query_params[:'formatId'] = opts[:'format_id'] if opts[:'format_id'] # 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 = nil auth_names = ['PureCloud Auth'] 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') if @api_client.config.debugging @api_client.config.logger.debug "API called: RecordingApi#get_conversation_id_recordings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Gets a specific recording. # # @param conversation_id Conversation ID # @param recording_id Recording ID # @param [Hash] opts the optional parameters # @option opts [String] :format_id The desired media format (WEBM, WAV) (default to WEBM) # @option opts [BOOLEAN] :download requesting a download format of the recording (default to false) # @option opts [String] :file_name the name of the downloaded fileName # @return [nil] def get_conversation_id_recordings_recording_id(conversation_id, recording_id, opts = {}) get_conversation_id_recordings_recording_id_with_http_info(conversation_id, recording_id, opts) return nil end # Gets a specific recording. # # @param conversation_id Conversation ID # @param recording_id Recording ID # @param [Hash] opts the optional parameters # @option opts [String] :format_id The desired media format (WEBM, WAV) # @option opts [BOOLEAN] :download requesting a download format of the recording # @option opts [String] :file_name the name of the downloaded fileName # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def get_conversation_id_recordings_recording_id_with_http_info(conversation_id, recording_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RecordingApi#get_conversation_id_recordings_recording_id ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling get_conversation_id_recordings_recording_id" if conversation_id.nil? # verify the required parameter 'recording_id' is set fail "Missing the required parameter 'recording_id' when calling get_conversation_id_recordings_recording_id" if recording_id.nil? if opts[:'format_id'] && !['WEBM', 'WAV'].include?(opts[:'format_id']) fail 'invalid value for "format_id", must be one of WEBM, WAV' end # resource path local_var_path = "/api/v2/conversations/{conversationId}/recordings/{recordingId}".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'recordingId' + '}', recording_id.to_s) # query parameters query_params = {} query_params[:'formatId'] = opts[:'format_id'] if opts[:'format_id'] query_params[:'download'] = opts[:'download'] if opts[:'download'] query_params[:'fileName'] = opts[:'file_name'] if opts[:'file_name'] # 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 = nil auth_names = ['PureCloud Auth'] 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: RecordingApi#get_conversation_id_recordings_recording_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get annotations for recording # # @param conversation_id Conversation ID # @param recording_id Recording ID # @param [Hash] opts the optional parameters # @return [Array] def get_conversation_id_recordings_recording_id_annotations(conversation_id, recording_id, opts = {}) data, status_code, headers = get_conversation_id_recordings_recording_id_annotations_with_http_info(conversation_id, recording_id, opts) return data end # Get annotations for recording # # @param conversation_id Conversation ID # @param recording_id Recording ID # @param [Hash] opts the optional parameters # @return [Array<(Array, Fixnum, Hash)>] Array data, response status code and response headers def get_conversation_id_recordings_recording_id_annotations_with_http_info(conversation_id, recording_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RecordingApi#get_conversation_id_recordings_recording_id_annotations ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling get_conversation_id_recordings_recording_id_annotations" if conversation_id.nil? # verify the required parameter 'recording_id' is set fail "Missing the required parameter 'recording_id' when calling get_conversation_id_recordings_recording_id_annotations" if recording_id.nil? # resource path local_var_path = "/api/v2/conversations/{conversationId}/recordings/{recordingId}/annotations".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'recordingId' + '}', recording_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 = nil auth_names = ['PureCloud Auth'] 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') if @api_client.config.debugging @api_client.config.logger.debug "API called: RecordingApi#get_conversation_id_recordings_recording_id_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get annotation # # @param conversation_id Conversation ID # @param recording_id Recording ID # @param annotation_id Annotation ID # @param [Hash] opts the optional parameters # @return [Annotation] def get_conversation_id_recordings_recording_id_annotations_annotation_id(conversation_id, recording_id, annotation_id, opts = {}) data, status_code, headers = get_conversation_id_recordings_recording_id_annotations_annotation_id_with_http_info(conversation_id, recording_id, annotation_id, opts) return data end # Get annotation # # @param conversation_id Conversation ID # @param recording_id Recording ID # @param annotation_id Annotation ID # @param [Hash] opts the optional parameters # @return [Array<(Annotation, Fixnum, Hash)>] Annotation data, response status code and response headers def get_conversation_id_recordings_recording_id_annotations_annotation_id_with_http_info(conversation_id, recording_id, annotation_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RecordingApi#get_conversation_id_recordings_recording_id_annotations_annotation_id ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling get_conversation_id_recordings_recording_id_annotations_annotation_id" if conversation_id.nil? # verify the required parameter 'recording_id' is set fail "Missing the required parameter 'recording_id' when calling get_conversation_id_recordings_recording_id_annotations_annotation_id" if recording_id.nil? # verify the required parameter 'annotation_id' is set fail "Missing the required parameter 'annotation_id' when calling get_conversation_id_recordings_recording_id_annotations_annotation_id" if annotation_id.nil? # resource path local_var_path = "/api/v2/conversations/{conversationId}/recordings/{recordingId}/annotations/{annotationId}".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'recordingId' + '}', recording_id.to_s).sub('{' + 'annotationId' + '}', annotation_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 = nil auth_names = ['PureCloud Auth'] 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 => 'Annotation') if @api_client.config.debugging @api_client.config.logger.debug "API called: RecordingApi#get_conversation_id_recordings_recording_id_annotations_annotation_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Gets media retention policy list with query options to filter on name and enabled. # for a less verbose response, add summary=true to this endpoint # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The total page size requested (default to 25) # @option opts [Integer] :page_number The page number requested (default to 1) # @option opts [String] :sort_by variable name requested to sort by # @option opts [Array] :expand variable name requested by expand list # @option opts [String] :next_page next page token # @option opts [String] :previous_page Previous page token # @option opts [String] :name the policy name - used for filtering results in searches. # @option opts [BOOLEAN] :enabled checks to see if policy is enabled - use enabled = true or enabled = false # @option opts [BOOLEAN] :summary provides a less verbose response of policy lists. (default to false) # @option opts [BOOLEAN] :has_errors provides a way to fetch all policies with errors or policies that do not have errors # @return [PolicyEntityListing] def get_mediaretentionpolicies(opts = {}) data, status_code, headers = get_mediaretentionpolicies_with_http_info(opts) return data end # Gets media retention policy list with query options to filter on name and enabled. # for a less verbose response, add summary=true to this endpoint # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The total page size requested # @option opts [Integer] :page_number The page number requested # @option opts [String] :sort_by variable name requested to sort by # @option opts [Array] :expand variable name requested by expand list # @option opts [String] :next_page next page token # @option opts [String] :previous_page Previous page token # @option opts [String] :name the policy name - used for filtering results in searches. # @option opts [BOOLEAN] :enabled checks to see if policy is enabled - use enabled = true or enabled = false # @option opts [BOOLEAN] :summary provides a less verbose response of policy lists. # @option opts [BOOLEAN] :has_errors provides a way to fetch all policies with errors or policies that do not have errors # @return [Array<(PolicyEntityListing, Fixnum, Hash)>] PolicyEntityListing data, response status code and response headers def get_mediaretentionpolicies_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RecordingApi#get_mediaretentionpolicies ..." end # resource path local_var_path = "/api/v2/recording/mediaretentionpolicies".sub('{format}','json') # query parameters query_params = {} query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by'] query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] query_params[:'nextPage'] = opts[:'next_page'] if opts[:'next_page'] query_params[:'previousPage'] = opts[:'previous_page'] if opts[:'previous_page'] query_params[:'name'] = opts[:'name'] if opts[:'name'] query_params[:'enabled'] = opts[:'enabled'] if opts[:'enabled'] query_params[:'summary'] = opts[:'summary'] if opts[:'summary'] query_params[:'hasErrors'] = opts[:'has_errors'] if opts[:'has_errors'] # 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 = nil auth_names = ['PureCloud Auth'] 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 => 'PolicyEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: RecordingApi#get_mediaretentionpolicies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a media retention policy # # @param policy_id Policy ID # @param [Hash] opts the optional parameters # @return [Policy] def get_mediaretentionpolicies_policy_id(policy_id, opts = {}) data, status_code, headers = get_mediaretentionpolicies_policy_id_with_http_info(policy_id, opts) return data end # Get a media retention policy # # @param policy_id Policy ID # @param [Hash] opts the optional parameters # @return [Array<(Policy, Fixnum, Hash)>] Policy data, response status code and response headers def get_mediaretentionpolicies_policy_id_with_http_info(policy_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RecordingApi#get_mediaretentionpolicies_policy_id ..." end # verify the required parameter 'policy_id' is set fail "Missing the required parameter 'policy_id' when calling get_mediaretentionpolicies_policy_id" if policy_id.nil? # resource path local_var_path = "/api/v2/recording/mediaretentionpolicies/{policyId}".sub('{format}','json').sub('{' + 'policyId' + '}', policy_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 = nil auth_names = ['PureCloud Auth'] 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 => 'Policy') if @api_client.config.debugging @api_client.config.logger.debug "API called: RecordingApi#get_mediaretentionpolicies_policy_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Gets a single orphan recording # # @param orphan_id Orphan ID # @param [Hash] opts the optional parameters # @return [OrphanRecording] def get_orphan_id(orphan_id, opts = {}) data, status_code, headers = get_orphan_id_with_http_info(orphan_id, opts) return data end # Gets a single orphan recording # # @param orphan_id Orphan ID # @param [Hash] opts the optional parameters # @return [Array<(OrphanRecording, Fixnum, Hash)>] OrphanRecording data, response status code and response headers def get_orphan_id_with_http_info(orphan_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RecordingApi#get_orphan_id ..." end # verify the required parameter 'orphan_id' is set fail "Missing the required parameter 'orphan_id' when calling get_orphan_id" if orphan_id.nil? # resource path local_var_path = "/api/v2/orphanrecordings/{orphanId}".sub('{format}','json').sub('{' + 'orphanId' + '}', orphan_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 = nil auth_names = ['PureCloud Auth'] 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 => 'OrphanRecording') if @api_client.config.debugging @api_client.config.logger.debug "API called: RecordingApi#get_orphan_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Gets all orphan recordings # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The total page size requested (default to 25) # @option opts [Integer] :page_number The page number requested (default to 1) # @option opts [String] :sort_by variable name requested to sort by # @option opts [Array] :expand variable name requested by expand list # @option opts [String] :next_page next page token # @option opts [String] :previous_page Previous page token # @return [OrphanRecordingListing] def get_orphanrecordings(opts = {}) data, status_code, headers = get_orphanrecordings_with_http_info(opts) return data end # Gets all orphan recordings # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size The total page size requested # @option opts [Integer] :page_number The page number requested # @option opts [String] :sort_by variable name requested to sort by # @option opts [Array] :expand variable name requested by expand list # @option opts [String] :next_page next page token # @option opts [String] :previous_page Previous page token # @return [Array<(OrphanRecordingListing, Fixnum, Hash)>] OrphanRecordingListing data, response status code and response headers def get_orphanrecordings_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RecordingApi#get_orphanrecordings ..." end # resource path local_var_path = "/api/v2/orphanrecordings".sub('{format}','json') # query parameters query_params = {} query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by'] query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] query_params[:'nextPage'] = opts[:'next_page'] if opts[:'next_page'] query_params[:'previousPage'] = opts[:'previous_page'] if opts[:'previous_page'] # 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 = nil auth_names = ['PureCloud Auth'] 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 => 'OrphanRecordingListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: RecordingApi#get_orphanrecordings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get the Recording Settings for the Organization # # @param [Hash] opts the optional parameters # @option opts [BOOLEAN] :create_default If no settings are found, a new one is created with default values (default to false) # @return [RecordingSettings] def get_settings(opts = {}) data, status_code, headers = get_settings_with_http_info(opts) return data end # Get the Recording Settings for the Organization # # @param [Hash] opts the optional parameters # @option opts [BOOLEAN] :create_default If no settings are found, a new one is created with default values # @return [Array<(RecordingSettings, Fixnum, Hash)>] RecordingSettings data, response status code and response headers def get_settings_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RecordingApi#get_settings ..." end # resource path local_var_path = "/api/v2/recording/settings".sub('{format}','json') # query parameters query_params = {} query_params[:'createDefault'] = opts[:'create_default'] if opts[:'create_default'] # 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 = nil auth_names = ['PureCloud Auth'] 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 => 'RecordingSettings') if @api_client.config.debugging @api_client.config.logger.debug "API called: RecordingApi#get_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Patch a media retention policy # # @param policy_id Policy ID # @param [Hash] opts the optional parameters # @option opts [Policy] :body Policy # @return [Policy] def patch_mediaretentionpolicies_policy_id(policy_id, opts = {}) data, status_code, headers = patch_mediaretentionpolicies_policy_id_with_http_info(policy_id, opts) return data end # Patch a media retention policy # # @param policy_id Policy ID # @param [Hash] opts the optional parameters # @option opts [Policy] :body Policy # @return [Array<(Policy, Fixnum, Hash)>] Policy data, response status code and response headers def patch_mediaretentionpolicies_policy_id_with_http_info(policy_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RecordingApi#patch_mediaretentionpolicies_policy_id ..." end # verify the required parameter 'policy_id' is set fail "Missing the required parameter 'policy_id' when calling patch_mediaretentionpolicies_policy_id" if policy_id.nil? # resource path local_var_path = "/api/v2/recording/mediaretentionpolicies/{policyId}".sub('{format}','json').sub('{' + 'policyId' + '}', policy_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(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Policy') if @api_client.config.debugging @api_client.config.logger.debug "API called: RecordingApi#patch_mediaretentionpolicies_policy_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create annotation # # @param conversation_id Conversation ID # @param recording_id Recording ID # @param [Hash] opts the optional parameters # @option opts [Annotation] :body annotation # @return [Annotation] def post_conversation_id_recordings_recording_id_annotations(conversation_id, recording_id, opts = {}) data, status_code, headers = post_conversation_id_recordings_recording_id_annotations_with_http_info(conversation_id, recording_id, opts) return data end # Create annotation # # @param conversation_id Conversation ID # @param recording_id Recording ID # @param [Hash] opts the optional parameters # @option opts [Annotation] :body annotation # @return [Array<(Annotation, Fixnum, Hash)>] Annotation data, response status code and response headers def post_conversation_id_recordings_recording_id_annotations_with_http_info(conversation_id, recording_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RecordingApi#post_conversation_id_recordings_recording_id_annotations ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling post_conversation_id_recordings_recording_id_annotations" if conversation_id.nil? # verify the required parameter 'recording_id' is set fail "Missing the required parameter 'recording_id' when calling post_conversation_id_recordings_recording_id_annotations" if recording_id.nil? # resource path local_var_path = "/api/v2/conversations/{conversationId}/recordings/{recordingId}/annotations".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'recordingId' + '}', recording_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(: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 => 'Annotation') if @api_client.config.debugging @api_client.config.logger.debug "API called: RecordingApi#post_conversation_id_recordings_recording_id_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create media retention policy # # @param [Hash] opts the optional parameters # @option opts [Policy] :body Policy # @return [Policy] def post_mediaretentionpolicies(opts = {}) data, status_code, headers = post_mediaretentionpolicies_with_http_info(opts) return data end # Create media retention policy # # @param [Hash] opts the optional parameters # @option opts [Policy] :body Policy # @return [Array<(Policy, Fixnum, Hash)>] Policy data, response status code and response headers def post_mediaretentionpolicies_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RecordingApi#post_mediaretentionpolicies ..." end # resource path local_var_path = "/api/v2/recording/mediaretentionpolicies".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']) auth_names = ['PureCloud Auth'] 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 => 'Policy') if @api_client.config.debugging @api_client.config.logger.debug "API called: RecordingApi#post_mediaretentionpolicies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Updates the retention records on a recording. # Currently supports updating and removing both archive and delete dates for eligible recordings. A request to change the archival date of an archived recording will result in a restoration of the recording until the new date set. Use of the query parameter 'restoreDays' is deprecated and will be removed in the next major version release. If 'restoreDays' is provided, no attempt at updating other retention data will be made. To migrate to the new usage, issuing a request with restoreDays=10 would instead set the archiveDate's time stamp in the PUT body to 10 days in the future. # @param conversation_id Conversation ID # @param recording_id Recording ID # @param body recording # @param [Hash] opts the optional parameters # @return [nil] def put_conversation_id_recordings_recording_id(conversation_id, recording_id, body, opts = {}) put_conversation_id_recordings_recording_id_with_http_info(conversation_id, recording_id, body, opts) return nil end # Updates the retention records on a recording. # Currently supports updating and removing both archive and delete dates for eligible recordings. A request to change the archival date of an archived recording will result in a restoration of the recording until the new date set. Use of the query parameter 'restoreDays' is deprecated and will be removed in the next major version release. If 'restoreDays' is provided, no attempt at updating other retention data will be made. To migrate to the new usage, issuing a request with restoreDays=10 would instead set the archiveDate's time stamp in the PUT body to 10 days in the future. # @param conversation_id Conversation ID # @param recording_id Recording ID # @param body recording # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def put_conversation_id_recordings_recording_id_with_http_info(conversation_id, recording_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RecordingApi#put_conversation_id_recordings_recording_id ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling put_conversation_id_recordings_recording_id" if conversation_id.nil? # verify the required parameter 'recording_id' is set fail "Missing the required parameter 'recording_id' when calling put_conversation_id_recordings_recording_id" if recording_id.nil? # verify the required parameter 'body' is set fail "Missing the required parameter 'body' when calling put_conversation_id_recordings_recording_id" if body.nil? # resource path local_var_path = "/api/v2/conversations/{conversationId}/recordings/{recordingId}".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'recordingId' + '}', recording_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(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) if @api_client.config.debugging @api_client.config.logger.debug "API called: RecordingApi#put_conversation_id_recordings_recording_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update annotation # # @param conversation_id Conversation ID # @param recording_id Recording ID # @param annotation_id Annotation ID # @param [Hash] opts the optional parameters # @option opts [Annotation] :body annotation # @return [Annotation] def put_conversation_id_recordings_recording_id_annotations_annotation_id(conversation_id, recording_id, annotation_id, opts = {}) data, status_code, headers = put_conversation_id_recordings_recording_id_annotations_annotation_id_with_http_info(conversation_id, recording_id, annotation_id, opts) return data end # Update annotation # # @param conversation_id Conversation ID # @param recording_id Recording ID # @param annotation_id Annotation ID # @param [Hash] opts the optional parameters # @option opts [Annotation] :body annotation # @return [Array<(Annotation, Fixnum, Hash)>] Annotation data, response status code and response headers def put_conversation_id_recordings_recording_id_annotations_annotation_id_with_http_info(conversation_id, recording_id, annotation_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RecordingApi#put_conversation_id_recordings_recording_id_annotations_annotation_id ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling put_conversation_id_recordings_recording_id_annotations_annotation_id" if conversation_id.nil? # verify the required parameter 'recording_id' is set fail "Missing the required parameter 'recording_id' when calling put_conversation_id_recordings_recording_id_annotations_annotation_id" if recording_id.nil? # verify the required parameter 'annotation_id' is set fail "Missing the required parameter 'annotation_id' when calling put_conversation_id_recordings_recording_id_annotations_annotation_id" if annotation_id.nil? # resource path local_var_path = "/api/v2/conversations/{conversationId}/recordings/{recordingId}/annotations/{annotationId}".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'recordingId' + '}', recording_id.to_s).sub('{' + 'annotationId' + '}', annotation_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 => 'Annotation') if @api_client.config.debugging @api_client.config.logger.debug "API called: RecordingApi#put_conversation_id_recordings_recording_id_annotations_annotation_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update a media retention policy # # @param policy_id Policy ID # @param [Hash] opts the optional parameters # @option opts [Policy] :body Policy # @return [Policy] def put_mediaretentionpolicies_policy_id(policy_id, opts = {}) data, status_code, headers = put_mediaretentionpolicies_policy_id_with_http_info(policy_id, opts) return data end # Update a media retention policy # # @param policy_id Policy ID # @param [Hash] opts the optional parameters # @option opts [Policy] :body Policy # @return [Array<(Policy, Fixnum, Hash)>] Policy data, response status code and response headers def put_mediaretentionpolicies_policy_id_with_http_info(policy_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RecordingApi#put_mediaretentionpolicies_policy_id ..." end # verify the required parameter 'policy_id' is set fail "Missing the required parameter 'policy_id' when calling put_mediaretentionpolicies_policy_id" if policy_id.nil? # resource path local_var_path = "/api/v2/recording/mediaretentionpolicies/{policyId}".sub('{format}','json').sub('{' + 'policyId' + '}', policy_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 => 'Policy') if @api_client.config.debugging @api_client.config.logger.debug "API called: RecordingApi#put_mediaretentionpolicies_policy_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update the Recording Settings for the Organization # # @param [Hash] opts the optional parameters # @option opts [RecordingSettings] :body # @return [RecordingSettings] def put_settings(opts = {}) data, status_code, headers = put_settings_with_http_info(opts) return data end # Update the Recording Settings for the Organization # # @param [Hash] opts the optional parameters # @option opts [RecordingSettings] :body # @return [Array<(RecordingSettings, Fixnum, Hash)>] RecordingSettings data, response status code and response headers def put_settings_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: RecordingApi#put_settings ..." end # resource path local_var_path = "/api/v2/recording/settings".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']) 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 => 'RecordingSettings') if @api_client.config.debugging @api_client.config.logger.debug "API called: RecordingApi#put_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end