Class: PureCloud::SearchApi

Inherits:
Object
  • Object
show all
Defined in:
lib/purecloud/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/purecloud/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/purecloud/api/search_api.rb', line 21

def api_client
  @api_client
end

Instance Method Details

#get_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/purecloud/api/search_api.rb', line 32

def get_search(q64, opts = {})
  data, status_code, headers = get_search_with_http_info(q64, opts)
  return data
end

#get_search_0(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:



94
95
96
97
# File 'lib/purecloud/api/search_api.rb', line 94

def get_search_0(q64, opts = {})
  data, status_code, headers = get_search_0_with_http_info(q64, opts)
  return data
end

#get_search_0_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



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
145
146
147
148
149
150
# File 'lib/purecloud/api/search_api.rb', line 105

def get_search_0_with_http_info(q64, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SearchApi#get_search_0 ..."
  end
  
  # verify the required parameter 'q64' is set
  fail "Missing the required parameter 'q64' when calling get_search_0" 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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

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

  # form parameters
  form_params = {}

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

#get_search_1(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:



158
159
160
161
# File 'lib/purecloud/api/search_api.rb', line 158

def get_search_1(q64, opts = {})
  data, status_code, headers = get_search_1_with_http_info(q64, opts)
  return data
end

#get_search_1_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



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
206
207
208
209
210
211
212
213
214
# File 'lib/purecloud/api/search_api.rb', line 169

def get_search_1_with_http_info(q64, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SearchApi#get_search_1 ..."
  end
  
  # verify the required parameter 'q64' is set
  fail "Missing the required parameter 'q64' when calling get_search_1" 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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

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

  # form parameters
  form_params = {}

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

#get_search_2(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:



223
224
225
226
# File 'lib/purecloud/api/search_api.rb', line 223

def get_search_2(q64, opts = {})
  data, status_code, headers = get_search_2_with_http_info(q64, opts)
  return data
end

#get_search_2_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



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
270
271
272
273
274
275
276
277
278
279
280
281
# File 'lib/purecloud/api/search_api.rb', line 235

def get_search_2_with_http_info(q64, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SearchApi#get_search_2 ..."
  end
  
  # verify the required parameter 'q64' is set
  fail "Missing the required parameter 'q64' when calling get_search_2" 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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

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

  # form parameters
  form_params = {}

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

#get_search_3(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:



289
290
291
292
# File 'lib/purecloud/api/search_api.rb', line 289

def get_search_3(q64, opts = {})
  data, status_code, headers = get_search_3_with_http_info(q64, opts)
  return data
end

#get_search_3_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



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
334
335
336
337
338
339
340
341
342
343
344
345
# File 'lib/purecloud/api/search_api.rb', line 300

def get_search_3_with_http_info(q64, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SearchApi#get_search_3 ..."
  end
  
  # verify the required parameter 'q64' is set
  fail "Missing the required parameter 'q64' when calling get_search_3" 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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

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

  # form parameters
  form_params = {}

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

#get_search_4(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:



353
354
355
356
# File 'lib/purecloud/api/search_api.rb', line 353

def get_search_4(q64, opts = {})
  data, status_code, headers = get_search_4_with_http_info(q64, opts)
  return data
end

#get_search_4_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



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
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
# File 'lib/purecloud/api/search_api.rb', line 364

def get_search_4_with_http_info(q64, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SearchApi#get_search_4 ..."
  end
  
  # verify the required parameter 'q64' is set
  fail "Missing the required parameter 'q64' when calling get_search_4" 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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

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

  # form parameters
  form_params = {}

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

#get_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
84
85
86
# File 'lib/purecloud/api/search_api.rb', line 42

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 "Missing the required parameter 'q64' when calling get_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DocumentationSearchResponse')
  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_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:



418
419
420
421
# File 'lib/purecloud/api/search_api.rb', line 418

def get_suggest(q64, opts = {})
  data, status_code, headers = get_suggest_with_http_info(q64, opts)
  return data
end

#get_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



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
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
# File 'lib/purecloud/api/search_api.rb', line 430

def get_suggest_with_http_info(q64, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SearchApi#get_suggest ..."
  end
  
  # verify the required parameter 'q64' is set
  fail "Missing the required parameter 'q64' when calling get_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

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

  # form parameters
  form_params = {}

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

#post_search(body, opts = {}) ⇒ DocumentationSearchResponse

Search documentation

Parameters:

  • body

    Search request options

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

    the optional parameters

Returns:



483
484
485
486
# File 'lib/purecloud/api/search_api.rb', line 483

def post_search(body, opts = {})
  data, status_code, headers = post_search_with_http_info(body, opts)
  return data
end

#post_search_0(body, opts = {}) ⇒ GroupsSearchResponse

Search groups

Parameters:

  • body

    Search request options

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

    the optional parameters

Returns:



543
544
545
546
# File 'lib/purecloud/api/search_api.rb', line 543

def post_search_0(body, opts = {})
  data, status_code, headers = post_search_0_with_http_info(body, opts)
  return data
end

#post_search_0_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



553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
# File 'lib/purecloud/api/search_api.rb', line 553

def post_search_0_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SearchApi#post_search_0 ..."
  end
  
  # verify the required parameter 'body' is set
  fail "Missing the required parameter 'body' when calling post_search_0" 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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(: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_search_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_search_1(body, opts = {}) ⇒ LocationsSearchResponse

Search locations

Parameters:

  • body

    Search request options

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

    the optional parameters

Returns:



603
604
605
606
# File 'lib/purecloud/api/search_api.rb', line 603

def post_search_1(body, opts = {})
  data, status_code, headers = post_search_1_with_http_info(body, opts)
  return data
end

#post_search_1_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



613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
# File 'lib/purecloud/api/search_api.rb', line 613

def post_search_1_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SearchApi#post_search_1 ..."
  end
  
  # verify the required parameter 'body' is set
  fail "Missing the required parameter 'body' when calling post_search_1" 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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(: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_search_1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_search_2(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:



664
665
666
667
# File 'lib/purecloud/api/search_api.rb', line 664

def post_search_2(body, opts = {})
  data, status_code, headers = post_search_2_with_http_info(body, opts)
  return data
end

#post_search_2_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



675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
# File 'lib/purecloud/api/search_api.rb', line 675

def post_search_2_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SearchApi#post_search_2 ..."
  end
  
  # verify the required parameter 'body' is set
  fail "Missing the required parameter 'body' when calling post_search_2" 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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(: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_2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_search_3(body, opts = {}) ⇒ UsersSearchResponse

Search users

Parameters:

  • body

    Search request options

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

    the optional parameters

Returns:



726
727
728
729
# File 'lib/purecloud/api/search_api.rb', line 726

def post_search_3(body, opts = {})
  data, status_code, headers = post_search_3_with_http_info(body, opts)
  return data
end

#post_search_3_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



736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
# File 'lib/purecloud/api/search_api.rb', line 736

def post_search_3_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SearchApi#post_search_3 ..."
  end
  
  # verify the required parameter 'body' is set
  fail "Missing the required parameter 'body' when calling post_search_3" 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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(: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_search_3\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_search_4(body, opts = {}) ⇒ VoicemailsSearchResponse

Search voicemails

Parameters:

  • body

    Search request options

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

    the optional parameters

Returns:



786
787
788
789
# File 'lib/purecloud/api/search_api.rb', line 786

def post_search_4(body, opts = {})
  data, status_code, headers = post_search_4_with_http_info(body, opts)
  return data
end

#post_search_4_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



796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
# File 'lib/purecloud/api/search_api.rb', line 796

def post_search_4_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SearchApi#post_search_4 ..."
  end
  
  # verify the required parameter 'body' is set
  fail "Missing the required parameter 'body' when calling post_search_4" 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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(: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_search_4\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_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:



493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
# File 'lib/purecloud/api/search_api.rb', line 493

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 "Missing the required parameter 'body' when calling post_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(: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_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_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:



847
848
849
850
# File 'lib/purecloud/api/search_api.rb', line 847

def post_suggest(body, opts = {})
  data, status_code, headers = post_suggest_with_http_info(body, opts)
  return data
end

#post_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



858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
# File 'lib/purecloud/api/search_api.rb', line 858

def post_suggest_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: SearchApi#post_suggest ..."
  end
  
  # verify the required parameter 'body' is set
  fail "Missing the required parameter 'body' when calling post_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(: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_suggest\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end