Class: Falcon::System

Inherits:
Object
  • Object
show all
Defined in:
lib/crimson-falcon/api/system.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ System

Returns a new instance of System.



36
37
38
# File 'lib/crimson-falcon/api/system.rb', line 36

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



34
35
36
# File 'lib/crimson-falcon/api/system.rb', line 34

def api_client
  @api_client
end

Instance Method Details

#get_system_logs_v3(opts = {}) ⇒ GetSystemLogs

GET System Logs Get a list of all system logs

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :from_date (Time)

    From Date (in YYYY-MM-DD format)

  • :limit (Integer)

    The maximum number of objects to return

  • :offset (Integer)

    The starting index of the results

  • :to_date (Time)

    To Date (in YYYY-MM-DD format)

  • :total_count (Boolean)

    Fetch Total Count?

Returns:



48
49
50
51
# File 'lib/crimson-falcon/api/system.rb', line 48

def get_system_logs_v3(opts = {})
  data, _status_code, _headers = get_system_logs_v3_with_http_info(opts)
  data
end

#get_system_logs_v3_with_http_info(opts = {}) ⇒ Array<(GetSystemLogs, Integer, Hash)>

GET System Logs Get a list of all system logs

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :from_date (Time)

    From Date (in YYYY-MM-DD format)

  • :limit (Integer)

    The maximum number of objects to return

  • :offset (Integer)

    The starting index of the results

  • :to_date (Time)

    To Date (in YYYY-MM-DD format)

  • :total_count (Boolean)

    Fetch Total Count?

Returns:

  • (Array<(GetSystemLogs, Integer, Hash)>)

    GetSystemLogs data, response status code and response headers



62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'lib/crimson-falcon/api/system.rb', line 62

def get_system_logs_v3_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: System.get_system_logs_v3 ...'
  end
  # resource path
  local_var_path = '/saas-security/entities/system-logs/v3'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'from_date'] = opts[:'from_date'] if !opts[:'from_date'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'to_date'] = opts[:'to_date'] if !opts[:'to_date'].nil?
  query_params[:'total_count'] = opts[:'total_count'] if !opts[:'total_count'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'GetSystemLogs'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"System.get_system_logs_v3",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: System#get_system_logs_v3\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_system_users_v3(opts = {}) ⇒ GetSystemUsers

GET System Users Get a list of system users

Parameters:

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

    the optional parameters

Returns:



115
116
117
118
# File 'lib/crimson-falcon/api/system.rb', line 115

def get_system_users_v3(opts = {})
  data, _status_code, _headers = get_system_users_v3_with_http_info(opts)
  data
end

#get_system_users_v3_with_http_info(opts = {}) ⇒ Array<(GetSystemUsers, Integer, Hash)>

GET System Users Get a list of system users

Parameters:

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

    the optional parameters

Returns:

  • (Array<(GetSystemUsers, Integer, Hash)>)

    GetSystemUsers data, response status code and response headers



124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# File 'lib/crimson-falcon/api/system.rb', line 124

def get_system_users_v3_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: System.get_system_users_v3 ...'
  end
  # resource path
  local_var_path = '/saas-security/entities/system-users/v3'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'GetSystemUsers'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"System.get_system_users_v3",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: System#get_system_users_v3\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end