Method: PureCloud::AnalyticsApi#post_users_aggregates_query_with_http_info

Defined in:
lib/purecloud/api/analytics_api.rb

#post_users_aggregates_query_with_http_info(body, opts = {}) ⇒ Array<(PresenceQueryResponse, Fixnum, Hash)>

Query for user aggregates

Parameters:

  • body

    query

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(PresenceQueryResponse, Fixnum, Hash)>)

    PresenceQueryResponse data, response status code and response headers



1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
# File 'lib/purecloud/api/analytics_api.rb', line 1136

def post_users_aggregates_query_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AnalyticsApi#post_users_aggregates_query ..."
  end
  
  # verify the required parameter 'body' is set
  fail "Missing the required parameter 'body' when calling post_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['PureCloud Auth']
  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 => 'PresenceQueryResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AnalyticsApi#post_users_aggregates_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end