---
title: SearchApi
---
## PureCloud::SearchApi
All URIs are relative to *https://api.mypurecloud.com*
Method | Description
------------- | ------------- | -------------
[**get_documentation_search**](SearchApi.html#get_documentation_search) | Search documentation using the q64 value returned from a previous search
[**get_groups_search**](SearchApi.html#get_groups_search) | Search groups using the q64 value returned from a previous search
[**get_locations_search**](SearchApi.html#get_locations_search) | Search locations using the q64 value returned from a previous search
[**get_search**](SearchApi.html#get_search) | Search using the q64 value returned from a previous search.
[**get_search_suggest**](SearchApi.html#get_search_suggest) | Suggest resources using the q64 value returned from a previous suggest query.
[**get_users_search**](SearchApi.html#get_users_search) | Search users using the q64 value returned from a previous search
[**get_voicemail_search**](SearchApi.html#get_voicemail_search) | Search voicemails using the q64 value returned from a previous search
[**post_documentation_search**](SearchApi.html#post_documentation_search) | Search documentation
[**post_groups_search**](SearchApi.html#post_groups_search) | Search groups
[**post_locations_search**](SearchApi.html#post_locations_search) | Search locations
[**post_search**](SearchApi.html#post_search) | Search resources.
[**post_search_suggest**](SearchApi.html#post_search_suggest) | Suggest resources.
[**post_users_search**](SearchApi.html#post_users_search) | Search users
[**post_voicemail_search**](SearchApi.html#post_voicemail_search) | Search voicemails
{: class="table table-striped"}
## -[**DocumentationSearchResponse**](DocumentationSearchResponse.html) get_documentation_search(q64)
Search documentation using the q64 value returned from a previous search
Wraps GET /api/v2/documentation/search
Requires NO permissions:
### Example
~~~ruby
# load the gem
require 'purecloudplatformclientv2'
# 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
begin
#Search documentation using the q64 value returned from a previous search
result = api_instance.get_documentation_search(q64)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling SearchApi->get_documentation_search: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**q64** | **String**| q64 | |
{: class="table table-striped"}
### Return type
[**DocumentationSearchResponse**](DocumentationSearchResponse.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**GroupsSearchResponse**](GroupsSearchResponse.html) get_groups_search(q64, opts)
Search groups using the q64 value returned from a previous search
Wraps GET /api/v2/groups/search
Requires NO permissions:
### Example
~~~ruby
# load the gem
require 'purecloudplatformclientv2'
# 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_groups_search(q64, opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling SearchApi->get_groups_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_locations_search(q64, opts)
Search locations using the q64 value returned from a previous search
Wraps GET /api/v2/locations/search
Requires NO permissions:
### Example
~~~ruby
# load the gem
require 'purecloudplatformclientv2'
# 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_locations_search(q64, opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling SearchApi->get_locations_search: #{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(q64, opts)
Search using the q64 value returned from a previous search.
Wraps GET /api/v2/search
Requires NO permissions:
### Example
~~~ruby
# load the gem
require 'purecloudplatformclientv2'
# 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(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)| Which fields, if any, to expand | [optional]
**Values**: routingStatus, presence, conversationSummary, outOfOffice, geolocation, station, authorization, profileSkills, locations, groups, callerUser.routingStatus, callerUser.primaryPresence, callerUser.conversationSummary, callerUser.outOfOffice, callerUser.geolocation |
**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
## -[**JsonNodeSearchResponse**](JsonNodeSearchResponse.html) get_search_suggest(q64, opts)
Suggest resources using the q64 value returned from a previous suggest query.
Wraps GET /api/v2/search/suggest
Requires NO permissions:
### Example
~~~ruby
# load the gem
require 'purecloudplatformclientv2'
# 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_search_suggest(q64, opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling SearchApi->get_search_suggest: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**q64** | **String**| q64 | |
**expand** | [**Array<String>**](String.html)| Which fields, if any, to expand | [optional]
**Values**: routingStatus, presence, conversationSummary, outOfOffice, geolocation, station, authorization, profileSkills, locations, groups, callerUser.routingStatus, callerUser.primaryPresence, callerUser.conversationSummary, callerUser.outOfOffice, callerUser.geolocation |
**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_users_search(q64, opts)
Search users using the q64 value returned from a previous search
Wraps GET /api/v2/users/search
Requires NO permissions:
### Example
~~~ruby
# load the gem
require 'purecloudplatformclientv2'
# 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_users_search(q64, opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling SearchApi->get_users_search: #{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_voicemail_search(q64, opts)
Search voicemails using the q64 value returned from a previous search
Wraps GET /api/v2/voicemail/search
Requires NO permissions:
### Example
~~~ruby
# load the gem
require 'purecloudplatformclientv2'
# 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_voicemail_search(q64, opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling SearchApi->get_voicemail_search: #{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
## -[**DocumentationSearchResponse**](DocumentationSearchResponse.html) post_documentation_search(body)
Search documentation
Wraps POST /api/v2/documentation/search
Requires NO permissions:
### Example
~~~ruby
# load the gem
require 'purecloudplatformclientv2'
# 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::DocumentationSearchRequest.new # DocumentationSearchRequest | Search request options
begin
#Search documentation
result = api_instance.post_documentation_search(body)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling SearchApi->post_documentation_search: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**DocumentationSearchRequest**](DocumentationSearchRequest.html)| Search request options | |
{: class="table table-striped"}
### Return type
[**DocumentationSearchResponse**](DocumentationSearchResponse.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**GroupsSearchResponse**](GroupsSearchResponse.html) post_groups_search(body)
Search groups
Wraps POST /api/v2/groups/search
Requires NO permissions:
### Example
~~~ruby
# load the gem
require 'purecloudplatformclientv2'
# 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_groups_search(body)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling SearchApi->post_groups_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_locations_search(body)
Search locations
Wraps POST /api/v2/locations/search
Requires NO permissions:
### Example
~~~ruby
# load the gem
require 'purecloudplatformclientv2'
# 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_locations_search(body)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling SearchApi->post_locations_search: #{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(body, opts)
Search resources.
Wraps POST /api/v2/search
Requires NO permissions:
### Example
~~~ruby
# load the gem
require 'purecloudplatformclientv2'
# 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(body, 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 | |
**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
## -[**JsonNodeSearchResponse**](JsonNodeSearchResponse.html) post_search_suggest(body, opts)
Suggest resources.
Wraps POST /api/v2/search/suggest
Requires NO permissions:
### Example
~~~ruby
# load the gem
require 'purecloudplatformclientv2'
# 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_search_suggest(body, opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling SearchApi->post_search_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
## -[**UsersSearchResponse**](UsersSearchResponse.html) post_users_search(body)
Search users
Wraps POST /api/v2/users/search
Requires NO permissions:
### Example
~~~ruby
# load the gem
require 'purecloudplatformclientv2'
# 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_users_search(body)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling SearchApi->post_users_search: #{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_voicemail_search(body)
Search voicemails
Wraps POST /api/v2/voicemail/search
Requires NO permissions:
### Example
~~~ruby
# load the gem
require 'purecloudplatformclientv2'
# 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_voicemail_search(body)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling SearchApi->post_voicemail_search: #{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