Class: PureCloud::SearchApi

Inherits:
Object
  • Object
show all
Defined in:
lib/purecloudplatformclientv2/api/search_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ SearchApi

Returns a new instance of SearchApi.



23
24
25
# File 'lib/purecloudplatformclientv2/api/search_api.rb', line 23

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



21
22
23
# File 'lib/purecloudplatformclientv2/api/search_api.rb', line 21

def api_client
  @api_client
end

Instance Method Details

#get_documentation_search(q64, opts = {}) ⇒ DocumentationSearchResponse

Search documentation using the q64 value returned from a previous search

Parameters:

  • q64

    q64

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

    the optional parameters

Returns:



32
33
34
35
# File 'lib/purecloudplatformclientv2/api/search_api.rb', line 32

def get_documentation_search(q64, opts = {})
  data, _status_code, _headers = get_documentation_search_with_http_info(q64, opts)
  return data
end

#get_documentation_search_with_http_info(q64, opts = {}) ⇒ Array<(DocumentationSearchResponse, Fixnum, Hash)>

Search documentation using the q64 value returned from a previous search

Parameters:

  • q64

    q64

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

    the optional parameters

Returns:



42
43
44
45
46
47
48
49
50
51
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
# File 'lib/purecloudplatformclientv2/api/search_api.rb', line 42

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 = ['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 => '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(q64, opts = {}) ⇒ GroupsSearchResponse

Search groups using the q64 value returned from a previous search

Parameters:

  • q64

    q64

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

    the optional parameters

Options Hash (opts):

  • :expand (Array<String>)

    expand

Returns:



91
92
93
94
# File 'lib/purecloudplatformclientv2/api/search_api.rb', line 91

def get_groups_search(q64, opts = {})
  data, _status_code, _headers = get_groups_search_with_http_info(q64, opts)
  return data
end

#get_groups_search_with_http_info(q64, opts = {}) ⇒ Array<(GroupsSearchResponse, Fixnum, Hash)>

Search groups using the q64 value returned from a previous search

Parameters:

  • q64

    q64

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

    the optional parameters

Options Hash (opts):

  • :expand (Array<String>)

    expand

Returns:

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

    GroupsSearchResponse data, response status code and response headers



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
139
140
141
142
143
144
# File 'lib/purecloudplatformclientv2/api/search_api.rb', line 102

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 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 => '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(q64, opts = {}) ⇒ LocationsSearchResponse

Search locations using the q64 value returned from a previous search

Parameters:

  • q64

    q64

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

    the optional parameters

Options Hash (opts):

  • :expand (Array<String>)

    expand

Returns:



152
153
154
155
# File 'lib/purecloudplatformclientv2/api/search_api.rb', line 152

def get_locations_search(q64, opts = {})
  data, _status_code, _headers = get_locations_search_with_http_info(q64, opts)
  return data
end

#get_locations_search_with_http_info(q64, opts = {}) ⇒ Array<(LocationsSearchResponse, Fixnum, Hash)>

Search locations using the q64 value returned from a previous search

Parameters:

  • q64

    q64

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

    the optional parameters

Options Hash (opts):

  • :expand (Array<String>)

    expand

Returns:

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

    LocationsSearchResponse data, response status code and response headers



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
204
205
# File 'lib/purecloudplatformclientv2/api/search_api.rb', line 163

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 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 => '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(q64, opts = {}) ⇒ JsonNodeSearchResponse

Search using the q64 value returned from a previous search.

Parameters:

  • q64

    q64

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

    the optional parameters

Options Hash (opts):

  • :expand (Array<String>)

    Which fields, if any, to expand

  • :profile (BOOLEAN)

    profile (default to true)

Returns:



214
215
216
217
# File 'lib/purecloudplatformclientv2/api/search_api.rb', line 214

def get_search(q64, opts = {})
  data, _status_code, _headers = get_search_with_http_info(q64, opts)
  return data
end

#get_search_suggest(q64, opts = {}) ⇒ JsonNodeSearchResponse

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

Parameters:

  • q64

    q64

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

    the optional parameters

Options Hash (opts):

  • :expand (Array<String>)

    Which fields, if any, to expand

  • :profile (BOOLEAN)

    profile (default to true)

Returns:



278
279
280
281
# File 'lib/purecloudplatformclientv2/api/search_api.rb', line 278

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 = {}) ⇒ Array<(JsonNodeSearchResponse, Fixnum, Hash)>

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

