class PureCloud::UsersApi
Attributes
Public Class Methods
# File lib/purecloudplatformclientv2/api/users_api.rb, line 23 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Delete/cancel an async request
@param job_id jobId @param [Hash] opts the optional parameters @return [nil]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 32 def delete_analytics_users_details_job(job_id, opts = {}) delete_analytics_users_details_job_with_http_info(job_id, opts) return nil end
Delete/cancel an async request
@param job_id jobId @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 42 def delete_analytics_users_details_job_with_http_info(job_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.delete_analytics_users_details_job ..." end # verify the required parameter 'job_id' is set fail ArgumentError, "Missing the required parameter 'job_id' when calling UsersApi.delete_analytics_users_details_job" if job_id.nil? # resource path local_var_path = "/api/v2/analytics/users/details/jobs/{jobId}".sub('{format}','json').sub('{' + 'jobId' + '}', job_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#delete_analytics_users_details_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Delete the user's max utilization settings and revert to the organization-wide default.
@param user_id User
ID @param [Hash] opts the optional parameters @return [nil]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 180 def delete_routing_user_utilization(user_id, opts = {}) delete_routing_user_utilization_with_http_info(user_id, opts) return nil end
Delete the user's max utilization settings and revert to the organization-wide default.
@param user_id User
ID @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 190 def delete_routing_user_utilization_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.delete_routing_user_utilization ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.delete_routing_user_utilization" if user_id.nil? # resource path local_var_path = "/api/v2/routing/users/{userId}/utilization".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#delete_routing_user_utilization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Delete user
@param user_id User
ID @param [Hash] opts the optional parameters @return [Empty]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 244 def delete_user(user_id, opts = {}) data, _status_code, _headers = delete_user_with_http_info(user_id, opts) return data end
Remove routing language from user
@param user_id User
ID @param language_id languageId @param [Hash] opts the optional parameters @return [nil]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 310 def delete_user_routinglanguage(user_id, language_id, opts = {}) delete_user_routinglanguage_with_http_info(user_id, language_id, opts) return nil end
Remove routing language from user
@param user_id User
ID @param language_id languageId @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 321 def delete_user_routinglanguage_with_http_info(user_id, language_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.delete_user_routinglanguage ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.delete_user_routinglanguage" if user_id.nil? # verify the required parameter 'language_id' is set fail ArgumentError, "Missing the required parameter 'language_id' when calling UsersApi.delete_user_routinglanguage" if language_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/routinglanguages/{languageId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'languageId' + '}', language_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#delete_user_routinglanguage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Remove routing skill from user
@param user_id User
ID @param skill_id skillId @param [Hash] opts the optional parameters @return [nil]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 384 def delete_user_routingskill(user_id, skill_id, opts = {}) delete_user_routingskill_with_http_info(user_id, skill_id, opts) return nil end
Remove routing skill from user
@param user_id User
ID @param skill_id skillId @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 395 def delete_user_routingskill_with_http_info(user_id, skill_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.delete_user_routingskill ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.delete_user_routingskill" if user_id.nil? # verify the required parameter 'skill_id' is set fail ArgumentError, "Missing the required parameter 'skill_id' when calling UsersApi.delete_user_routingskill" if skill_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/routingskills/{skillId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'skillId' + '}', skill_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#delete_user_routingskill\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Clear associated station
@param user_id User
ID @param [Hash] opts the optional parameters @return [nil]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 457 def delete_user_station_associatedstation(user_id, opts = {}) delete_user_station_associatedstation_with_http_info(user_id, opts) return nil end
Clear associated station
@param user_id User
ID @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 467 def delete_user_station_associatedstation_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.delete_user_station_associatedstation ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.delete_user_station_associatedstation" if user_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/station/associatedstation".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#delete_user_station_associatedstation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Clear default station
@param user_id User
ID @param [Hash] opts the optional parameters @return [nil]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 521 def delete_user_station_defaultstation(user_id, opts = {}) delete_user_station_defaultstation_with_http_info(user_id, opts) return nil end
Clear default station
@param user_id User
ID @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 531 def delete_user_station_defaultstation_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.delete_user_station_defaultstation ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.delete_user_station_defaultstation" if user_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/station/defaultstation".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#delete_user_station_defaultstation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Delete user
@param user_id User
ID @param [Hash] opts the optional parameters @return [Array<(Empty
, Fixnum, Hash)>] Empty
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 254 def delete_user_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.delete_user ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.delete_user" if user_id.nil? # resource path local_var_path = "/api/v2/users/{userId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Empty') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#delete_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get status for async query for user details
@param job_id jobId @param [Hash] opts the optional parameters @return [AsyncQueryStatus]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 585 def get_analytics_users_details_job(job_id, opts = {}) data, _status_code, _headers = get_analytics_users_details_job_with_http_info(job_id, opts) return data end
Fetch a page of results for an async query
@param job_id jobId @param [Hash] opts the optional parameters @option opts [String] :cursor Indicates where to resume query results (not required for first page) @option opts [Integer] :page_size The desired maximum number of results @return [AnalyticsUserDetailsAsyncQueryResponse]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 652 def get_analytics_users_details_job_results(job_id, opts = {}) data, _status_code, _headers = get_analytics_users_details_job_results_with_http_info(job_id, opts) return data end
Fetch a page of results for an async query
@param job_id jobId @param [Hash] opts the optional parameters @option opts [String] :cursor Indicates where to resume query results (not required for first page) @option opts [Integer] :page_size The desired maximum number of results @return [Array<(AnalyticsUserDetailsAsyncQueryResponse
, Fixnum, Hash)>] AnalyticsUserDetailsAsyncQueryResponse
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 664 def get_analytics_users_details_job_results_with_http_info(job_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_analytics_users_details_job_results ..." end # verify the required parameter 'job_id' is set fail ArgumentError, "Missing the required parameter 'job_id' when calling UsersApi.get_analytics_users_details_job_results" if job_id.nil? # resource path local_var_path = "/api/v2/analytics/users/details/jobs/{jobId}/results".sub('{format}','json').sub('{' + 'jobId' + '}', job_id.to_s) # query parameters query_params = {} query_params[:'cursor'] = opts[:'cursor'] if opts[:'cursor'] query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'AnalyticsUserDetailsAsyncQueryResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_analytics_users_details_job_results\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get status for async query for user details
@param job_id jobId @param [Hash] opts the optional parameters @return [Array<(AsyncQueryStatus
, Fixnum, Hash)>] AsyncQueryStatus
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 595 def get_analytics_users_details_job_with_http_info(job_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_analytics_users_details_job ..." end # verify the required parameter 'job_id' is set fail ArgumentError, "Missing the required parameter 'job_id' when calling UsersApi.get_analytics_users_details_job" if job_id.nil? # resource path local_var_path = "/api/v2/analytics/users/details/jobs/{jobId}".sub('{format}','json').sub('{' + 'jobId' + '}', job_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'AsyncQueryStatus') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_analytics_users_details_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Fetch field config for an entity type
@param type Field type @param [Hash] opts the optional parameters @return [FieldConfig]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 1106 def get_fieldconfig(type, opts = {}) data, _status_code, _headers = get_fieldconfig_with_http_info(type, opts) return data end
Fetch field config for an entity type
@param type Field type @param [Hash] opts the optional parameters @return [Array<(FieldConfig
, Fixnum, Hash)>] FieldConfig
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 1116 def get_fieldconfig_with_http_info(type, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_fieldconfig ..." end # verify the required parameter 'type' is set fail ArgumentError, "Missing the required parameter 'type' when calling UsersApi.get_fieldconfig" if type.nil? # verify enum value unless ['person', 'group', 'org', 'externalContact'].include?(type) fail ArgumentError, "invalid value for 'type', must be one of person, group, org, externalContact" end # resource path local_var_path = "/api/v2/fieldconfig".sub('{format}','json') # query parameters query_params = {} query_params[:'type'] = type # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'FieldConfig') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_fieldconfig\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get a user profile listing This api is deprecated. User
/api/v2/users @param [Hash] opts the optional parameters @option opts [Integer] :page_size Page
size (default to 25) @option opts [Integer] :page_number Page
number (default to 1) @option opts [Array<String>] :id id @option opts [Array<String>] :jid jid @option opts [String] :sort_order Ascending or descending sort order (default to ASC) @option opts [Array<String>] :expand Which fields, if any, to expand @option opts [String] :integration_presence_source Gets an integration presence for users instead of their defaults. This parameter will only be used when presence is provided as an "expand". @return [UserProfileEntityListing]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 1183 def get_profiles_users(opts = {}) data, _status_code, _headers = get_profiles_users_with_http_info(opts) return data end
Get a user profile listing This api is deprecated. User
/api/v2/users @param [Hash] opts the optional parameters @option opts [Integer] :page_size Page
size @option opts [Integer] :page_number Page
number @option opts [Array<String>] :id id @option opts [Array<String>] :jid jid @option opts [String] :sort_order Ascending or descending sort order @option opts [Array<String>] :expand Which fields, if any, to expand @option opts [String] :integration_presence_source Gets an integration presence for users instead of their defaults. This parameter will only be used when presence is provided as an "expand". @return [Array<(UserProfileEntityListing
, Fixnum, Hash)>] UserProfileEntityListing
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 1199 def get_profiles_users_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_profiles_users ..." end if opts[:'sort_order'] && !['ascending', 'descending'].include?(opts[:'sort_order']) fail ArgumentError, 'invalid value for "sort_order", must be one of ascending, descending' end if opts[:'integration_presence_source'] && !['MicrosoftTeams', 'ZoomPhone'].include?(opts[:'integration_presence_source']) fail ArgumentError, 'invalid value for "integration_presence_source", must be one of MicrosoftTeams, ZoomPhone' end # resource path local_var_path = "/api/v2/profiles/users".sub('{format}','json') # query parameters query_params = {} query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'id'] = @api_client.build_collection_param(opts[:'id'], :multi) if opts[:'id'] query_params[:'jid'] = @api_client.build_collection_param(opts[:'jid'], :multi) if opts[:'jid'] query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] query_params[:'integrationPresenceSource'] = opts[:'integration_presence_source'] if opts[:'integration_presence_source'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserProfileEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_profiles_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get the user's max utilization settings. If not configured, the organization-wide default is returned.
@param user_id User
ID @param [Hash] opts the optional parameters @return [Utilization]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 1303 def get_routing_user_utilization(user_id, opts = {}) data, _status_code, _headers = get_routing_user_utilization_with_http_info(user_id, opts) return data end
Get the user's max utilization settings. If not configured, the organization-wide default is returned.
@param user_id User
ID @param [Hash] opts the optional parameters @return [Array<(Utilization
, Fixnum, Hash)>] Utilization
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 1313 def get_routing_user_utilization_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_routing_user_utilization ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_routing_user_utilization" if user_id.nil? # resource path local_var_path = "/api/v2/routing/users/{userId}/utilization".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Utilization') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_routing_user_utilization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get user.
@param user_id User
ID @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand @option opts [String] :integration_presence_source Gets an integration presence for a user instead of their default. @option opts [String] :state Search for a user with this state (default to active) @return [User]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 1371 def get_user(user_id, opts = {}) data, _status_code, _headers = get_user_with_http_info(user_id, opts) return data end
Get adjacents
@param user_id User
ID @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand @return [Adjacents]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 1469 def get_user_adjacents(user_id, opts = {}) data, _status_code, _headers = get_user_adjacents_with_http_info(user_id, opts) return data end
Get adjacents
@param user_id User
ID @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand @return [Array<(Adjacents
, Fixnum, Hash)>] Adjacents
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 1480 def get_user_adjacents_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_user_adjacents ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user_adjacents" if user_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/adjacents".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Adjacents') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user_adjacents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get a user's CallForwarding
@param user_id User
ID @param [Hash] opts the optional parameters @return [CallForwarding]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 1542 def get_user_callforwarding(user_id, opts = {}) data, _status_code, _headers = get_user_callforwarding_with_http_info(user_id, opts) return data end
Get a user's CallForwarding
@param user_id User
ID @param [Hash] opts the optional parameters @return [Array<(CallForwarding
, Fixnum, Hash)>] CallForwarding
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 1552 def get_user_callforwarding_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_user_callforwarding ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user_callforwarding" if user_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/callforwarding".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CallForwarding') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user_callforwarding\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get direct reports
@param user_id User
ID @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand @return [Array<User>]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 1608 def get_user_directreports(user_id, opts = {}) data, _status_code, _headers = get_user_directreports_with_http_info(user_id, opts) return data end
Get direct reports
@param user_id User
ID @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand @return [Array<(Array<User>, Fixnum, Hash)>] Array<User> data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 1619 def get_user_directreports_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_user_directreports ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user_directreports" if user_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/directreports".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array<User>') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user_directreports\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get favorites
@param user_id User
ID @param [Hash] opts the optional parameters @option opts [Integer] :page_size Page
size (default to 25) @option opts [Integer] :page_number Page
number (default to 1) @option opts [String] :sort_order Sort order (default to ASC) @option opts [Array<String>] :expand Which fields, if any, to expand @return [UserEntityListing]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 1685 def get_user_favorites(user_id, opts = {}) data, _status_code, _headers = get_user_favorites_with_http_info(user_id, opts) return data end
Get favorites
@param user_id User
ID @param [Hash] opts the optional parameters @option opts [Integer] :page_size Page
size @option opts [Integer] :page_number Page
number @option opts [String] :sort_order Sort order @option opts [Array<String>] :expand Which fields, if any, to expand @return [Array<(UserEntityListing
, Fixnum, Hash)>] UserEntityListing
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 1699 def get_user_favorites_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_user_favorites ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user_favorites" if user_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/favorites".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user_favorites\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get a user's Geolocation
@param user_id user Id @param client_id client Id @param [Hash] opts the optional parameters @return [Geolocation]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 1783 def get_user_geolocation(user_id, client_id, opts = {}) data, _status_code, _headers = get_user_geolocation_with_http_info(user_id, client_id, opts) return data end
Get a user's Geolocation
@param user_id user Id @param client_id client Id @param [Hash] opts the optional parameters @return [Array<(Geolocation
, Fixnum, Hash)>] Geolocation
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 1794 def get_user_geolocation_with_http_info(user_id, client_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_user_geolocation ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user_geolocation" if user_id.nil? # verify the required parameter 'client_id' is set fail ArgumentError, "Missing the required parameter 'client_id' when calling UsersApi.get_user_geolocation" if client_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/geolocations/{clientId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'clientId' + '}', client_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Geolocation') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user_geolocation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get a OutOfOffice
@param user_id User
ID @param [Hash] opts the optional parameters @return [OutOfOffice]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 1857 def get_user_outofoffice(user_id, opts = {}) data, _status_code, _headers = get_user_outofoffice_with_http_info(user_id, opts) return data end
Get a OutOfOffice
@param user_id User
ID @param [Hash] opts the optional parameters @return [Array<(OutOfOffice
, Fixnum, Hash)>] OutOfOffice
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 1867 def get_user_outofoffice_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_user_outofoffice ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user_outofoffice" if user_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/outofoffice".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OutOfOffice') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user_outofoffice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get user profile This api has been deprecated. Use api/v2/users instead @param user_id userId @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand @option opts [String] :integration_presence_source Gets an integration presence for a user instead of their default. @return [UserProfile]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 1924 def get_user_profile(user_id, opts = {}) data, _status_code, _headers = get_user_profile_with_http_info(user_id, opts) return data end
Get user profile This api has been deprecated. Use api/v2/users instead @param user_id userId @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand @option opts [String] :integration_presence_source Gets an integration presence for a user instead of their default. @return [Array<(UserProfile
, Fixnum, Hash)>] UserProfile
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 1936 def get_user_profile_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_user_profile ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user_profile" if user_id.nil? if opts[:'integration_presence_source'] && !['MicrosoftTeams', 'ZoomPhone'].include?(opts[:'integration_presence_source']) fail ArgumentError, 'invalid value for "integration_presence_source", must be one of MicrosoftTeams, ZoomPhone' end # resource path local_var_path = "/api/v2/users/{userId}/profile".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] query_params[:'integrationPresenceSource'] = opts[:'integration_presence_source'] if opts[:'integration_presence_source'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserProfile') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
List profile skills for a user
@param user_id User
ID @param [Hash] opts the optional parameters @return [Array<String>]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 2009 def get_user_profileskills(user_id, opts = {}) data, _status_code, _headers = get_user_profileskills_with_http_info(user_id, opts) return data end
List profile skills for a user
@param user_id User
ID @param [Hash] opts the optional parameters @return [Array<(Array<String>, Fixnum, Hash)>] Array<String> data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 2019 def get_user_profileskills_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_user_profileskills ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user_profileskills" if user_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/profileskills".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array<String>') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user_profileskills\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get queues for user
@param user_id User
ID @param [Hash] opts the optional parameters @option opts [Integer] :page_size Page
size (default to 25) @option opts [Integer] :page_number Page
number (default to 1) @option opts [BOOLEAN] :joined Is joined to the queue (default to true) @option opts [Array<String>] :division_id Division
ID(s) @return [UserQueueEntityListing]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 2078 def get_user_queues(user_id, opts = {}) data, _status_code, _headers = get_user_queues_with_http_info(user_id, opts) return data end
Get queues for user
@param user_id User
ID @param [Hash] opts the optional parameters @option opts [Integer] :page_size Page
size @option opts [Integer] :page_number Page
number @option opts [BOOLEAN] :joined Is joined to the queue @option opts [Array<String>] :division_id Division
ID(s) @return [Array<(UserQueueEntityListing
, Fixnum, Hash)>] UserQueueEntityListing
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 2092 def get_user_queues_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_user_queues ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user_queues" if user_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/queues".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'joined'] = opts[:'joined'] if opts[:'joined'] query_params[:'divisionId'] = @api_client.build_collection_param(opts[:'division_id'], :multi) if opts[:'division_id'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserQueueEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user_queues\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns a listing of roles and permissions for a user.
@param user_id User
ID @param [Hash] opts the optional parameters @return [UserAuthorization]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 2175 def get_user_roles(user_id, opts = {}) data, _status_code, _headers = get_user_roles_with_http_info(user_id, opts) return data end
Returns a listing of roles and permissions for a user.
@param user_id User
ID @param [Hash] opts the optional parameters @return [Array<(UserAuthorization
, Fixnum, Hash)>] UserAuthorization
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 2185 def get_user_roles_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_user_roles ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user_roles" if user_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/roles".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserAuthorization') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
List routing language for user
@param user_id User
ID @param [Hash] opts the optional parameters @option opts [Integer] :page_size Page
size (default to 25) @option opts [Integer] :page_number Page
number (default to 1) @option opts [String] :sort_order Ascending or descending sort order (default to ASC) @return [UserLanguageEntityListing]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 2243 def get_user_routinglanguages(user_id, opts = {}) data, _status_code, _headers = get_user_routinglanguages_with_http_info(user_id, opts) return data end
List routing language for user
@param user_id User
ID @param [Hash] opts the optional parameters @option opts [Integer] :page_size Page
size @option opts [Integer] :page_number Page
number @option opts [String] :sort_order Ascending or descending sort order @return [Array<(UserLanguageEntityListing
, Fixnum, Hash)>] UserLanguageEntityListing
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 2256 def get_user_routinglanguages_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_user_routinglanguages ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user_routinglanguages" if user_id.nil? if opts[:'sort_order'] && !['ascending', 'descending'].include?(opts[:'sort_order']) fail ArgumentError, 'invalid value for "sort_order", must be one of ascending, descending' end # resource path local_var_path = "/api/v2/users/{userId}/routinglanguages".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserLanguageEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user_routinglanguages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
List routing skills for user
@param user_id User
ID @param [Hash] opts the optional parameters @option opts [Integer] :page_size Page
size (default to 25) @option opts [Integer] :page_number Page
number (default to 1) @option opts [String] :sort_order Ascending or descending sort order (default to ASC) @return [UserSkillEntityListing]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 2339 def get_user_routingskills(user_id, opts = {}) data, _status_code, _headers = get_user_routingskills_with_http_info(user_id, opts) return data end
List routing skills for user
@param user_id User
ID @param [Hash] opts the optional parameters @option opts [Integer] :page_size Page
size @option opts [Integer] :page_number Page
number @option opts [String] :sort_order Ascending or descending sort order @return [Array<(UserSkillEntityListing
, Fixnum, Hash)>] UserSkillEntityListing
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 2352 def get_user_routingskills_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_user_routingskills ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user_routingskills" if user_id.nil? if opts[:'sort_order'] && !['ascending', 'descending'].include?(opts[:'sort_order']) fail ArgumentError, 'invalid value for "sort_order", must be one of ascending, descending' end # resource path local_var_path = "/api/v2/users/{userId}/routingskills".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserSkillEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user_routingskills\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Fetch the routing status of a user
@param user_id User
ID @param [Hash] opts the optional parameters @return [RoutingStatus]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 2432 def get_user_routingstatus(user_id, opts = {}) data, _status_code, _headers = get_user_routingstatus_with_http_info(user_id, opts) return data end
Fetch the routing status of a user
@param user_id User
ID @param [Hash] opts the optional parameters @return [Array<(RoutingStatus
, Fixnum, Hash)>] RoutingStatus
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 2442 def get_user_routingstatus_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_user_routingstatus ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user_routingstatus" if user_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/routingstatus".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'RoutingStatus') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user_routingstatus\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get station information for user
@param user_id User
ID @param [Hash] opts the optional parameters @return [UserStations]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 2497 def get_user_station(user_id, opts = {}) data, _status_code, _headers = get_user_station_with_http_info(user_id, opts) return data end
Get station information for user
@param user_id User
ID @param [Hash] opts the optional parameters @return [Array<(UserStations
, Fixnum, Hash)>] UserStations
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 2507 def get_user_station_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_user_station ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user_station" if user_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/station".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserStations') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user_station\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get superiors
@param user_id User
ID @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand @return [Array<User>]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 2563 def get_user_superiors(user_id, opts = {}) data, _status_code, _headers = get_user_superiors_with_http_info(user_id, opts) return data end
Get superiors
@param user_id User
ID @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand @return [Array<(Array<User>, Fixnum, Hash)>] Array<User> data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 2574 def get_user_superiors_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_user_superiors ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user_superiors" if user_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/superiors".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array<User>') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user_superiors\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
List the organizations that have authorized/trusted the user.
@param user_id User
ID @param [Hash] opts the optional parameters @option opts [Integer] :page_size Page
size (default to 25) @option opts [Integer] :page_number Page
number (default to 1) @return [TrustorEntityListing]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 2638 def get_user_trustors(user_id, opts = {}) data, _status_code, _headers = get_user_trustors_with_http_info(user_id, opts) return data end
List the organizations that have authorized/trusted the user.
@param user_id User
ID @param [Hash] opts the optional parameters @option opts [Integer] :page_size Page
size @option opts [Integer] :page_number Page
number @return [Array<(TrustorEntityListing
, Fixnum, Hash)>] TrustorEntityListing
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 2650 def get_user_trustors_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_user_trustors ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user_trustors" if user_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/trustors".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'TrustorEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user_trustors\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get user.
@param user_id User
ID @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand @option opts [String] :integration_presence_source Gets an integration presence for a user instead of their default. @option opts [String] :state Search for a user with this state @return [Array<(User
, Fixnum, Hash)>] User
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 1384 def get_user_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_user ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user" if user_id.nil? if opts[:'integration_presence_source'] && !['MicrosoftTeams', 'ZoomPhone'].include?(opts[:'integration_presence_source']) fail ArgumentError, 'invalid value for "integration_presence_source", must be one of MicrosoftTeams, ZoomPhone' end if opts[:'state'] && !['active', 'deleted'].include?(opts[:'state']) fail ArgumentError, 'invalid value for "state", must be one of active, deleted' end # resource path local_var_path = "/api/v2/users/{userId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] query_params[:'integrationPresenceSource'] = opts[:'integration_presence_source'] if opts[:'integration_presence_source'] query_params[:'state'] = opts[:'state'] if opts[:'state'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'User') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get the list of available users.
@param [Hash] opts the optional parameters @option opts [Integer] :page_size Page
size (default to 25) @option opts [Integer] :page_number Page
number (default to 1) @option opts [Array<String>] :id A list of user IDs to fetch by bulk @option opts [Array<String>] :jabber_id A list of jabberIds to fetch by bulk (cannot be used with the "id" parameter) @option opts [String] :sort_order Ascending or descending sort order (default to ASC) @option opts [Array<String>] :expand Which fields, if any, to expand @option opts [String] :integration_presence_source Gets an integration presence for users instead of their defaults. This parameter will only be used when presence is provided as an "expand". When using this parameter the maximum number of users that can be returned is 10. @option opts [String] :state Only list users of this state (default to active) @return [UserEntityListing]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 2726 def get_users(opts = {}) data, _status_code, _headers = get_users_with_http_info(opts) return data end
Get current user details. This request is not valid when using the Client Credentials OAuth grant. @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand. @option opts [String] :integration_presence_source Get your presence for a given integration. This parameter will only be used when presence is provided as an "expand". @return [UserMe]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 2859 def get_users_me(opts = {}) data, _status_code, _headers = get_users_me_with_http_info(opts) return data end
Get current user details. This request is not valid when using the Client Credentials OAuth grant. @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand. @option opts [String] :integration_presence_source Get your presence for a given integration. This parameter will only be used when presence is provided as an "expand". @return [Array<(UserMe
, Fixnum, Hash)>] UserMe
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 2870 def get_users_me_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_users_me ..." end if opts[:'integration_presence_source'] && !['MicrosoftTeams', 'ZoomPhone'].include?(opts[:'integration_presence_source']) fail ArgumentError, 'invalid value for "integration_presence_source", must be one of MicrosoftTeams, ZoomPhone' end # resource path local_var_path = "/api/v2/users/me".sub('{format}','json') # query parameters query_params = {} query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] query_params[:'integrationPresenceSource'] = opts[:'integration_presence_source'] if opts[:'integration_presence_source'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserMe') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_users_me\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Search users using the q64 value returned from a previous search
@param q64 q64 @param [Hash] opts the optional parameters @option opts [Array<String>] :expand expand @option opts [String] :integration_presence_source integrationPresenceSource @return [UsersSearchResponse]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 2937 def get_users_search(q64, opts = {}) data, _status_code, _headers = get_users_search_with_http_info(q64, opts) return data end
Search users using the q64 value returned from a previous search
@param q64 q64 @param [Hash] opts the optional parameters @option opts [Array<String>] :expand expand @option opts [String] :integration_presence_source integrationPresenceSource @return [Array<(UsersSearchResponse
, Fixnum, Hash)>] UsersSearchResponse
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 2949 def get_users_search_with_http_info(q64, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_users_search ..." end # verify the required parameter 'q64' is set fail ArgumentError, "Missing the required parameter 'q64' when calling UsersApi.get_users_search" if q64.nil? if opts[:'integration_presence_source'] && !['MicrosoftTeams', 'ZoomPhone'].include?(opts[:'integration_presence_source']) fail ArgumentError, 'invalid value for "integration_presence_source", must be one of MicrosoftTeams, ZoomPhone' end # resource path local_var_path = "/api/v2/users/search".sub('{format}','json') # query parameters query_params = {} query_params[:'q64'] = q64 query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] query_params[:'integrationPresenceSource'] = opts[:'integration_presence_source'] if opts[:'integration_presence_source'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UsersSearchResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_users_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get the list of available users.
@param [Hash] opts the optional parameters @option opts [Integer] :page_size Page
size @option opts [Integer] :page_number Page
number @option opts [Array<String>] :id A list of user IDs to fetch by bulk @option opts [Array<String>] :jabber_id A list of jabberIds to fetch by bulk (cannot be used with the "id" parameter) @option opts [String] :sort_order Ascending or descending sort order @option opts [Array<String>] :expand Which fields, if any, to expand @option opts [String] :integration_presence_source Gets an integration presence for users instead of their defaults. This parameter will only be used when presence is provided as an "expand". When using this parameter the maximum number of users that can be returned is 10. @option opts [String] :state Only list users of this state @return [Array<(UserEntityListing
, Fixnum, Hash)>] UserEntityListing
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 2743 def get_users_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_users ..." end if opts[:'sort_order'] && !['ascending', 'descending'].include?(opts[:'sort_order']) fail ArgumentError, 'invalid value for "sort_order", must be one of ascending, descending' end if opts[:'integration_presence_source'] && !['MicrosoftTeams', 'ZoomPhone'].include?(opts[:'integration_presence_source']) fail ArgumentError, 'invalid value for "integration_presence_source", must be one of MicrosoftTeams, ZoomPhone' end if opts[:'state'] && !['active', 'inactive', 'deleted', 'any'].include?(opts[:'state']) fail ArgumentError, 'invalid value for "state", must be one of active, inactive, deleted, any' end # resource path local_var_path = "/api/v2/users".sub('{format}','json') # query parameters query_params = {} query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'id'] = @api_client.build_collection_param(opts[:'id'], :multi) if opts[:'id'] query_params[:'jabberId'] = @api_client.build_collection_param(opts[:'jabber_id'], :multi) if opts[:'jabber_id'] query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] query_params[:'integrationPresenceSource'] = opts[:'integration_presence_source'] if opts[:'integration_presence_source'] query_params[:'state'] = opts[:'state'] if opts[:'state'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update user
@param user_id User
ID @param body User
@param [Hash] opts the optional parameters @return [User]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 3024 def patch_user(user_id, body, opts = {}) data, _status_code, _headers = patch_user_with_http_info(user_id, body, opts) return data end
Patch a user's CallForwarding
@param user_id User
ID @param body Call
forwarding @param [Hash] opts the optional parameters @return [CallForwarding]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 3099 def patch_user_callforwarding(user_id, body, opts = {}) data, _status_code, _headers = patch_user_callforwarding_with_http_info(user_id, body, opts) return data end
Patch a user's CallForwarding
@param user_id User
ID @param body Call
forwarding @param [Hash] opts the optional parameters @return [Array<(CallForwarding
, Fixnum, Hash)>] CallForwarding
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 3110 def patch_user_callforwarding_with_http_info(user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.patch_user_callforwarding ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.patch_user_callforwarding" if user_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.patch_user_callforwarding" if body.nil? # resource path local_var_path = "/api/v2/users/{userId}/callforwarding".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CallForwarding') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#patch_user_callforwarding\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
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. @param user_id user Id @param client_id client Id @param body Geolocation
@param [Hash] opts the optional parameters @return [Geolocation]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 3175 def patch_user_geolocation(user_id, client_id, body, opts = {}) data, _status_code, _headers = patch_user_geolocation_with_http_info(user_id, client_id, body, opts) return data end
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. @param user_id user Id @param client_id client Id @param body Geolocation
@param [Hash] opts the optional parameters @return [Array<(Geolocation
, Fixnum, Hash)>] Geolocation
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 3187 def patch_user_geolocation_with_http_info(user_id, client_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.patch_user_geolocation ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.patch_user_geolocation" if user_id.nil? # verify the required parameter 'client_id' is set fail ArgumentError, "Missing the required parameter 'client_id' when calling UsersApi.patch_user_geolocation" if client_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.patch_user_geolocation" if body.nil? # resource path local_var_path = "/api/v2/users/{userId}/geolocations/{clientId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'clientId' + '}', client_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Geolocation') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#patch_user_geolocation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Join or unjoin a queue for a user
@param queue_id Queue
ID @param user_id User
ID @param body Queue
Member @param [Hash] opts the optional parameters @return [UserQueue]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 3260 def patch_user_queue(queue_id, user_id, body, opts = {}) data, _status_code, _headers = patch_user_queue_with_http_info(queue_id, user_id, body, opts) return data end
Join or unjoin a queue for a user
@param queue_id Queue
ID @param user_id User
ID @param body Queue
Member @param [Hash] opts the optional parameters @return [Array<(UserQueue
, Fixnum, Hash)>] UserQueue
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 3272 def patch_user_queue_with_http_info(queue_id, user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.patch_user_queue ..." end # verify the required parameter 'queue_id' is set fail ArgumentError, "Missing the required parameter 'queue_id' when calling UsersApi.patch_user_queue" if queue_id.nil? # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.patch_user_queue" if user_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.patch_user_queue" if body.nil? # resource path local_var_path = "/api/v2/users/{userId}/queues/{queueId}".sub('{format}','json').sub('{' + 'queueId' + '}', queue_id.to_s).sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserQueue') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#patch_user_queue\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Join or unjoin a set of queues for a user
@param user_id User
ID @param body User
Queues @param [Hash] opts the optional parameters @option opts [Array<String>] :division_id Division
ID(s) @return [UserQueueEntityListing]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 3345 def patch_user_queues(user_id, body, opts = {}) data, _status_code, _headers = patch_user_queues_with_http_info(user_id, body, opts) return data end
Join or unjoin a set of queues for a user
@param user_id User
ID @param body User
Queues @param [Hash] opts the optional parameters @option opts [Array<String>] :division_id Division
ID(s) @return [Array<(UserQueueEntityListing
, Fixnum, Hash)>] UserQueueEntityListing
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 3357 def patch_user_queues_with_http_info(user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.patch_user_queues ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.patch_user_queues" if user_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.patch_user_queues" if body.nil? # resource path local_var_path = "/api/v2/users/{userId}/queues".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} query_params[:'divisionId'] = @api_client.build_collection_param(opts[:'division_id'], :multi) if opts[:'division_id'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserQueueEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#patch_user_queues\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update routing language proficiency or state.
@param user_id User
ID @param language_id languageId @param body Language
@param [Hash] opts the optional parameters @return [UserRoutingLanguage]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 3429 def patch_user_routinglanguage(user_id, language_id, body, opts = {}) data, _status_code, _headers = patch_user_routinglanguage_with_http_info(user_id, language_id, body, opts) return data end
Update routing language proficiency or state.
@param user_id User
ID @param language_id languageId @param body Language
@param [Hash] opts the optional parameters @return [Array<(UserRoutingLanguage
, Fixnum, Hash)>] UserRoutingLanguage
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 3441 def patch_user_routinglanguage_with_http_info(user_id, language_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.patch_user_routinglanguage ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.patch_user_routinglanguage" if user_id.nil? # verify the required parameter 'language_id' is set fail ArgumentError, "Missing the required parameter 'language_id' when calling UsersApi.patch_user_routinglanguage" if language_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.patch_user_routinglanguage" if body.nil? # resource path local_var_path = "/api/v2/users/{userId}/routinglanguages/{languageId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'languageId' + '}', language_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserRoutingLanguage') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#patch_user_routinglanguage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Add bulk routing language to user. Max limit 50 languages
@param user_id User
ID @param body Language
@param [Hash] opts the optional parameters @return [UserLanguageEntityListing]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 3513 def patch_user_routinglanguages_bulk(user_id, body, opts = {}) data, _status_code, _headers = patch_user_routinglanguages_bulk_with_http_info(user_id, body, opts) return data end
Add bulk routing language to user. Max limit 50 languages
@param user_id User
ID @param body Language
@param [Hash] opts the optional parameters @return [Array<(UserLanguageEntityListing
, Fixnum, Hash)>] UserLanguageEntityListing
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 3524 def patch_user_routinglanguages_bulk_with_http_info(user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.patch_user_routinglanguages_bulk ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.patch_user_routinglanguages_bulk" if user_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.patch_user_routinglanguages_bulk" if body.nil? # resource path local_var_path = "/api/v2/users/{userId}/routinglanguages/bulk".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserLanguageEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#patch_user_routinglanguages_bulk\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Bulk add routing skills to user
@param user_id User
ID @param body Skill @param [Hash] opts the optional parameters @return [UserSkillEntityListing]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 3588 def patch_user_routingskills_bulk(user_id, body, opts = {}) data, _status_code, _headers = patch_user_routingskills_bulk_with_http_info(user_id, body, opts) return data end
Bulk add routing skills to user
@param user_id User
ID @param body Skill @param [Hash] opts the optional parameters @return [Array<(UserSkillEntityListing
, Fixnum, Hash)>] UserSkillEntityListing
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 3599 def patch_user_routingskills_bulk_with_http_info(user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.patch_user_routingskills_bulk ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.patch_user_routingskills_bulk" if user_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.patch_user_routingskills_bulk" if body.nil? # resource path local_var_path = "/api/v2/users/{userId}/routingskills/bulk".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserSkillEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#patch_user_routingskills_bulk\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update user
@param user_id User
ID @param body User
@param [Hash] opts the optional parameters @return [Array<(User
, Fixnum, Hash)>] User
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 3035 def patch_user_with_http_info(user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.patch_user ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.patch_user" if user_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.patch_user" if body.nil? # resource path local_var_path = "/api/v2/users/{userId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'User') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#patch_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update bulk acd autoanswer on users
@param body Users @param [Hash] opts the optional parameters @return [UserEntityListing]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 3662 def patch_users_bulk(body, opts = {}) data, _status_code, _headers = patch_users_bulk_with_http_info(body, opts) return data end
Update bulk acd autoanswer on users
@param body Users @param [Hash] opts the optional parameters @return [Array<(UserEntityListing
, Fixnum, Hash)>] UserEntityListing
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 3672 def patch_users_bulk_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.patch_users_bulk ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.patch_users_bulk" if body.nil? # resource path local_var_path = "/api/v2/users/bulk".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#patch_users_bulk\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Query for user aggregates
@param body query @param [Hash] opts the optional parameters @return [UserAggregateQueryResponse]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 3727 def post_analytics_users_aggregates_query(body, opts = {}) data, _status_code, _headers = post_analytics_users_aggregates_query_with_http_info(body, opts) return data end
Query for user aggregates
@param body query @param [Hash] opts the optional parameters @return [Array<(UserAggregateQueryResponse
, Fixnum, Hash)>] UserAggregateQueryResponse
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 3737 def post_analytics_users_aggregates_query_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.post_analytics_users_aggregates_query ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.post_analytics_users_aggregates_query" if body.nil? # resource path local_var_path = "/api/v2/analytics/users/aggregates/query".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserAggregateQueryResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#post_analytics_users_aggregates_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Query for user details asynchronously
@param body query @param [Hash] opts the optional parameters @return [AsyncQueryResponse]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 3792 def post_analytics_users_details_jobs(body, opts = {}) data, _status_code, _headers = post_analytics_users_details_jobs_with_http_info(body, opts) return data end
Query for user details asynchronously
@param body query @param [Hash] opts the optional parameters @return [Array<(AsyncQueryResponse
, Fixnum, Hash)>] AsyncQueryResponse
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 3802 def post_analytics_users_details_jobs_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.post_analytics_users_details_jobs ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.post_analytics_users_details_jobs" if body.nil? # resource path local_var_path = "/api/v2/analytics/users/details/jobs".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'AsyncQueryResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#post_analytics_users_details_jobs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Query for user details
@param body query @param [Hash] opts the optional parameters @return [AnalyticsUserDetailsQueryResponse]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 3857 def post_analytics_users_details_query(body, opts = {}) data, _status_code, _headers = post_analytics_users_details_query_with_http_info(body, opts) return data end
Query for user details
@param body query @param [Hash] opts the optional parameters @return [Array<(AnalyticsUserDetailsQueryResponse
, Fixnum, Hash)>] AnalyticsUserDetailsQueryResponse
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 3867 def post_analytics_users_details_query_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.post_analytics_users_details_query ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.post_analytics_users_details_query" if body.nil? # resource path local_var_path = "/api/v2/analytics/users/details/query".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'AnalyticsUserDetailsQueryResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#post_analytics_users_details_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Query for user observations
@param body query @param [Hash] opts the optional parameters @return [UserObservationQueryResponse]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 3922 def post_analytics_users_observations_query(body, opts = {}) data, _status_code, _headers = post_analytics_users_observations_query_with_http_info(body, opts) return data end
Query for user observations
@param body query @param [Hash] opts the optional parameters @return [Array<(UserObservationQueryResponse
, Fixnum, Hash)>] UserObservationQueryResponse
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 3932 def post_analytics_users_observations_query_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.post_analytics_users_observations_query ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.post_analytics_users_observations_query" if body.nil? # resource path local_var_path = "/api/v2/analytics/users/observations/query".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserObservationQueryResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#post_analytics_users_observations_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Send an activation email to the user
@param user_id User
ID @param [Hash] opts the optional parameters @option opts [BOOLEAN] :force Resend the invitation even if one is already outstanding (default to false) @return [nil]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 4238 def post_user_invite(user_id, opts = {}) post_user_invite_with_http_info(user_id, opts) return nil end
Send an activation email to the user
@param user_id User
ID @param [Hash] opts the optional parameters @option opts [BOOLEAN] :force Resend the invitation even if one is already outstanding @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 4249 def post_user_invite_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.post_user_invite ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.post_user_invite" if user_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/invite".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} query_params[:'force'] = opts[:'force'] if opts[:'force'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#post_user_invite\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Change
a users password
@param user_id User
ID @param body Password @param [Hash] opts the optional parameters @return [nil]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 4311 def post_user_password(user_id, body, opts = {}) post_user_password_with_http_info(user_id, body, opts) return nil end
Change
a users password
@param user_id User
ID @param body Password @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 4322 def post_user_password_with_http_info(user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.post_user_password ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.post_user_password" if user_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.post_user_password" if body.nil? # resource path local_var_path = "/api/v2/users/{userId}/password".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#post_user_password\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Add routing language to user
@param user_id User
ID @param body Language
@param [Hash] opts the optional parameters @return [UserRoutingLanguage]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 4385 def post_user_routinglanguages(user_id, body, opts = {}) data, _status_code, _headers = post_user_routinglanguages_with_http_info(user_id, body, opts) return data end
Add routing language to user
@param user_id User
ID @param body Language
@param [Hash] opts the optional parameters @return [Array<(UserRoutingLanguage
, Fixnum, Hash)>] UserRoutingLanguage
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 4396 def post_user_routinglanguages_with_http_info(user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.post_user_routinglanguages ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.post_user_routinglanguages" if user_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.post_user_routinglanguages" if body.nil? # resource path local_var_path = "/api/v2/users/{userId}/routinglanguages".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserRoutingLanguage') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#post_user_routinglanguages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Add routing skill to user
@param user_id User
ID @param body Skill @param [Hash] opts the optional parameters @return [UserRoutingSkill]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 4460 def post_user_routingskills(user_id, body, opts = {}) data, _status_code, _headers = post_user_routingskills_with_http_info(user_id, body, opts) return data end
Add routing skill to user
@param user_id User
ID @param body Skill @param [Hash] opts the optional parameters @return [Array<(UserRoutingSkill
, Fixnum, Hash)>] UserRoutingSkill
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 4471 def post_user_routingskills_with_http_info(user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.post_user_routingskills ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.post_user_routingskills" if user_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.post_user_routingskills" if body.nil? # resource path local_var_path = "/api/v2/users/{userId}/routingskills".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserRoutingSkill') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#post_user_routingskills\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Create user
@param body User
@param [Hash] opts the optional parameters @return [User]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 4534 def post_users(body, opts = {}) data, _status_code, _headers = post_users_with_http_info(body, opts) return data end
Change
your password
@param body Password @param [Hash] opts the optional parameters @return [nil]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 4599 def post_users_me_password(body, opts = {}) post_users_me_password_with_http_info(body, opts) return nil end
Change
your password
@param body Password @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 4609 def post_users_me_password_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.post_users_me_password ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.post_users_me_password" if body.nil? # resource path local_var_path = "/api/v2/users/me/password".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#post_users_me_password\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Search users
@param body Search request options @param [Hash] opts the optional parameters @return [UsersSearchResponse]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 4663 def post_users_search(body, opts = {}) data, _status_code, _headers = post_users_search_with_http_info(body, opts) return data end
Search users
@param body Search request options @param [Hash] opts the optional parameters @return [Array<(UsersSearchResponse
, Fixnum, Hash)>] UsersSearchResponse
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 4673 def post_users_search_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.post_users_search ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.post_users_search" if body.nil? # resource path local_var_path = "/api/v2/users/search".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UsersSearchResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#post_users_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Create user
@param body User
@param [Hash] opts the optional parameters @return [Array<(User
, Fixnum, Hash)>] User
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 4544 def post_users_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.post_users ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.post_users" if body.nil? # resource path local_var_path = "/api/v2/users".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'User') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#post_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update the user's max utilization settings. Include only those media types requiring custom configuration.
@param user_id User
ID @param body utilization @param [Hash] opts the optional parameters @return [Utilization]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 4729 def put_routing_user_utilization(user_id, body, opts = {}) data, _status_code, _headers = put_routing_user_utilization_with_http_info(user_id, body, opts) return data end
Update the user's max utilization settings. Include only those media types requiring custom configuration.
@param user_id User
ID @param body utilization @param [Hash] opts the optional parameters @return [Array<(Utilization
, Fixnum, Hash)>] Utilization
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 4740 def put_routing_user_utilization_with_http_info(user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.put_routing_user_utilization ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.put_routing_user_utilization" if user_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.put_routing_user_utilization" if body.nil? # resource path local_var_path = "/api/v2/routing/users/{userId}/utilization".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Utilization') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#put_routing_user_utilization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update a user's CallForwarding
@param user_id User
ID @param body Call
forwarding @param [Hash] opts the optional parameters @return [CallForwarding]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 4804 def put_user_callforwarding(user_id, body, opts = {}) data, _status_code, _headers = put_user_callforwarding_with_http_info(user_id, body, opts) return data end
Update a user's CallForwarding
@param user_id User
ID @param body Call
forwarding @param [Hash] opts the optional parameters @return [Array<(CallForwarding
, Fixnum, Hash)>] CallForwarding
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 4815 def put_user_callforwarding_with_http_info(user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.put_user_callforwarding ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.put_user_callforwarding" if user_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.put_user_callforwarding" if body.nil? # resource path local_var_path = "/api/v2/users/{userId}/callforwarding".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CallForwarding') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#put_user_callforwarding\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update an OutOfOffice
@param user_id User
ID @param body The updated OutOffOffice @param [Hash] opts the optional parameters @return [OutOfOffice]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 4879 def put_user_outofoffice(user_id, body, opts = {}) data, _status_code, _headers = put_user_outofoffice_with_http_info(user_id, body, opts) return data end
Update an OutOfOffice
@param user_id User
ID @param body The updated OutOffOffice @param [Hash] opts the optional parameters @return [Array<(OutOfOffice
, Fixnum, Hash)>] OutOfOffice
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 4890 def put_user_outofoffice_with_http_info(user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.put_user_outofoffice ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.put_user_outofoffice" if user_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.put_user_outofoffice" if body.nil? # resource path local_var_path = "/api/v2/users/{userId}/outofoffice".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OutOfOffice') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#put_user_outofoffice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update profile skills for a user
@param user_id User
ID @param body Skills @param [Hash] opts the optional parameters @return [Array<String>]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 4954 def put_user_profileskills(user_id, body, opts = {}) data, _status_code, _headers = put_user_profileskills_with_http_info(user_id, body, opts) return data end
Update profile skills for a user
@param user_id User
ID @param body Skills @param [Hash] opts the optional parameters @return [Array<(Array<String>, Fixnum, Hash)>] Array<String> data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 4965 def put_user_profileskills_with_http_info(user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.put_user_profileskills ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.put_user_profileskills" if user_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.put_user_profileskills" if body.nil? # resource path local_var_path = "/api/v2/users/{userId}/profileskills".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array<String>') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#put_user_profileskills\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Sets the user's roles
@param user_id User
ID @param body List of roles @param [Hash] opts the optional parameters @return [UserAuthorization]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 5029 def put_user_roles(user_id, body, opts = {}) data, _status_code, _headers = put_user_roles_with_http_info(user_id, body, opts) return data end
Sets the user's roles
@param user_id User
ID @param body List of roles @param [Hash] opts the optional parameters @return [Array<(UserAuthorization
, Fixnum, Hash)>] UserAuthorization
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 5040 def put_user_roles_with_http_info(user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.put_user_roles ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.put_user_roles" if user_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.put_user_roles" if body.nil? # resource path local_var_path = "/api/v2/users/{userId}/roles".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserAuthorization') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#put_user_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update routing skill proficiency or state.
@param user_id User
ID @param skill_id skillId @param body Skill @param [Hash] opts the optional parameters @return [UserRoutingSkill]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 5105 def put_user_routingskill(user_id, skill_id, body, opts = {}) data, _status_code, _headers = put_user_routingskill_with_http_info(user_id, skill_id, body, opts) return data end
Update routing skill proficiency or state.
@param user_id User
ID @param skill_id skillId @param body Skill @param [Hash] opts the optional parameters @return [Array<(UserRoutingSkill
, Fixnum, Hash)>] UserRoutingSkill
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 5117 def put_user_routingskill_with_http_info(user_id, skill_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.put_user_routingskill ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.put_user_routingskill" if user_id.nil? # verify the required parameter 'skill_id' is set fail ArgumentError, "Missing the required parameter 'skill_id' when calling UsersApi.put_user_routingskill" if skill_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.put_user_routingskill" if body.nil? # resource path local_var_path = "/api/v2/users/{userId}/routingskills/{skillId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'skillId' + '}', skill_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserRoutingSkill') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#put_user_routingskill\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Replace all routing skills assigned to a user
@param user_id User
ID @param body Skill @param [Hash] opts the optional parameters @return [UserSkillEntityListing]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 5189 def put_user_routingskills_bulk(user_id, body, opts = {}) data, _status_code, _headers = put_user_routingskills_bulk_with_http_info(user_id, body, opts) return data end
Replace all routing skills assigned to a user
@param user_id User
ID @param body Skill @param [Hash] opts the optional parameters @return [Array<(UserSkillEntityListing
, Fixnum, Hash)>] UserSkillEntityListing
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 5200 def put_user_routingskills_bulk_with_http_info(user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.put_user_routingskills_bulk ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.put_user_routingskills_bulk" if user_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.put_user_routingskills_bulk" if body.nil? # resource path local_var_path = "/api/v2/users/{userId}/routingskills/bulk".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserSkillEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#put_user_routingskills_bulk\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update the routing status of a user
@param user_id User
ID @param body Routing Status @param [Hash] opts the optional parameters @return [RoutingStatus]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 5264 def put_user_routingstatus(user_id, body, opts = {}) data, _status_code, _headers = put_user_routingstatus_with_http_info(user_id, body, opts) return data end
Update the routing status of a user
@param user_id User
ID @param body Routing Status @param [Hash] opts the optional parameters @return [Array<(RoutingStatus
, Fixnum, Hash)>] RoutingStatus
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 5275 def put_user_routingstatus_with_http_info(user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.put_user_routingstatus ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.put_user_routingstatus" if user_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.put_user_routingstatus" if body.nil? # resource path local_var_path = "/api/v2/users/{userId}/routingstatus".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'RoutingStatus') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#put_user_routingstatus\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Set associated station
@param user_id User
ID @param station_id stationId @param [Hash] opts the optional parameters @return [nil]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 5339 def put_user_station_associatedstation_station_id(user_id, station_id, opts = {}) put_user_station_associatedstation_station_id_with_http_info(user_id, station_id, opts) return nil end
Set associated station
@param user_id User
ID @param station_id stationId @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 5350 def put_user_station_associatedstation_station_id_with_http_info(user_id, station_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.put_user_station_associatedstation_station_id ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.put_user_station_associatedstation_station_id" if user_id.nil? # verify the required parameter 'station_id' is set fail ArgumentError, "Missing the required parameter 'station_id' when calling UsersApi.put_user_station_associatedstation_station_id" if station_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/station/associatedstation/{stationId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'stationId' + '}', station_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#put_user_station_associatedstation_station_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Set default station
@param user_id User
ID @param station_id stationId @param [Hash] opts the optional parameters @return [nil]
# File lib/purecloudplatformclientv2/api/users_api.rb, line 5413 def put_user_station_defaultstation_station_id(user_id, station_id, opts = {}) put_user_station_defaultstation_station_id_with_http_info(user_id, station_id, opts) return nil end
Set default station
@param user_id User
ID @param station_id stationId @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/purecloudplatformclientv2/api/users_api.rb, line 5424 def put_user_station_defaultstation_station_id_with_http_info(user_id, station_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.put_user_station_defaultstation_station_id ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.put_user_station_defaultstation_station_id" if user_id.nil? # verify the required parameter 'station_id' is set fail ArgumentError, "Missing the required parameter 'station_id' when calling UsersApi.put_user_station_defaultstation_station_id" if station_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/station/defaultstation/{stationId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'stationId' + '}', station_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#put_user_station_defaultstation_station_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end