--- title: LanguagesApi --- ## PureCloud::LanguagesApi All URIs are relative to *https://api.mypurecloud.com* Method | HTTP request | Description ------------- | ------------- | ------------- |[**delete_language_id**](LanguagesApi.html#delete_language_id) | **DELETE** /api/v2/languages/{languageId} | Delete Language| |[**get_language_id**](LanguagesApi.html#get_language_id) | **GET** /api/v2/languages/{languageId} | Get language| |[**get_languages**](LanguagesApi.html#get_languages) | **GET** /api/v2/languages | Get the list of supported languages.| |[**post_languages**](LanguagesApi.html#post_languages) | **POST** /api/v2/languages | Create Language| |[**put_language_id**](LanguagesApi.html#put_language_id) | **PUT** /api/v2/languages/{languageId} | Update Language| {: class="table table-striped"} ## - delete_language_id(language_id) Delete Language ### 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::LanguagesApi.new language_id = "language_id_example" # String | Language ID begin #Delete Language api_instance.delete_language_id(language_id) rescue PureCloud::ApiError => e puts "Exception when calling LanguagesApi->delete_language_id: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **language_id** | **String**| Language ID | {: class="table table-striped"} ### Return type nil (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**Language**](Language.html) get_language_id(language_id) Get language ### 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::LanguagesApi.new language_id = "language_id_example" # String | Language ID begin #Get language result = api_instance.get_language_id(language_id) p result rescue PureCloud::ApiError => e puts "Exception when calling LanguagesApi->get_language_id: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **language_id** | **String**| Language ID | {: class="table table-striped"} ### Return type [**Language**](Language.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**LanguageEntityListing**](LanguageEntityListing.html) get_languages(opts) Get the list of supported languages. ### 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::LanguagesApi.new opts = { page_size: 25, # Integer | Page size page_number: 1, # Integer | Page number sort_order: "ASC", # String | Ascending or descending sort order name: "name_example" # String | Name } begin #Get the list of supported languages. result = api_instance.get_languages(opts) p result rescue PureCloud::ApiError => e puts "Exception when calling LanguagesApi->get_languages: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **page_size** | **Integer**| Page size | [optional] [default to 25] **page_number** | **Integer**| Page number | [optional] [default to 1] **sort_order** | **String**| Ascending or descending sort order | [optional] [default to ASC] **name** | **String**| Name | [optional] {: class="table table-striped"} ### Return type [**LanguageEntityListing**](LanguageEntityListing.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**Language**](Language.html) post_languages(body) Create Language ### 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::LanguagesApi.new body = PureCloud::Language.new # Language | Language begin #Create Language result = api_instance.post_languages(body) p result rescue PureCloud::ApiError => e puts "Exception when calling LanguagesApi->post_languages: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**Language**](Language.html)| Language | {: class="table table-striped"} ### Return type [**Language**](Language.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**Language**](Language.html) put_language_id(language_id, body) Update Language ### 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::LanguagesApi.new language_id = "language_id_example" # String | Language ID body = PureCloud::Language.new # Language | Language begin #Update Language result = api_instance.put_language_id(language_id, body) p result rescue PureCloud::ApiError => e puts "Exception when calling LanguagesApi->put_language_id: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **language_id** | **String**| Language ID | **body** | [**Language**](Language.html)| Language | {: class="table table-striped"} ### Return type [**Language**](Language.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json