Parameters:

  • q64

    q64

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

    the optional parameters

Options Hash (opts):

  • :expand (Array<String>)

    Which fields, if any, to expand

  • :profile (BOOLEAN)

    profile

Returns:

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

    JsonNodeSearchResponse data, response status code and response headers



290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
# File 'lib/purecloudplatformclientv2/api/search_api.rb', line 290

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 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 => '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 = {}) ⇒ Array<(JsonNodeSearchResponse, Fixnum, Hash)>

Search using the q64 value returned from a previous search.

Parameters:

  • q64

    q64

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

    the optional parameters

Options Hash (opts):

  • :expand (Array<String>)

    Which fields, if any, to expand

  • :profile (BOOLEAN)

    profile

Returns:

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

    JsonNodeSearchResponse data, response status code and response headers



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
269
# File 'lib/purecloudplatformclientv2/api/search_api.rb', line 226

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 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 => '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(q64, opts = {}) ⇒ UsersSearchResponse

Search users using the q64 value returned from a previous search

Parameters:

  • q64

    q64

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

    the optional parameters

Options Hash (opts):

  • :expand (Array<String>)

    expand

Returns:



341
342
343
344
# File 'lib/purecloudplatformclientv2/api/search_api.rb', line 341

def get_users_search(q64, opts = {})
  data, _status_code, _headers = get_users_search_with_http_info(q64, opts)
  return data
end

#get_users_search_with_http_info(q64, opts = {}) ⇒ Array<(UsersSearchResponse, Fixnum, Hash)>

Search users using the q64 value returned from a previous search

Parameters:

  • q64

    q64

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

    the optional parameters

Options Hash (opts):

  • :expand (Array<String>)

    expand

Returns:

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

    UsersSearchResponse data, response status code and response headers



352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
# File 'lib/purecloudplatformclientv2/api/search_api.rb', line 352

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?
  # 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']

  # 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 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 => '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(q64, opts = {}) ⇒ VoicemailsSearchResponse

Search voicemails using the q64 value returned from a previous search

Parameters:

  • q64

    q64

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

    the optional parameters

Options Hash (opts):

  • :expand (Array<String>)

    expand

Returns:



402
403
404
405
# File 'lib/purecloudplatformclientv2/api/search_api.rb', line 402

def get_voicemail_search(q64, opts = {})
  data, _status_code, _headers = get_voicemail_search_with_http_info(q64, opts)
  return data
end

#get_voicemail_search_with_http_info(q64, opts = {}) ⇒ Array<(VoicemailsSearchResponse, Fixnum, Hash)>

Search voicemails using the q64 value returned from a previous search

Parameters:

  • q64

    q64

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

    the optional parameters

Options Hash (opts):

  • :expand (Array<String>)

    expand

Returns:

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

    VoicemailsSearchResponse data, response status code and response headers



413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
# File 'lib/purecloudplatformclientv2/api/search_api.rb', line 413

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 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 => '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_search(body, opts = {}) ⇒ DocumentationSearchResponse

Search documentation

Parameters:

  • body

    Search request options

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

    the optional parameters

Returns:



462
463
464
465
# File 'lib/purecloudplatformclientv2/api/search_api.rb', line 462

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 = {}) ⇒ Array<(DocumentationSearchResponse, Fixnum, Hash)>

Search documentation

Parameters:

  • body

    Search request options

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

    the optional parameters

Returns:



472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
# File 'lib/purecloudplatformclientv2/api/search_api.rb', line 472

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 = ['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 => '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 = {}) ⇒ GroupsSearchResponse

Search groups

Parameters:

  • body

    Search request options

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

    the optional parameters

