--- title: SearchApi --- ## PureCloud::SearchApi All URIs are relative to *https://api.mypurecloud.com* Method | HTTP request | Description ------------- | ------------- | ------------- |[**get_search**](SearchApi.html#get_search) | **GET** /api/v2/groups/search | Search using q64| |[**get_search_0**](SearchApi.html#get_search_0) | **GET** /api/v2/locations/search | Search using q64| |[**get_search_1**](SearchApi.html#get_search_1) | **GET** /api/v2/search | Search using q64| |[**get_search_2**](SearchApi.html#get_search_2) | **GET** /api/v2/users/search | Search using q64| |[**get_suggest**](SearchApi.html#get_suggest) | **GET** /api/v2/search/suggest | Suggest using q64| |[**post_search**](SearchApi.html#post_search) | **POST** /api/v2/groups/search | Search| |[**post_search_0**](SearchApi.html#post_search_0) | **POST** /api/v2/locations/search | Search| |[**post_search_1**](SearchApi.html#post_search_1) | **POST** /api/v2/search | Search| |[**post_search_2**](SearchApi.html#post_search_2) | **POST** /api/v2/users/search | Search| |[**post_suggest**](SearchApi.html#post_suggest) | **POST** /api/v2/search/suggest | Suggest| {: class="table table-striped"} ## -[**GroupsSearchResponse**](GroupsSearchResponse.html) get_search(opts) Search using q64 ### Example ~~~ruby # load the gem require 'purecloud' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::SearchApi.new opts = { q64: "q64_example", # String | expand: ["expand_example"] # Array | } begin #Search using q64 result = api_instance.get_search(opts) p result rescue PureCloud::ApiError => e puts "Exception when calling SearchApi->get_search: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **q64** | **String**| | [optional] **expand** | [**Array<String>**](String.html)| | [optional] {: class="table table-striped"} ### Return type [**GroupsSearchResponse**](GroupsSearchResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**GroupsSearchResponse**](GroupsSearchResponse.html) get_search_0(opts) Search using q64 ### Example ~~~ruby # load the gem require 'purecloud' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::SearchApi.new opts = { q64: "q64_example", # String | expand: ["expand_example"] # Array | } begin #Search using q64 result = api_instance.get_search_0(opts) p result rescue PureCloud::ApiError => e puts "Exception when calling SearchApi->get_search_0: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **q64** | **String**| | [optional] **expand** | [**Array<String>**](String.html)| | [optional] {: class="table table-striped"} ### Return type [**GroupsSearchResponse**](GroupsSearchResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**JsonNodeSearchResponse**](JsonNodeSearchResponse.html) get_search_1(opts) Search using q64 ### Example ~~~ruby # load the gem require 'purecloud' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::SearchApi.new opts = { q64: "q64_example", # String | expand: ["expand_example"], # Array | profile: true # BOOLEAN | } begin #Search using q64 result = api_instance.get_search_1(opts) p result rescue PureCloud::ApiError => e puts "Exception when calling SearchApi->get_search_1: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **q64** | **String**| | [optional] **expand** | [**Array<String>**](String.html)| | [optional] **profile** | **BOOLEAN**| | [optional] [default to true] {: class="table table-striped"} ### Return type [**JsonNodeSearchResponse**](JsonNodeSearchResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**UsersSearchResponse**](UsersSearchResponse.html) get_search_2(opts) Search using q64 ### Example ~~~ruby # load the gem require 'purecloud' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::SearchApi.new opts = { q64: "q64_example", # String | expand: ["expand_example"] # Array | } begin #Search using q64 result = api_instance.get_search_2(opts) p result rescue PureCloud::ApiError => e puts "Exception when calling SearchApi->get_search_2: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **q64** | **String**| | [optional] **expand** | [**Array<String>**](String.html)| | [optional] {: class="table table-striped"} ### Return type [**UsersSearchResponse**](UsersSearchResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**JsonNodeSearchResponse**](JsonNodeSearchResponse.html) get_suggest(opts) Suggest using q64 ### Example ~~~ruby # load the gem require 'purecloud' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::SearchApi.new opts = { q64: "q64_example", # String | profile: true # BOOLEAN | } begin #Suggest using q64 result = api_instance.get_suggest(opts) p result rescue PureCloud::ApiError => e puts "Exception when calling SearchApi->get_suggest: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **q64** | **String**| | [optional] **profile** | **BOOLEAN**| | [optional] [default to true] {: class="table table-striped"} ### Return type [**JsonNodeSearchResponse**](JsonNodeSearchResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**GroupsSearchResponse**](GroupsSearchResponse.html) post_search(opts) Search ### Example ~~~ruby # load the gem require 'purecloud' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::SearchApi.new opts = { body: PureCloud::SearchRequest.new # SearchRequest | Search request options } begin #Search result = api_instance.post_search(opts) p result rescue PureCloud::ApiError => e puts "Exception when calling SearchApi->post_search: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**SearchRequest**](SearchRequest.html)| Search request options | [optional] {: class="table table-striped"} ### Return type [**GroupsSearchResponse**](GroupsSearchResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**GroupsSearchResponse**](GroupsSearchResponse.html) post_search_0(opts) Search ### Example ~~~ruby # load the gem require 'purecloud' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::SearchApi.new opts = { body: PureCloud::SearchRequest.new # SearchRequest | Search request options } begin #Search result = api_instance.post_search_0(opts) p result rescue PureCloud::ApiError => e puts "Exception when calling SearchApi->post_search_0: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**SearchRequest**](SearchRequest.html)| Search request options | [optional] {: class="table table-striped"} ### Return type [**GroupsSearchResponse**](GroupsSearchResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**JsonNodeSearchResponse**](JsonNodeSearchResponse.html) post_search_1(opts) Search ### Example ~~~ruby # load the gem require 'purecloud' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::SearchApi.new opts = { body: PureCloud::SearchRequest.new, # SearchRequest | Search request options profile: true # BOOLEAN | } begin #Search result = api_instance.post_search_1(opts) p result rescue PureCloud::ApiError => e puts "Exception when calling SearchApi->post_search_1: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**SearchRequest**](SearchRequest.html)| Search request options | [optional] **profile** | **BOOLEAN**| | [optional] [default to true] {: class="table table-striped"} ### Return type [**JsonNodeSearchResponse**](JsonNodeSearchResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**UsersSearchResponse**](UsersSearchResponse.html) post_search_2(opts) Search ### Example ~~~ruby # load the gem require 'purecloud' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::SearchApi.new opts = { body: PureCloud::SearchRequest.new # SearchRequest | Search request options } begin #Search result = api_instance.post_search_2(opts) p result rescue PureCloud::ApiError => e puts "Exception when calling SearchApi->post_search_2: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**SearchRequest**](SearchRequest.html)| Search request options | [optional] {: class="table table-striped"} ### Return type [**UsersSearchResponse**](UsersSearchResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**JsonNodeSearchResponse**](JsonNodeSearchResponse.html) post_suggest(opts) Suggest ### Example ~~~ruby # load the gem require 'purecloud' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::SearchApi.new opts = { body: PureCloud::SearchRequest.new, # SearchRequest | Search request options profile: true # BOOLEAN | } begin #Suggest result = api_instance.post_suggest(opts) p result rescue PureCloud::ApiError => e puts "Exception when calling SearchApi->post_suggest: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**SearchRequest**](SearchRequest.html)| Search request options | [optional] **profile** | **BOOLEAN**| | [optional] [default to true] {: class="table table-striped"} ### Return type [**JsonNodeSearchResponse**](JsonNodeSearchResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json