class PureCloud::SearchApi

Attributes

api_client[RW]

Public Class Methods

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

Public Instance Methods

get_documentation_gkn_search_with_http_info(q64, opts = {}) click to toggle source

Search gkn documentation using the q64 value returned from a previous search

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

# File lib/purecloudplatformclientv2/api/search_api.rb, line 42
def get_documentation_gkn_search_with_http_info(q64, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SearchApi.get_documentation_gkn_search ..."
  end
  
  
  # verify the required parameter 'q64' is set
  fail ArgumentError, "Missing the required parameter 'q64' when calling SearchApi.get_documentation_gkn_search" if q64.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/documentation/gkn/search".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'q64'] = q64

  # 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 = []
  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 => 'GKNDocumentationSearchResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SearchApi#get_documentation_gkn_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_documentation_search_with_http_info(q64, opts = {}) click to toggle source

Search documentation using the q64 value returned from a previous search

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

# File lib/purecloudplatformclientv2/api/search_api.rb, line 108
def get_documentation_search_with_http_info(q64, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SearchApi.get_documentation_search ..."
  end
  
  
  # verify the required parameter 'q64' is set
  fail ArgumentError, "Missing the required parameter 'q64' when calling SearchApi.get_documentation_search" if q64.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/documentation/search".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'q64'] = q64

  # 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 = []
  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 => 'DocumentationSearchResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SearchApi#get_documentation_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_groups_search_with_http_info(q64, opts = {}) click to toggle source

Search groups using the q64 value returned from a previous search

@param q64 q64 @param [Hash] opts the optional parameters @option opts [Array<String>] :expand expand @return [Array<(GroupsSearchResponse, Fixnum, Hash)>] GroupsSearchResponse data, response status code and response headers

# File lib/purecloudplatformclientv2/api/search_api.rb, line 176
def get_groups_search_with_http_info(q64, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SearchApi.get_groups_search ..."
  end
  
  
  # verify the required parameter 'q64' is set
  fail ArgumentError, "Missing the required parameter 'q64' when calling SearchApi.get_groups_search" if q64.nil?
  
  
  
  
  
  
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/groups/search".sub('{format}','json')

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

  # header parameters
  header_params = {}

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

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud OAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'GroupsSearchResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SearchApi#get_groups_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_locations_search_with_http_info(q64, opts = {}) click to toggle source

Search locations using the q64 value returned from a previous search

@param q64 q64 @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Provides more details about a specified resource @return [Array<(LocationsSearchResponse, Fixnum, Hash)>] LocationsSearchResponse data, response status code and response headers

# File lib/purecloudplatformclientv2/api/search_api.rb, line 251
def get_locations_search_with_http_info(q64, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SearchApi.get_locations_search ..."
  end
  
  
  # verify the required parameter 'q64' is set
  fail ArgumentError, "Missing the required parameter 'q64' when calling SearchApi.get_locations_search" if q64.nil?
  
  
  
  
  
  
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/locations/search".sub('{format}','json')

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

  # header parameters
  header_params = {}

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

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud OAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'LocationsSearchResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SearchApi#get_locations_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_search_suggest(q64, opts = {}) click to toggle source

Suggest resources using the q64 value returned from a previous suggest query.

@param q64 q64 @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand @option opts [BOOLEAN] :profile profile (default to true) @return [JsonNodeSearchResponse]

# File lib/purecloudplatformclientv2/api/search_api.rb, line 400
def get_search_suggest(q64, opts = {})
  data, _status_code, _headers = get_search_suggest_with_http_info(q64, opts)
  return data
end
get_search_suggest_with_http_info(q64, opts = {}) click to toggle source

Suggest resources using the q64 value returned from a previous suggest query.

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

# File lib/purecloudplatformclientv2/api/search_api.rb, line 412
def get_search_suggest_with_http_info(q64, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SearchApi.get_search_suggest ..."
  end
  
  
  # verify the required parameter 'q64' is set
  fail ArgumentError, "Missing the required parameter 'q64' when calling SearchApi.get_search_suggest" if q64.nil?
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/search/suggest".sub('{format}','json')

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

  # 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 => 'JsonNodeSearchResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SearchApi#get_search_suggest\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_search_with_http_info(q64, opts = {}) click to toggle source

Search using the q64 value returned from a previous search.

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

# File lib/purecloudplatformclientv2/api/search_api.rb, line 328
def get_search_with_http_info(q64, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SearchApi.get_search ..."
  end
  
  
  # verify the required parameter 'q64' is set
  fail ArgumentError, "Missing the required parameter 'q64' when calling SearchApi.get_search" if q64.nil?
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/search".sub('{format}','json')

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

  # 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 => 'JsonNodeSearchResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SearchApi#get_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_users_search_with_http_info(q64, opts = {}) click to toggle source

Search users using the q64 value returned from a previous search

@param q64 q64 @param [Hash] opts the optional parameters @option opts [Array<String>] :expand expand @option opts [String] :integration_presence_source integrationPresenceSource @return [Array<(UsersSearchResponse, Fixnum, Hash)>] UsersSearchResponse data, response status code and response headers

# File lib/purecloudplatformclientv2/api/search_api.rb, line 496
def get_users_search_with_http_info(q64, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SearchApi.get_users_search ..."
  end
  
  
  # verify the required parameter 'q64' is set
  fail ArgumentError, "Missing the required parameter 'q64' when calling SearchApi.get_users_search" if q64.nil?
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  if opts[:'integration_presence_source'] && !['MicrosoftTeams', 'ZoomPhone'].include?(opts[:'integration_presence_source'])
    fail ArgumentError, 'invalid value for "integration_presence_source", must be one of MicrosoftTeams, ZoomPhone'
  end
  
  
  
  
  # resource path
  local_var_path = "/api/v2/users/search".sub('{format}','json')

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

  # 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 => 'UsersSearchResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SearchApi#get_users_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_voicemail_search_with_http_info(q64, opts = {}) click to toggle source

Search voicemails using the q64 value returned from a previous search

@param q64 q64 @param [Hash] opts the optional parameters @option opts [Array<String>] :expand expand @return [Array<(VoicemailsSearchResponse, Fixnum, Hash)>] VoicemailsSearchResponse data, response status code and response headers

# File lib/purecloudplatformclientv2/api/search_api.rb, line 582
def get_voicemail_search_with_http_info(q64, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SearchApi.get_voicemail_search ..."
  end
  
  
  # verify the required parameter 'q64' is set
  fail ArgumentError, "Missing the required parameter 'q64' when calling SearchApi.get_voicemail_search" if q64.nil?
  
  
  
  
  
  
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/voicemail/search".sub('{format}','json')

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

  # header parameters
  header_params = {}

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

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud OAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'VoicemailsSearchResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SearchApi#get_voicemail_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_documentation_gkn_search(body, opts = {}) click to toggle source

Search gkn documentation

@param body Search request options @param [Hash] opts the optional parameters @return [GKNDocumentationSearchResponse]

# File lib/purecloudplatformclientv2/api/search_api.rb, line 645
def post_documentation_gkn_search(body, opts = {})
  data, _status_code, _headers = post_documentation_gkn_search_with_http_info(body, opts)
  return data
end
post_documentation_gkn_search_with_http_info(body, opts = {}) click to toggle source

Search gkn documentation

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

# File lib/purecloudplatformclientv2/api/search_api.rb, line 655
def post_documentation_gkn_search_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SearchApi.post_documentation_gkn_search ..."
  end
  
  
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling SearchApi.post_documentation_gkn_search" if body.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/documentation/gkn/search".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

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

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

  # form parameters
  form_params = {}

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

Search documentation

@param body Search request options @param [Hash] opts the optional parameters @return [DocumentationSearchResponse]

# File lib/purecloudplatformclientv2/api/search_api.rb, line 710
def post_documentation_search(body, opts = {})
  data, _status_code, _headers = post_documentation_search_with_http_info(body, opts)
  return data
end
post_documentation_search_with_http_info(body, opts = {}) click to toggle source

Search documentation

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

# File lib/purecloudplatformclientv2/api/search_api.rb, line 720
def post_documentation_search_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SearchApi.post_documentation_search ..."
  end
  
  
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling SearchApi.post_documentation_search" if body.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/documentation/search".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

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

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

  # form parameters
  form_params = {}

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

Search groups

@param body Search request options @param [Hash] opts the optional parameters @return [GroupsSearchResponse]

# File lib/purecloudplatformclientv2/api/search_api.rb, line 775
def post_groups_search(body, opts = {})
  data, _status_code, _headers = post_groups_search_with_http_info(body, opts)
  return data
end
post_groups_search_with_http_info(body, opts = {}) click to toggle source

Search groups

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

# File lib/purecloudplatformclientv2/api/search_api.rb, line 785
def post_groups_search_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SearchApi.post_groups_search ..."
  end
  
  
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling SearchApi.post_groups_search" if body.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/groups/search".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

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

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['PureCloud OAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'GroupsSearchResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SearchApi#post_groups_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_knowledge_knowledgebase_search(knowledge_base_id, opts = {}) click to toggle source

Search Documents

@param knowledge_base_id Knowledge base ID @param [Hash] opts the optional parameters @option opts [KnowledgeSearchRequest] :body @return [KnowledgeSearchResponse]

# File lib/purecloudplatformclientv2/api/search_api.rb, line 841
def post_knowledge_knowledgebase_search(knowledge_base_id, opts = {})
  data, _status_code, _headers = post_knowledge_knowledgebase_search_with_http_info(knowledge_base_id, opts)
  return data
end
post_knowledge_knowledgebase_search_with_http_info(knowledge_base_id, opts = {}) click to toggle source

Search Documents

@param knowledge_base_id Knowledge base ID @param [Hash] opts the optional parameters @option opts [KnowledgeSearchRequest] :body @return [Array<(KnowledgeSearchResponse, Fixnum, Hash)>] KnowledgeSearchResponse data, response status code and response headers

# File lib/purecloudplatformclientv2/api/search_api.rb, line 852
def post_knowledge_knowledgebase_search_with_http_info(knowledge_base_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SearchApi.post_knowledge_knowledgebase_search ..."
  end
  
  
  # verify the required parameter 'knowledge_base_id' is set
  fail ArgumentError, "Missing the required parameter 'knowledge_base_id' when calling SearchApi.post_knowledge_knowledgebase_search" if knowledge_base_id.nil?
  
  
  
  
  
  
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/search".sub('{format}','json').sub('{' + 'knowledgeBaseId' + '}', knowledge_base_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 = @api_client.object_to_http_body(opts[:'body'])
  
  auth_names = ['PureCloud OAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'KnowledgeSearchResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SearchApi#post_knowledge_knowledgebase_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_locations_search(body, opts = {}) click to toggle source

Search locations

@param body Search request options @param [Hash] opts the optional parameters @return [LocationsSearchResponse]

# File lib/purecloudplatformclientv2/api/search_api.rb, line 913
def post_locations_search(body, opts = {})
  data, _status_code, _headers = post_locations_search_with_http_info(body, opts)
  return data
end
post_locations_search_with_http_info(body, opts = {}) click to toggle source

Search locations

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

# File lib/purecloudplatformclientv2/api/search_api.rb, line 923
def post_locations_search_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SearchApi.post_locations_search ..."
  end
  
  
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling SearchApi.post_locations_search" if body.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/locations/search".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

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

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['PureCloud OAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'LocationsSearchResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SearchApi#post_locations_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_search(body, opts = {}) click to toggle source

Search resources.

@param body Search request options @param [Hash] opts the optional parameters @option opts [BOOLEAN] :profile profile (default to true) @return [JsonNodeSearchResponse]

# File lib/purecloudplatformclientv2/api/search_api.rb, line 979
def post_search(body, opts = {})
  data, _status_code, _headers = post_search_with_http_info(body, opts)
  return data
end
post_search_suggest(body, opts = {}) click to toggle source

Suggest resources.

@param body Search request options @param [Hash] opts the optional parameters @option opts [BOOLEAN] :profile profile (default to true) @return [JsonNodeSearchResponse]

# File lib/purecloudplatformclientv2/api/search_api.rb, line 1053
def post_search_suggest(body, opts = {})
  data, _status_code, _headers = post_search_suggest_with_http_info(body, opts)
  return data
end
post_search_suggest_with_http_info(body, opts = {}) click to toggle source

Suggest resources.

@param body Search request options @param [Hash] opts the optional parameters @option opts [BOOLEAN] :profile profile @return [Array<(JsonNodeSearchResponse, Fixnum, Hash)>] JsonNodeSearchResponse data, response status code and response headers

# File lib/purecloudplatformclientv2/api/search_api.rb, line 1064
def post_search_suggest_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SearchApi.post_search_suggest ..."
  end
  
  
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling SearchApi.post_search_suggest" if body.nil?
  
  
  
  
  
  
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/search/suggest".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'profile'] = opts[:'profile'] if opts[:'profile']

  # header parameters
  header_params = {}

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

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['PureCloud OAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'JsonNodeSearchResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SearchApi#post_search_suggest\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_search_with_http_info(body, opts = {}) click to toggle source

Search resources.

@param body Search request options @param [Hash] opts the optional parameters @option opts [BOOLEAN] :profile profile @return [Array<(JsonNodeSearchResponse, Fixnum, Hash)>] JsonNodeSearchResponse data, response status code and response headers

# File lib/purecloudplatformclientv2/api/search_api.rb, line 990
def post_search_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SearchApi.post_search ..."
  end
  
  
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling SearchApi.post_search" if body.nil?
  
  
  
  
  
  
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/search".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'profile'] = opts[:'profile'] if opts[:'profile']

  # header parameters
  header_params = {}

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

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['PureCloud OAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'JsonNodeSearchResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SearchApi#post_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_users_search(body, opts = {}) click to toggle source

Search users

@param body Search request options @param [Hash] opts the optional parameters @return [UsersSearchResponse]

# File lib/purecloudplatformclientv2/api/search_api.rb, line 1126
def post_users_search(body, opts = {})
  data, _status_code, _headers = post_users_search_with_http_info(body, opts)
  return data
end
post_users_search_with_http_info(body, opts = {}) click to toggle source

Search users

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

# File lib/purecloudplatformclientv2/api/search_api.rb, line 1136
def post_users_search_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SearchApi.post_users_search ..."
  end
  
  
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling SearchApi.post_users_search" if body.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/users/search".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

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

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['PureCloud OAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'UsersSearchResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SearchApi#post_users_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_voicemail_search(body, opts = {}) click to toggle source

Search voicemails

@param body Search request options @param [Hash] opts the optional parameters @return [VoicemailsSearchResponse]

# File lib/purecloudplatformclientv2/api/search_api.rb, line 1191
def post_voicemail_search(body, opts = {})
  data, _status_code, _headers = post_voicemail_search_with_http_info(body, opts)
  return data
end
post_voicemail_search_with_http_info(body, opts = {}) click to toggle source

Search voicemails

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

# File lib/purecloudplatformclientv2/api/search_api.rb, line 1201
def post_voicemail_search_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SearchApi.post_voicemail_search ..."
  end
  
  
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling SearchApi.post_voicemail_search" if body.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/voicemail/search".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

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

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['PureCloud OAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'VoicemailsSearchResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SearchApi#post_voicemail_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end