--- title: ResponseManagementApi --- ## PureCloud::ResponseManagementApi All URIs are relative to *https://api.mypurecloud.com* Method | Description ------------- | ------------- | ------------- [**delete_libraries_library_id**](ResponseManagementApi.html#delete_libraries_library_id) | Delete an existing response library. [**delete_responses_response_id**](ResponseManagementApi.html#delete_responses_response_id) | Delete an existing response. [**get_libraries**](ResponseManagementApi.html#get_libraries) | Gets a list of existing response libraries. [**get_libraries_library_id**](ResponseManagementApi.html#get_libraries_library_id) | Get details about an existing response library. [**get_responses**](ResponseManagementApi.html#get_responses) | Gets a list of existing responses. [**get_responses_response_id**](ResponseManagementApi.html#get_responses_response_id) | Get details about an existing response. [**post_libraries**](ResponseManagementApi.html#post_libraries) | Create a response library. [**post_responses**](ResponseManagementApi.html#post_responses) | Create a response. [**post_responses_query**](ResponseManagementApi.html#post_responses_query) | Query responses [**put_libraries_library_id**](ResponseManagementApi.html#put_libraries_library_id) | Update an existing response library. [**put_responses_response_id**](ResponseManagementApi.html#put_responses_response_id) | Update an existing response. {: class="table table-striped"} ## - delete_libraries_library_id(library_id) Delete an existing response library. This will remove any responses associated with the library. Wraps DELETE /api/v2/responsemanagement/libraries/{libraryId} ### 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::ResponseManagementApi.new library_id = "library_id_example" # String | Library ID begin #Delete an existing response library. api_instance.delete_libraries_library_id(library_id) rescue PureCloud::ApiError => e puts "Exception when calling ResponseManagementApi->delete_libraries_library_id: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **library_id** | **String**| Library ID | {: class="table table-striped"} ### Return type nil (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## - delete_responses_response_id(response_id) Delete an existing response. This will remove the response from any libraries associated with it. Wraps DELETE /api/v2/responsemanagement/responses/{responseId} ### 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::ResponseManagementApi.new response_id = "response_id_example" # String | Response ID begin #Delete an existing response. api_instance.delete_responses_response_id(response_id) rescue PureCloud::ApiError => e puts "Exception when calling ResponseManagementApi->delete_responses_response_id: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **response_id** | **String**| Response ID | {: class="table table-striped"} ### Return type nil (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**LibraryEntityListing**](LibraryEntityListing.html) get_libraries(opts) Gets a list of existing response libraries. Wraps GET /api/v2/responsemanagement/libraries ### 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::ResponseManagementApi.new opts = { page_number: 1, # Integer | Page number page_size: 25 # Integer | Page size } begin #Gets a list of existing response libraries. result = api_instance.get_libraries(opts) p result rescue PureCloud::ApiError => e puts "Exception when calling ResponseManagementApi->get_libraries: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **page_number** | **Integer**| Page number | [optional] [default to 1] **page_size** | **Integer**| Page size | [optional] [default to 25] {: class="table table-striped"} ### Return type [**LibraryEntityListing**](LibraryEntityListing.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**Library**](Library.html) get_libraries_library_id(library_id) Get details about an existing response library. Wraps GET /api/v2/responsemanagement/libraries/{libraryId} ### 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::ResponseManagementApi.new library_id = "library_id_example" # String | Library ID begin #Get details about an existing response library. result = api_instance.get_libraries_library_id(library_id) p result rescue PureCloud::ApiError => e puts "Exception when calling ResponseManagementApi->get_libraries_library_id: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **library_id** | **String**| Library ID | {: class="table table-striped"} ### Return type [**Library**](Library.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**ResponseEntityListing**](ResponseEntityListing.html) get_responses(library_id, opts) Gets a list of existing responses. Wraps GET /api/v2/responsemanagement/responses ### 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::ResponseManagementApi.new library_id = "library_id_example" # String | Library ID opts = { page_number: 1, # Integer | Page number page_size: 25 # Integer | Page size } begin #Gets a list of existing responses. result = api_instance.get_responses(library_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling ResponseManagementApi->get_responses: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **library_id** | **String**| Library ID | **page_number** | **Integer**| Page number | [optional] [default to 1] **page_size** | **Integer**| Page size | [optional] [default to 25] {: class="table table-striped"} ### Return type [**ResponseEntityListing**](ResponseEntityListing.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**Response**](Response.html) get_responses_response_id(response_id) Get details about an existing response. Wraps GET /api/v2/responsemanagement/responses/{responseId} ### 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::ResponseManagementApi.new response_id = "response_id_example" # String | Response ID begin #Get details about an existing response. result = api_instance.get_responses_response_id(response_id) p result rescue PureCloud::ApiError => e puts "Exception when calling ResponseManagementApi->get_responses_response_id: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **response_id** | **String**| Response ID | {: class="table table-striped"} ### Return type [**Response**](Response.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**Library**](Library.html) post_libraries(body) Create a response library. Wraps POST /api/v2/responsemanagement/libraries ### 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::ResponseManagementApi.new body = PureCloud::Library.new # Library | Library begin #Create a response library. result = api_instance.post_libraries(body) p result rescue PureCloud::ApiError => e puts "Exception when calling ResponseManagementApi->post_libraries: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**Library**](Library.html)| Library | {: class="table table-striped"} ### Return type [**Library**](Library.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**Response**](Response.html) post_responses(body) Create a response. Wraps POST /api/v2/responsemanagement/responses ### 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::ResponseManagementApi.new body = PureCloud::Response.new # Response | Response begin #Create a response. result = api_instance.post_responses(body) p result rescue PureCloud::ApiError => e puts "Exception when calling ResponseManagementApi->post_responses: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**Response**](Response.html)| Response | {: class="table table-striped"} ### Return type [**Response**](Response.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**ResponseQueryResults**](ResponseQueryResults.html) post_responses_query(body) Query responses Wraps POST /api/v2/responsemanagement/responses/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::ResponseManagementApi.new body = PureCloud::ResponseQueryRequest.new # ResponseQueryRequest | Response begin #Query responses result = api_instance.post_responses_query(body) p result rescue PureCloud::ApiError => e puts "Exception when calling ResponseManagementApi->post_responses_query: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**ResponseQueryRequest**](ResponseQueryRequest.html)| Response | {: class="table table-striped"} ### Return type [**ResponseQueryResults**](ResponseQueryResults.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**Library**](Library.html) put_libraries_library_id(library_id, body) Update an existing response library. Fields that can be updated: name. The most recent version is required for updates. Wraps PUT /api/v2/responsemanagement/libraries/{libraryId} ### 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::ResponseManagementApi.new library_id = "library_id_example" # String | Library ID body = PureCloud::Library.new # Library | Library begin #Update an existing response library. result = api_instance.put_libraries_library_id(library_id, body) p result rescue PureCloud::ApiError => e puts "Exception when calling ResponseManagementApi->put_libraries_library_id: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **library_id** | **String**| Library ID | **body** | [**Library**](Library.html)| Library | {: class="table table-striped"} ### Return type [**Library**](Library.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**Response**](Response.html) put_responses_response_id(response_id, body) Update an existing response. Fields that can be updated: name, libraries, and texts. The most recent version is required for updates. Wraps PUT /api/v2/responsemanagement/responses/{responseId} ### 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::ResponseManagementApi.new response_id = "response_id_example" # String | Response ID body = PureCloud::Response.new # Response | Response begin #Update an existing response. result = api_instance.put_responses_response_id(response_id, body) p result rescue PureCloud::ApiError => e puts "Exception when calling ResponseManagementApi->put_responses_response_id: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **response_id** | **String**| Response ID | **body** | [**Response**](Response.html)| Response | {: class="table table-striped"} ### Return type [**Response**](Response.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json