Returns:



519
520
521
522
# File 'lib/purecloudplatformclientv2/api/search_api.rb', line 519

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 = {}) ⇒ Array<(GroupsSearchResponse, Fixnum, Hash)>

Search groups

Parameters:

  • body

    Search request options

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

    the optional parameters

Returns:

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

    GroupsSearchResponse data, response status code and response headers



529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
# File 'lib/purecloudplatformclientv2/api/search_api.rb', line 529

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 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 => '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_locations_search(body, opts = {}) ⇒ LocationsSearchResponse

Search locations

Parameters:

  • body

    Search request options

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

    the optional parameters

Returns:



576
577
578
579
# File 'lib/purecloudplatformclientv2/api/search_api.rb', line 576

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 = {}) ⇒ Array<(LocationsSearchResponse, Fixnum, Hash)>

Search locations

Parameters:

  • body

    Search request options

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

    the optional parameters

Returns:

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

    LocationsSearchResponse data, response status code and response headers



586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
# File 'lib/purecloudplatformclientv2/api/search_api.rb', line 586

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 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 => '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 = {}) ⇒ JsonNodeSearchResponse

Search resources.

Parameters:

  • body

    Search request options

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

    the optional parameters

Options Hash (opts):

  • :profile (BOOLEAN)

    profile (default to true)

Returns:



634
635
636
637
# File 'lib/purecloudplatformclientv2/api/search_api.rb', line 634

def post_search(body, opts = {})
  data, _status_code, _headers = post_search_with_http_info(body, opts)
  return data
end

#post_search_suggest(body, opts = {}) ⇒ JsonNodeSearchResponse

Suggest resources.

Parameters:

  • body

    Search request options

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

    the optional parameters

Options Hash (opts):

  • :profile (BOOLEAN)

    profile (default to true)

Returns:



694
695
696
697
# File 'lib/purecloudplatformclientv2/api/search_api.rb', line 694

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 = {}) ⇒ Array<(JsonNodeSearchResponse, Fixnum, Hash)>

Suggest resources.

Parameters:

  • body

    Search request options

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

    the optional parameters

Options Hash (opts):

  • :profile (BOOLEAN)

    profile

Returns:

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

    JsonNodeSearchResponse data, response status code and response headers



705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
# File 'lib/purecloudplatformclientv2/api/search_api.rb', line 705

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 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 => '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 = {}) ⇒ Array<(JsonNodeSearchResponse, Fixnum, Hash)>

Search resources.

Parameters:

  • body

    Search request options

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

    the optional parameters

Options Hash (opts):

  • :profile (BOOLEAN)

    profile

Returns:

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

    JsonNodeSearchResponse data, response status code and response headers



645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
# File 'lib/purecloudplatformclientv2/api/search_api.rb', line 645

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 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 => '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 = {}) ⇒ UsersSearchResponse

Search users

Parameters:

  • body

    Search request options

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

    the optional parameters

Returns:



753
754
755
756
# File 'lib/purecloudplatformclientv2/api/search_api.rb', line 753

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 = {}) ⇒ Array<(UsersSearchResponse, Fixnum, Hash)>

Search users

Parameters:

  • body

    Search request options

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

    the optional parameters

Returns:

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

    UsersSearchResponse data, response status code and response headers



763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
# File 'lib/purecloudplatformclientv2/api/search_api.rb', line 763

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 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 => '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 = {}) ⇒ VoicemailsSearchResponse

Search voicemails

Parameters:

  • body

    Search request options

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

    the optional parameters

Returns:



810
811
812
813
# File 'lib/purecloudplatformclientv2/api/search_api.rb', line 810

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 = {}) ⇒ Array<(VoicemailsSearchResponse, Fixnum, Hash)>

Search voicemails

Parameters:

  • body

    Search request options

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

    the optional parameters

Returns:

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

    VoicemailsSearchResponse data, response status code and response headers



820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
# File 'lib/purecloudplatformclientv2/api/search_api.rb', line 820

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 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 => '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