---
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 groups using the q64 value returned from a previous search|
|[**get_search_0**](SearchApi.html#get_search_0) | **GET** /api/v2/locations/search | Search locations using the q64 value returned from a previous search|
|[**get_search_1**](SearchApi.html#get_search_1) | **GET** /api/v2/search | Search using the q64 value returned from a previous search.|
|[**get_search_2**](SearchApi.html#get_search_2) | **GET** /api/v2/users/search | Search users using the q64 value returned from a previous search|
|[**get_search_3**](SearchApi.html#get_search_3) | **GET** /api/v2/voicemail/search | Search voicemails using the q64 value returned from a previous search|
|[**get_suggest**](SearchApi.html#get_suggest) | **GET** /api/v2/search/suggest | Suggest resources using the q64 value returned from a previous suggest query.|
|[**post_search**](SearchApi.html#post_search) | **POST** /api/v2/groups/search | Search groups|
|[**post_search_0**](SearchApi.html#post_search_0) | **POST** /api/v2/locations/search | Search locations|
|[**post_search_1**](SearchApi.html#post_search_1) | **POST** /api/v2/search | Search resources.|
|[**post_search_2**](SearchApi.html#post_search_2) | **POST** /api/v2/users/search | Search users|
|[**post_search_3**](SearchApi.html#post_search_3) | **POST** /api/v2/voicemail/search | Search voicemails|
|[**post_suggest**](SearchApi.html#post_suggest) | **POST** /api/v2/search/suggest | Suggest resources.|
{: class="table table-striped"}
## -[**GroupsSearchResponse**](GroupsSearchResponse.html) get_search(q64, opts)
Search groups using the q64 value returned from a previous 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
q64 = "q64_example" # String | q64
opts = {
expand: ["expand_example"] # Array | expand
}
begin
#Search groups using the q64 value returned from a previous search
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 locations using the q64 value returned from a previous 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
q64 = "q64_example" # String | q64
opts = {
expand: ["expand_example"] # Array | expand
}
begin
#Search locations using the q64 value returned from a previous search
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 the q64 value returned from a previous 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
q64 = "q64_example" # String | q64
opts = {
expand: ["expand_example"], # Array | Which fields, if any, to expand
profile: true # BOOLEAN | profile
}
begin
#Search using the q64 value returned from a previous search.
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)| Which fields, if any, to 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 users using the q64 value returned from a previous 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
q64 = "q64_example" # String | q64
opts = {
expand: ["expand_example"] # Array | expand
}
begin
#Search users using the q64 value returned from a previous search
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
## -[**VoicemailsSearchResponse**](VoicemailsSearchResponse.html) get_search_3(q64, opts)
Search voicemails using the q64 value returned from a previous 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
q64 = "q64_example" # String | q64
opts = {
expand: ["expand_example"] # Array | expand
}
begin
#Search voicemails using the q64 value returned from a previous search
result = api_instance.get_search_3(q64, opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling SearchApi->get_search_3: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**q64** | **String**| q64 |
**expand** | [**Array<String>**](String.html)| expand | [optional]
{: class="table table-striped"}
### Return type
[**VoicemailsSearchResponse**](VoicemailsSearchResponse.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**JsonNodeSearchResponse**](JsonNodeSearchResponse.html) get_suggest(q64, opts)
Suggest resources using the q64 value returned from a previous suggest query.
### 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 | Which fields, if any, to expand
profile: true # BOOLEAN | profile
}
begin
#Suggest resources using the q64 value returned from a previous suggest query.
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 |
**expand** | [**Array<String>**](String.html)| Which fields, if any, to 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
## -[**GroupsSearchResponse**](GroupsSearchResponse.html) post_search(body)
Search groups
### 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 groups
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 locations
### 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 locations
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 resources.
### 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 resources.
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 users
### 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 users
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
## -[**VoicemailsSearchResponse**](VoicemailsSearchResponse.html) post_search_3(body)
Search voicemails
### 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::VoicemailSearchRequest.new # VoicemailSearchRequest | Search request options
begin
#Search voicemails
result = api_instance.post_search_3(body)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling SearchApi->post_search_3: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**VoicemailSearchRequest**](VoicemailSearchRequest.html)| Search request options |
{: class="table table-striped"}
### Return type
[**VoicemailsSearchResponse**](VoicemailsSearchResponse.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**JsonNodeSearchResponse**](JsonNodeSearchResponse.html) post_suggest(body, opts)
Suggest resources.
### 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 resources.
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