Method: PureCloud::RecordingApi#get_mediaretentionpolicies_policy_id_with_http_info

Defined in:
lib/purecloud/api/recording_api.rb

#get_mediaretentionpolicies_policy_id_with_http_info(policy_id, opts = {}) ⇒ Array<(Policy, Fixnum, Hash)>

Get a media retention policy

Parameters:

  • policy_id

    Policy ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Policy, Fixnum, Hash)>)

    Policy data, response status code and response headers



992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
# File 'lib/purecloud/api/recording_api.rb', line 992

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
  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, 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