Class: PureCloud::TelephonyApi
- Inherits:
-
Object
- Object
- PureCloud::TelephonyApi
- Defined in:
- lib/purecloudplatformclientv2/api/telephony_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_telephony_siptraces(date_start, date_end, opts = {}) ⇒ SipSearchResult
Fetch SIP metadata Fetch SIP metadata that matches a given parameter.
-
#get_telephony_siptraces_download_download_id(download_id, opts = {}) ⇒ SignedUrlResponse
Get signed S3 URL for a pcap download.
-
#get_telephony_siptraces_download_download_id_with_http_info(download_id, opts = {}) ⇒ Array<(SignedUrlResponse, Fixnum, Hash)>
Get signed S3 URL for a pcap download.
-
#get_telephony_siptraces_with_http_info(date_start, date_end, opts = {}) ⇒ Array<(SipSearchResult, Fixnum, Hash)>
Fetch SIP metadata Fetch SIP metadata that matches a given parameter.
-
#initialize(api_client = ApiClient.default) ⇒ TelephonyApi
constructor
A new instance of TelephonyApi.
-
#post_telephony_siptraces_download(sip_search_public_request, opts = {}) ⇒ SipDownloadResponse
Request a download of a pcap file to S3.
-
#post_telephony_siptraces_download_with_http_info(sip_search_public_request, opts = {}) ⇒ Array<(SipDownloadResponse, Fixnum, Hash)>
Request a download of a pcap file to S3.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ TelephonyApi
Returns a new instance of TelephonyApi.
23 24 25 |
# File 'lib/purecloudplatformclientv2/api/telephony_api.rb', line 23 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
21 22 23 |
# File 'lib/purecloudplatformclientv2/api/telephony_api.rb', line 21 def api_client @api_client end |
Instance Method Details
#get_telephony_siptraces(date_start, date_end, opts = {}) ⇒ SipSearchResult
Fetch SIP metadata Fetch SIP metadata that matches a given parameter. If exactMatch is passed as a parameter only sip records that have exactly that value will be returned. For example, some records contain conversationId but not all relevant records for that call may contain the conversationId so only a partial view of the call will be reflected
37 38 39 40 |
# File 'lib/purecloudplatformclientv2/api/telephony_api.rb', line 37 def get_telephony_siptraces(date_start, date_end, opts = {}) data, _status_code, _headers = get_telephony_siptraces_with_http_info(date_start, date_end, opts) return data end |
#get_telephony_siptraces_download_download_id(download_id, opts = {}) ⇒ SignedUrlResponse
Get signed S3 URL for a pcap download
145 146 147 148 |
# File 'lib/purecloudplatformclientv2/api/telephony_api.rb', line 145 def get_telephony_siptraces_download_download_id(download_id, opts = {}) data, _status_code, _headers = get_telephony_siptraces_download_download_id_with_http_info(download_id, opts) return data end |
#get_telephony_siptraces_download_download_id_with_http_info(download_id, opts = {}) ⇒ Array<(SignedUrlResponse, Fixnum, Hash)>
Get signed S3 URL for a pcap download
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 |
# File 'lib/purecloudplatformclientv2/api/telephony_api.rb', line 155 def get_telephony_siptraces_download_download_id_with_http_info(download_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyApi.get_telephony_siptraces_download_download_id ..." end # verify the required parameter 'download_id' is set fail ArgumentError, "Missing the required parameter 'download_id' when calling TelephonyApi.get_telephony_siptraces_download_download_id" if download_id.nil? # resource path local_var_path = "/api/v2/telephony/siptraces/download/{downloadId}".sub('{format}','json').sub('{' + 'downloadId' + '}', download_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SignedUrlResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyApi#get_telephony_siptraces_download_download_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_telephony_siptraces_with_http_info(date_start, date_end, opts = {}) ⇒ Array<(SipSearchResult, Fixnum, Hash)>
Fetch SIP metadata Fetch SIP metadata that matches a given parameter. If exactMatch is passed as a parameter only sip records that have exactly that value will be returned. For example, some records contain conversationId but not all relevant records for that call may contain the conversationId so only a partial view of the call will be reflected
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
# File 'lib/purecloudplatformclientv2/api/telephony_api.rb', line 52 def get_telephony_siptraces_with_http_info(date_start, date_end, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyApi.get_telephony_siptraces ..." end # verify the required parameter 'date_start' is set fail ArgumentError, "Missing the required parameter 'date_start' when calling TelephonyApi.get_telephony_siptraces" if date_start.nil? # verify the required parameter 'date_end' is set fail ArgumentError, "Missing the required parameter 'date_end' when calling TelephonyApi.get_telephony_siptraces" if date_end.nil? # resource path local_var_path = "/api/v2/telephony/siptraces".sub('{format}','json') # query parameters query_params = {} query_params[:'dateStart'] = date_start query_params[:'dateEnd'] = date_end query_params[:'callId'] = opts[:'call_id'] if opts[:'call_id'] query_params[:'toUser'] = opts[:'to_user'] if opts[:'to_user'] query_params[:'fromUser'] = opts[:'from_user'] if opts[:'from_user'] query_params[:'conversationId'] = opts[:'conversation_id'] if opts[:'conversation_id'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SipSearchResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyApi#get_telephony_siptraces\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_telephony_siptraces_download(sip_search_public_request, opts = {}) ⇒ SipDownloadResponse
Request a download of a pcap file to S3
210 211 212 213 |
# File 'lib/purecloudplatformclientv2/api/telephony_api.rb', line 210 def post_telephony_siptraces_download(sip_search_public_request, opts = {}) data, _status_code, _headers = post_telephony_siptraces_download_with_http_info(sip_search_public_request, opts) return data end |
#post_telephony_siptraces_download_with_http_info(sip_search_public_request, opts = {}) ⇒ Array<(SipDownloadResponse, Fixnum, Hash)>
Request a download of a pcap file to S3
220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
# File 'lib/purecloudplatformclientv2/api/telephony_api.rb', line 220 def post_telephony_siptraces_download_with_http_info(sip_search_public_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TelephonyApi.post_telephony_siptraces_download ..." end # verify the required parameter 'sip_search_public_request' is set fail ArgumentError, "Missing the required parameter 'sip_search_public_request' when calling TelephonyApi.post_telephony_siptraces_download" if sip_search_public_request.nil? # resource path local_var_path = "/api/v2/telephony/siptraces/download".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(sip_search_public_request) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SipDownloadResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: TelephonyApi#post_telephony_siptraces_download\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |