--- title: UsersApi --- ## PureCloud::UsersApi All URIs are relative to *https://api.mypurecloud.com* Method | HTTP request | Description ------------- | ------------- | ------------- |[**delete_user_id**](UsersApi.html#delete_user_id) | **DELETE** /api/v2/users/{userId} | Delete user| |[**delete_user_id_roles**](UsersApi.html#delete_user_id_roles) | **DELETE** /api/v2/users/{userId}/roles | Removes all the roles from the user.| |[**delete_user_id_routingskills_skill_id**](UsersApi.html#delete_user_id_routingskills_skill_id) | **DELETE** /api/v2/users/{userId}/routingskills/{skillId} | Remove routing skill from user| |[**delete_user_id_station_associatedstation**](UsersApi.html#delete_user_id_station_associatedstation) | **DELETE** /api/v2/users/{userId}/station/associatedstation | Clear associated station| |[**delete_user_id_station_defaultstation**](UsersApi.html#delete_user_id_station_defaultstation) | **DELETE** /api/v2/users/{userId}/station/defaultstation | Clear default station| |[**get_me**](UsersApi.html#get_me) | **GET** /api/v2/users/me | Get user.| |[**get_search**](UsersApi.html#get_search) | **GET** /api/v2/users/search | Search using q64| |[**get_user_id**](UsersApi.html#get_user_id) | **GET** /api/v2/users/{userId} | Get user| |[**get_user_id_callforwarding**](UsersApi.html#get_user_id_callforwarding) | **GET** /api/v2/users/{userId}/callforwarding | Get a user's CallForwarding| |[**get_user_id_geolocations_client_id**](UsersApi.html#get_user_id_geolocations_client_id) | **GET** /api/v2/users/{userId}/geolocations/{clientId} | Get a user's Geolocation| |[**get_user_id_outofoffice**](UsersApi.html#get_user_id_outofoffice) | **GET** /api/v2/users/{userId}/outofoffice | Get a OutOfOffice| |[**get_user_id_profileskills**](UsersApi.html#get_user_id_profileskills) | **GET** /api/v2/users/{userId}/profileskills | List profile skills for a user| |[**get_user_id_queues**](UsersApi.html#get_user_id_queues) | **GET** /api/v2/users/{userId}/queues | Get queues for user| |[**get_user_id_roles**](UsersApi.html#get_user_id_roles) | **GET** /api/v2/users/{userId}/roles | Returns a listing of roles and permissions for a user.| |[**get_user_id_routingskills**](UsersApi.html#get_user_id_routingskills) | **GET** /api/v2/users/{userId}/routingskills | List routing skills for user| |[**get_user_id_routingstatus**](UsersApi.html#get_user_id_routingstatus) | **GET** /api/v2/users/{userId}/routingstatus | Fetch the routing status of a user| |[**get_user_id_station**](UsersApi.html#get_user_id_station) | **GET** /api/v2/users/{userId}/station | Get station information for user| |[**get_users**](UsersApi.html#get_users) | **GET** /api/v2/users | Get the list of available users.| |[**patch_user_id**](UsersApi.html#patch_user_id) | **PATCH** /api/v2/users/{userId} | Update user| |[**patch_user_id_callforwarding**](UsersApi.html#patch_user_id_callforwarding) | **PATCH** /api/v2/users/{userId}/callforwarding | Patch a user's CallForwarding| |[**patch_user_id_geolocations_client_id**](UsersApi.html#patch_user_id_geolocations_client_id) | **PATCH** /api/v2/users/{userId}/geolocations/{clientId} | Patch a user's Geolocation| |[**patch_user_id_queues**](UsersApi.html#patch_user_id_queues) | **PATCH** /api/v2/users/{userId}/queues | Join or unjoin a set of queues for a user| |[**patch_user_id_queues_queue_id**](UsersApi.html#patch_user_id_queues_queue_id) | **PATCH** /api/v2/users/{userId}/queues/{queueId} | Join or unjoin a queue for a user| |[**post_search**](UsersApi.html#post_search) | **POST** /api/v2/users/search | Search| |[**post_user_id_routingskills**](UsersApi.html#post_user_id_routingskills) | **POST** /api/v2/users/{userId}/routingskills | Add routing skill to user| |[**post_users**](UsersApi.html#post_users) | **POST** /api/v2/users | Create user| |[**post_users_aggregates_query**](UsersApi.html#post_users_aggregates_query) | **POST** /api/v2/analytics/users/aggregates/query | Query for user aggregates| |[**post_users_observations_query**](UsersApi.html#post_users_observations_query) | **POST** /api/v2/analytics/users/observations/query | Query for user observations| |[**put_user_id_callforwarding**](UsersApi.html#put_user_id_callforwarding) | **PUT** /api/v2/users/{userId}/callforwarding | Update a user's CallForwarding| |[**put_user_id_outofoffice**](UsersApi.html#put_user_id_outofoffice) | **PUT** /api/v2/users/{userId}/outofoffice | Update an OutOfOffice| |[**put_user_id_profileskills**](UsersApi.html#put_user_id_profileskills) | **PUT** /api/v2/users/{userId}/profileskills | Update profile skills for a user| |[**put_user_id_roles**](UsersApi.html#put_user_id_roles) | **PUT** /api/v2/users/{userId}/roles | Sets the user's roles| |[**put_user_id_routingskills_skill_id**](UsersApi.html#put_user_id_routingskills_skill_id) | **PUT** /api/v2/users/{userId}/routingskills/{skillId} | Update routing skill proficiency or state.| |[**put_user_id_routingstatus**](UsersApi.html#put_user_id_routingstatus) | **PUT** /api/v2/users/{userId}/routingstatus | Update the routing status of a user| |[**put_user_id_station_associatedstation_station_id**](UsersApi.html#put_user_id_station_associatedstation_station_id) | **PUT** /api/v2/users/{userId}/station/associatedstation/{stationId} | Set associated station| |[**put_user_id_station_defaultstation_station_id**](UsersApi.html#put_user_id_station_defaultstation_station_id) | **PUT** /api/v2/users/{userId}/station/defaultstation/{stationId} | Set default station| {: class="table table-striped"} ## -String** delete_user_id(user_id) Delete user ### 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::UsersApi.new user_id = "user_id_example" # String | User ID begin #Delete user result = api_instance.delete_user_id(user_id) p result rescue PureCloud::ApiError => e puts "Exception when calling UsersApi->delete_user_id: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **user_id** | **String**| User ID | {: class="table table-striped"} ### Return type **String** ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## - delete_user_id_roles(user_id) Removes all the roles from the user. ### 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::UsersApi.new user_id = "user_id_example" # String | User ID begin #Removes all the roles from the user. api_instance.delete_user_id_roles(user_id) rescue PureCloud::ApiError => e puts "Exception when calling UsersApi->delete_user_id_roles: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **user_id** | **String**| User ID | {: class="table table-striped"} ### Return type nil (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -String** delete_user_id_routingskills_skill_id(user_id, skill_id) Remove routing skill from user ### 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::UsersApi.new user_id = "user_id_example" # String | User ID skill_id = "skill_id_example" # String | begin #Remove routing skill from user result = api_instance.delete_user_id_routingskills_skill_id(user_id, skill_id) p result rescue PureCloud::ApiError => e puts "Exception when calling UsersApi->delete_user_id_routingskills_skill_id: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **user_id** | **String**| User ID | **skill_id** | **String**| | {: class="table table-striped"} ### Return type **String** ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## - delete_user_id_station_associatedstation(user_id) Clear associated station ### 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::UsersApi.new user_id = "user_id_example" # String | User ID begin #Clear associated station api_instance.delete_user_id_station_associatedstation(user_id) rescue PureCloud::ApiError => e puts "Exception when calling UsersApi->delete_user_id_station_associatedstation: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **user_id** | **String**| User ID | {: class="table table-striped"} ### Return type nil (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## - delete_user_id_station_defaultstation(user_id) Clear default station ### 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::UsersApi.new user_id = "user_id_example" # String | User ID begin #Clear default station api_instance.delete_user_id_station_defaultstation(user_id) rescue PureCloud::ApiError => e puts "Exception when calling UsersApi->delete_user_id_station_defaultstation: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **user_id** | **String**| User ID | {: class="table table-striped"} ### Return type nil (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**UserMe**](UserMe.html) get_me(opts) Get user. ### 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::UsersApi.new opts = { expand: ["expand_example"] # Array | Which fields, if any, to expand } begin #Get user. result = api_instance.get_me(opts) p result rescue PureCloud::ApiError => e puts "Exception when calling UsersApi->get_me: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **expand** | [**Array<String>**](String.html)| Which fields, if any, to expand | [optional] {: class="table table-striped"} ### Return type [**UserMe**](UserMe.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**UsersSearchResponse**](UsersSearchResponse.html) get_search(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::UsersApi.new opts = { q64: "q64_example", # String | expand: ["expand_example"] # Array | } begin #Search using q64 result = api_instance.get_search(opts) p result rescue PureCloud::ApiError => e puts "Exception when calling UsersApi->get_search: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **q64** | **String**| | [optional] **expand** | [**Array<String>**](String.html)| | [optional] {: class="table table-striped"} ### Return type [**UsersSearchResponse**](UsersSearchResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**User**](User.html) get_user_id(user_id, opts) Get user ### 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::UsersApi.new user_id = "user_id_example" # String | User ID opts = { expand: ["expand_example"] # Array | Which fields, if any, to expand } begin #Get user result = api_instance.get_user_id(user_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling UsersApi->get_user_id: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **user_id** | **String**| User ID | **expand** | [**Array<String>**](String.html)| Which fields, if any, to expand | [optional] {: class="table table-striped"} ### Return type [**User**](User.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**CallForwarding**](CallForwarding.html) get_user_id_callforwarding(user_id) Get a user's CallForwarding ### 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::UsersApi.new user_id = "user_id_example" # String | User ID begin #Get a user's CallForwarding result = api_instance.get_user_id_callforwarding(user_id) p result rescue PureCloud::ApiError => e puts "Exception when calling UsersApi->get_user_id_callforwarding: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **user_id** | **String**| User ID | {: class="table table-striped"} ### Return type [**CallForwarding**](CallForwarding.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**Geolocation**](Geolocation.html) get_user_id_geolocations_client_id(user_id, client_id) Get a user's Geolocation ### 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::UsersApi.new user_id = "user_id_example" # String | user Id client_id = "client_id_example" # String | client Id begin #Get a user's Geolocation result = api_instance.get_user_id_geolocations_client_id(user_id, client_id) p result rescue PureCloud::ApiError => e puts "Exception when calling UsersApi->get_user_id_geolocations_client_id: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **user_id** | **String**| user Id | **client_id** | **String**| client Id | {: class="table table-striped"} ### Return type [**Geolocation**](Geolocation.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**OutOfOffice**](OutOfOffice.html) get_user_id_outofoffice(user_id) Get a OutOfOffice ### 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::UsersApi.new user_id = "user_id_example" # String | User ID begin #Get a OutOfOffice result = api_instance.get_user_id_outofoffice(user_id) p result rescue PureCloud::ApiError => e puts "Exception when calling UsersApi->get_user_id_outofoffice: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **user_id** | **String**| User ID | {: class="table table-striped"} ### Return type [**OutOfOffice**](OutOfOffice.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -Array<String>** get_user_id_profileskills(user_id) List profile skills for a user ### 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::UsersApi.new user_id = "user_id_example" # String | User ID begin #List profile skills for a user result = api_instance.get_user_id_profileskills(user_id) p result rescue PureCloud::ApiError => e puts "Exception when calling UsersApi->get_user_id_profileskills: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **user_id** | **String**| User ID | {: class="table table-striped"} ### Return type **Array<String>** ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**UserQueueEntityListing**](UserQueueEntityListing.html) get_user_id_queues(user_id, opts) Get queues for user ### 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::UsersApi.new user_id = "user_id_example" # String | User ID opts = { page_size: 25, # Integer | Page size page_number: 1 # Integer | Page number } begin #Get queues for user result = api_instance.get_user_id_queues(user_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling UsersApi->get_user_id_queues: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **user_id** | **String**| User ID | **page_size** | **Integer**| Page size | [optional] [default to 25] **page_number** | **Integer**| Page number | [optional] [default to 1] {: class="table table-striped"} ### Return type [**UserQueueEntityListing**](UserQueueEntityListing.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**UserAuthorization**](UserAuthorization.html) get_user_id_roles(user_id) Returns a listing of roles and permissions for a user. ### 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::UsersApi.new user_id = "user_id_example" # String | User ID begin #Returns a listing of roles and permissions for a user. result = api_instance.get_user_id_roles(user_id) p result rescue PureCloud::ApiError => e puts "Exception when calling UsersApi->get_user_id_roles: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **user_id** | **String**| User ID | {: class="table table-striped"} ### Return type [**UserAuthorization**](UserAuthorization.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**UserSkillEntityListing**](UserSkillEntityListing.html) get_user_id_routingskills(user_id, opts) List routing skills for user ### 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::UsersApi.new user_id = "user_id_example" # String | User ID opts = { page_size: 25, # Integer | Page size page_number: 1, # Integer | Page number sort_order: "ASC" # String | Ascending or descending sort order } begin #List routing skills for user result = api_instance.get_user_id_routingskills(user_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling UsersApi->get_user_id_routingskills: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **user_id** | **String**| User ID | **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] {: class="table table-striped"} ### Return type [**UserSkillEntityListing**](UserSkillEntityListing.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**RoutingStatus**](RoutingStatus.html) get_user_id_routingstatus(user_id) Fetch the routing status of a user ### 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::UsersApi.new user_id = "user_id_example" # String | User ID begin #Fetch the routing status of a user result = api_instance.get_user_id_routingstatus(user_id) p result rescue PureCloud::ApiError => e puts "Exception when calling UsersApi->get_user_id_routingstatus: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **user_id** | **String**| User ID | {: class="table table-striped"} ### Return type [**RoutingStatus**](RoutingStatus.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**UserStations**](UserStations.html) get_user_id_station(user_id) Get station information for user ### 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::UsersApi.new user_id = "user_id_example" # String | User ID begin #Get station information for user result = api_instance.get_user_id_station(user_id) p result rescue PureCloud::ApiError => e puts "Exception when calling UsersApi->get_user_id_station: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **user_id** | **String**| User ID | {: class="table table-striped"} ### Return type [**UserStations**](UserStations.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**UsersEntityListing**](UsersEntityListing.html) get_users(opts) Get the list of available 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::UsersApi.new opts = { page_size: 25, # Integer | Page size page_number: 1, # Integer | Page number id: ["id_example"], # Array | The list of user ids to get. Paging is ignored if ids are specified sort_order: "ASC", # String | Ascending or descending sort order expand: ["expand_example"] # Array | Which fields, if any, to expand } begin #Get the list of available users. result = api_instance.get_users(opts) p result rescue PureCloud::ApiError => e puts "Exception when calling UsersApi->get_users: #{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] **id** | [**Array<String>**](String.html)| The list of user ids to get. Paging is ignored if ids are specified | [optional] **sort_order** | **String**| Ascending or descending sort order | [optional] [default to ASC] **expand** | [**Array<String>**](String.html)| Which fields, if any, to expand | [optional] {: class="table table-striped"} ### Return type [**UsersEntityListing**](UsersEntityListing.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**User**](User.html) patch_user_id(user_id, opts) Update user ### 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::UsersApi.new user_id = "user_id_example" # String | User ID opts = { body: PureCloud::User.new # User | } begin #Update user result = api_instance.patch_user_id(user_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling UsersApi->patch_user_id: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **user_id** | **String**| User ID | **body** | [**User**](User.html)| | [optional] {: class="table table-striped"} ### Return type [**User**](User.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**CallForwarding**](CallForwarding.html) patch_user_id_callforwarding(user_id, opts) Patch a user's CallForwarding ### 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::UsersApi.new user_id = "user_id_example" # String | User ID opts = { body: PureCloud::CallForwarding.new # CallForwarding | } begin #Patch a user's CallForwarding result = api_instance.patch_user_id_callforwarding(user_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling UsersApi->patch_user_id_callforwarding: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **user_id** | **String**| User ID | **body** | [**CallForwarding**](CallForwarding.html)| | [optional] {: class="table table-striped"} ### Return type [**CallForwarding**](CallForwarding.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**Geolocation**](Geolocation.html) patch_user_id_geolocations_client_id(user_id, client_id, opts) Patch a user's Geolocation The geolocation object can be patched one of three ways. Option 1: Set the 'primary' property to true. This will set the client as the user's primary geolocation source. Option 2: Provide the 'latitude' and 'longitude' values. This will enqueue an asynchronous update of the 'city', 'region', and 'country', generating a notification. A subsequent GET operation will include the new values for 'city', 'region' and 'country'. Option 3: Provide the 'city', 'region', 'country' values. Option 1 can be combined with Option 2 or Option 3. For example, update the client as primary and provide latitude and longitude values. ### 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::UsersApi.new user_id = "user_id_example" # String | user Id client_id = "client_id_example" # String | client Id opts = { body: PureCloud::Geolocation.new # Geolocation | } begin #Patch a user's Geolocation result = api_instance.patch_user_id_geolocations_client_id(user_id, client_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling UsersApi->patch_user_id_geolocations_client_id: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **user_id** | **String**| user Id | **client_id** | **String**| client Id | **body** | [**Geolocation**](Geolocation.html)| | [optional] {: class="table table-striped"} ### Return type [**Geolocation**](Geolocation.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**UserQueue**](UserQueue.html) patch_user_id_queues(user_id, opts) Join or unjoin a set of queues for a user ### 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::UsersApi.new user_id = "user_id_example" # String | User ID opts = { body: [PureCloud::UserQueue.new] # Array | User Queues } begin #Join or unjoin a set of queues for a user result = api_instance.patch_user_id_queues(user_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling UsersApi->patch_user_id_queues: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **user_id** | **String**| User ID | **body** | [**Array<UserQueue>**](UserQueue.html)| User Queues | [optional] {: class="table table-striped"} ### Return type [**UserQueue**](UserQueue.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**UserQueue**](UserQueue.html) patch_user_id_queues_queue_id(queue_id, user_id, opts) Join or unjoin a queue for a user ### 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::UsersApi.new queue_id = "queue_id_example" # String | Queue ID user_id = "user_id_example" # String | User ID opts = { body: PureCloud::UserQueue.new # UserQueue | Queue Member } begin #Join or unjoin a queue for a user result = api_instance.patch_user_id_queues_queue_id(queue_id, user_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling UsersApi->patch_user_id_queues_queue_id: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **queue_id** | **String**| Queue ID | **user_id** | **String**| User ID | **body** | [**UserQueue**](UserQueue.html)| Queue Member | [optional] {: class="table table-striped"} ### Return type [**UserQueue**](UserQueue.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**UsersSearchResponse**](UsersSearchResponse.html) post_search(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::UsersApi.new opts = { body: PureCloud::SearchRequest.new # SearchRequest | Search request options } begin #Search result = api_instance.post_search(opts) p result rescue PureCloud::ApiError => e puts "Exception when calling UsersApi->post_search: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**SearchRequest**](SearchRequest.html)| Search request options | [optional] {: class="table table-striped"} ### Return type [**UsersSearchResponse**](UsersSearchResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**UserRoutingSkill**](UserRoutingSkill.html) post_user_id_routingskills(user_id, opts) Add routing skill to user ### 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::UsersApi.new user_id = "user_id_example" # String | User ID opts = { body: PureCloud::UserRoutingSkill.new # UserRoutingSkill | Skill } begin #Add routing skill to user result = api_instance.post_user_id_routingskills(user_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling UsersApi->post_user_id_routingskills: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **user_id** | **String**| User ID | **body** | [**UserRoutingSkill**](UserRoutingSkill.html)| Skill | [optional] {: class="table table-striped"} ### Return type [**UserRoutingSkill**](UserRoutingSkill.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**User**](User.html) post_users(opts) Create user ### 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::UsersApi.new opts = { body: PureCloud::CreateUser.new # CreateUser | User } begin #Create user result = api_instance.post_users(opts) p result rescue PureCloud::ApiError => e puts "Exception when calling UsersApi->post_users: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**CreateUser**](CreateUser.html)| User | [optional] {: class="table table-striped"} ### Return type [**User**](User.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**PresenceQueryResponse**](PresenceQueryResponse.html) post_users_aggregates_query(opts) Query for user aggregates ### 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::UsersApi.new opts = { body: PureCloud::AggregationQuery.new # AggregationQuery | query } begin #Query for user aggregates result = api_instance.post_users_aggregates_query(opts) p result rescue PureCloud::ApiError => e puts "Exception when calling UsersApi->post_users_aggregates_query: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**AggregationQuery**](AggregationQuery.html)| query | [optional] {: class="table table-striped"} ### Return type [**PresenceQueryResponse**](PresenceQueryResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**ObservationQueryResponse**](ObservationQueryResponse.html) post_users_observations_query(opts) Query for user observations ### 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::UsersApi.new opts = { body: PureCloud::ObservationQuery.new # ObservationQuery | query } begin #Query for user observations result = api_instance.post_users_observations_query(opts) p result rescue PureCloud::ApiError => e puts "Exception when calling UsersApi->post_users_observations_query: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**ObservationQuery**](ObservationQuery.html)| query | [optional] {: class="table table-striped"} ### Return type [**ObservationQueryResponse**](ObservationQueryResponse.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**CallForwarding**](CallForwarding.html) put_user_id_callforwarding(user_id, opts) Update a user's CallForwarding ### 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::UsersApi.new user_id = "user_id_example" # String | User ID opts = { body: PureCloud::CallForwarding.new # CallForwarding | } begin #Update a user's CallForwarding result = api_instance.put_user_id_callforwarding(user_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling UsersApi->put_user_id_callforwarding: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **user_id** | **String**| User ID | **body** | [**CallForwarding**](CallForwarding.html)| | [optional] {: class="table table-striped"} ### Return type [**CallForwarding**](CallForwarding.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**OutOfOffice**](OutOfOffice.html) put_user_id_outofoffice(user_id, body) Update an OutOfOffice ### 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::UsersApi.new user_id = "user_id_example" # String | User ID body = PureCloud::OutOfOffice.new # OutOfOffice | The updated UserPresence begin #Update an OutOfOffice result = api_instance.put_user_id_outofoffice(user_id, body) p result rescue PureCloud::ApiError => e puts "Exception when calling UsersApi->put_user_id_outofoffice: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **user_id** | **String**| User ID | **body** | [**OutOfOffice**](OutOfOffice.html)| The updated UserPresence | {: class="table table-striped"} ### Return type [**OutOfOffice**](OutOfOffice.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -Array<String>** put_user_id_profileskills(user_id, opts) Update profile skills for a user ### 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::UsersApi.new user_id = "user_id_example" # String | User ID opts = { body: [PureCloud::Array.new] # Array | Skills } begin #Update profile skills for a user result = api_instance.put_user_id_profileskills(user_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling UsersApi->put_user_id_profileskills: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **user_id** | **String**| User ID | **body** | **Array<String>**| Skills | [optional] {: class="table table-striped"} ### Return type **Array<String>** ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**UserAuthorization**](UserAuthorization.html) put_user_id_roles(user_id, opts) Sets the user's roles ### 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::UsersApi.new user_id = "user_id_example" # String | User ID opts = { body: [PureCloud::Array.new] # Array | } begin #Sets the user's roles result = api_instance.put_user_id_roles(user_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling UsersApi->put_user_id_roles: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **user_id** | **String**| User ID | **body** | **Array<String>**| | [optional] {: class="table table-striped"} ### Return type [**UserAuthorization**](UserAuthorization.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**UserRoutingSkill**](UserRoutingSkill.html) put_user_id_routingskills_skill_id(user_id, skill_id, opts) Update routing skill proficiency or state. ### 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::UsersApi.new user_id = "user_id_example" # String | User ID skill_id = "skill_id_example" # String | opts = { body: PureCloud::UserRoutingSkill.new # UserRoutingSkill | Skill } begin #Update routing skill proficiency or state. result = api_instance.put_user_id_routingskills_skill_id(user_id, skill_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling UsersApi->put_user_id_routingskills_skill_id: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **user_id** | **String**| User ID | **skill_id** | **String**| | **body** | [**UserRoutingSkill**](UserRoutingSkill.html)| Skill | [optional] {: class="table table-striped"} ### Return type [**UserRoutingSkill**](UserRoutingSkill.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**RoutingStatus**](RoutingStatus.html) put_user_id_routingstatus(user_id, opts) Update the routing status of a user ### 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::UsersApi.new user_id = "user_id_example" # String | User ID opts = { body: PureCloud::RoutingStatus.new # RoutingStatus | Routing Status } begin #Update the routing status of a user result = api_instance.put_user_id_routingstatus(user_id, opts) p result rescue PureCloud::ApiError => e puts "Exception when calling UsersApi->put_user_id_routingstatus: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **user_id** | **String**| User ID | **body** | [**RoutingStatus**](RoutingStatus.html)| Routing Status | [optional] {: class="table table-striped"} ### Return type [**RoutingStatus**](RoutingStatus.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## - put_user_id_station_associatedstation_station_id(user_id, station_id) Set associated station ### 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::UsersApi.new user_id = "user_id_example" # String | User ID station_id = "station_id_example" # String | begin #Set associated station api_instance.put_user_id_station_associatedstation_station_id(user_id, station_id) rescue PureCloud::ApiError => e puts "Exception when calling UsersApi->put_user_id_station_associatedstation_station_id: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **user_id** | **String**| User ID | **station_id** | **String**| | {: class="table table-striped"} ### Return type nil (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## - put_user_id_station_defaultstation_station_id(user_id, station_id) Set default station ### 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::UsersApi.new user_id = "user_id_example" # String | User ID station_id = "station_id_example" # String | begin #Set default station api_instance.put_user_id_station_defaultstation_station_id(user_id, station_id) rescue PureCloud::ApiError => e puts "Exception when calling UsersApi->put_user_id_station_defaultstation_station_id: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **user_id** | **String**| User ID | **station_id** | **String**| | {: class="table table-striped"} ### Return type nil (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json