--- 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(q64, 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 q64 = "q64_example" # String | q64 opts = { expand: ["expand_example"] # Array | expand } begin #Search using q64 result = api_instance.get_search(q64, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling SearchApi->get_search: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **q64** | **String**| q64 | **expand** | [**Array<String>**](String.html)| expand | [optional] {: class="table table-striped"} ### Return type [**GroupsSearchResponse**](GroupsSearchResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**LocationsSearchResponse**](LocationsSearchResponse.html) get_search_0(q64, 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 q64 = "q64_example" # String | q64 opts = { expand: ["expand_example"] # Array | expand } begin #Search using q64 result = api_instance.get_search_0(q64, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling SearchApi->get_search_0: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **q64** | **String**| q64 | **expand** | [**Array<String>**](String.html)| expand | [optional] {: class="table table-striped"} ### Return type [**LocationsSearchResponse**](LocationsSearchResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**JsonNodeSearchResponse**](JsonNodeSearchResponse.html) get_search_1(q64, 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 q64 = "q64_example" # String | q64 opts = { expand: ["expand_example"], # Array | expand profile: true # BOOLEAN | profile } begin #Search using q64 result = api_instance.get_search_1(q64, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling SearchApi->get_search_1: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **q64** | **String**| q64 | **expand** | [**Array<String>**](String.html)| expand | [optional] **profile** | **BOOLEAN**| profile | [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(q64, 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 q64 = "q64_example" # String | q64 opts = { expand: ["expand_example"] # Array | expand } begin #Search using q64 result = api_instance.get_search_2(q64, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling SearchApi->get_search_2: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **q64** | **String**| q64 | **expand** | [**Array<String>**](String.html)| expand | [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(q64, 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 q64 = "q64_example" # String | q64 opts = { profile: true # BOOLEAN | profile } begin #Suggest using q64 result = api_instance.get_suggest(q64, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling SearchApi->get_suggest: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **q64** | **String**| q64 | **profile** | **BOOLEAN**| profile | [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(body) 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 body = PureCloud::GroupSearchRequest.new # GroupSearchRequest | Search request options begin #Search result = api_instance.post_search(body) p result rescue PureCloud::ApiError => e puts "Exception when calling SearchApi->post_search: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**GroupSearchRequest**](GroupSearchRequest.html)| Search request options | {: class="table table-striped"} ### Return type [**GroupsSearchResponse**](GroupsSearchResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**LocationsSearchResponse**](LocationsSearchResponse.html) post_search_0(body) 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 body = PureCloud::LocationSearchRequest.new # LocationSearchRequest | Search request options begin #Search result = api_instance.post_search_0(body) p result rescue PureCloud::ApiError => e puts "Exception when calling SearchApi->post_search_0: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**LocationSearchRequest**](LocationSearchRequest.html)| Search request options | {: class="table table-striped"} ### Return type [**LocationsSearchResponse**](LocationsSearchResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**JsonNodeSearchResponse**](JsonNodeSearchResponse.html) post_search_1(body, 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 body = PureCloud::SearchRequest.new # SearchRequest | Search request options opts = { profile: true # BOOLEAN | profile } begin #Search result = api_instance.post_search_1(body, 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 | **profile** | **BOOLEAN**| profile | [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(body) 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 body = PureCloud::UserSearchRequest.new # UserSearchRequest | Search request options begin #Search result = api_instance.post_search_2(body) p result rescue PureCloud::ApiError => e puts "Exception when calling SearchApi->post_search_2: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**UserSearchRequest**](UserSearchRequest.html)| Search request options | {: class="table table-striped"} ### Return type [**UsersSearchResponse**](UsersSearchResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**JsonNodeSearchResponse**](JsonNodeSearchResponse.html) post_suggest(body, 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 body = PureCloud::SuggestSearchRequest.new # SuggestSearchRequest | Search request options opts = { profile: true # BOOLEAN | profile } begin #Suggest result = api_instance.post_suggest(body, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling SearchApi->post_suggest: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**SuggestSearchRequest**](SuggestSearchRequest.html)| Search request options | **profile** | **BOOLEAN**| profile | [optional] [default to true] {: class="table table-striped"} ### Return type [**JsonNodeSearchResponse**](JsonNodeSearchResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json