Method: NexosisApi::Client::Sessions#remove_sessions

Defined in:
lib/nexosis_api/client/sessions.rb

#remove_sessions(query_options = {}) ⇒ Object

Note:

query parameters hash members are type, dataset_name, event_name, start_date, and end_date. Start and end dates refer to the session requested date. Results are not removed but then can only be accessed by dataset name

Remove sessions that have been run. All query options are optional and will be used to limit the sessions removed.

Examples:

Remove all sessions based on a dataset by name

NexosisApi.client.remove_sessions :dataset_name => 'existing_dataset'

Parameters:

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

    optionally provide query parametes to limit the set of sessions removed.

Raises:


61
62
63
64
65
66
# File 'lib/nexosis_api/client/sessions.rb', line 61

def remove_sessions(query_options = {})
  sessions_url = '/sessions'
  response = self.class.delete(sessions_url, :headers => @headers, :query => get_query_from_options(query_options))
  return if response.success?
  raise HttpException.new('Could not remove sessions', "Remove sessions with query #{query_options.to_s}",response)
end