class SmplkitGeneratedClient::Logging::LoggerSourcesApi
def initialize(api_client = ApiClient.default)
def initialize(api_client = ApiClient.default) @api_client = api_client end
def list_all_logger_sources(opts = {})
-
(LoggerSourceListResponse)-
Options Hash:
(**opts)-
:meta_total(Boolean) -- When `true`, the response's `meta.pagination` block includes `total` (the total number of matching items across all pages) and `total_pages`. Computing these requires an extra `COUNT` query, so omit (or pass `false`) when the totals are not needed. Defaults to `false`. (default to false) -
:page_size(Integer) -- Number of items per page. Optional; defaults to `1000` when omitted. Must be between `1` and `1000` inclusive — requests outside that range are rejected with a 400 error. (default to 1000) -
:page_number(Integer) -- 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error. (default to 1) -
:sort(String) -- Field to sort by. Prefix with `-` for descending order. Default: `-last_seen`. Allowed values: `created_at`, `-created_at`, `environment`, `-environment`, `last_seen`, `-last_seen`, `service`, `-service`. (default to '-last_seen') -
:filter_service(String) -- -
:filter_environment(String) --
Parameters:
-
opts(Hash) -- the optional parameters
def list_all_logger_sources(opts = {}) data, _status_code, _headers = list_all_logger_sources_with_http_info(opts) data end
def list_all_logger_sources_with_http_info(opts = {})
-
(Array<(LoggerSourceListResponse, Integer, Hash)>)- LoggerSourceListResponse data, response status code and response headers
Options Hash:
(**opts)-
:meta_total(Boolean) -- When `true`, the response's `meta.pagination` block includes `total` (the total number of matching items across all pages) and `total_pages`. Computing these requires an extra `COUNT` query, so omit (or pass `false`) when the totals are not needed. Defaults to `false`. (default to false) -
:page_size(Integer) -- Number of items per page. Optional; defaults to `1000` when omitted. Must be between `1` and `1000` inclusive — requests outside that range are rejected with a 400 error. (default to 1000) -
:page_number(Integer) -- 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error. (default to 1) -
:sort(String) -- Field to sort by. Prefix with `-` for descending order. Default: `-last_seen`. Allowed values: `created_at`, `-created_at`, `environment`, `-environment`, `last_seen`, `-last_seen`, `service`, `-service`. (default to '-last_seen') -
:filter_service(String) -- -
:filter_environment(String) --
Parameters:
-
opts(Hash) -- the optional parameters
def list_all_logger_sources_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LoggerSourcesApi.list_all_logger_sources ...' end allowable_values = ["created_at", "-created_at", "environment", "-environment", "last_seen", "-last_seen", "service", "-service"] if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort']) fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}" end # resource path local_var_path = '/api/v1/logger_sources' # query parameters query_params = opts[:query_params] || {} query_params[:'filter[environment]'] = opts[:'filter_environment'] if !opts[:'filter_environment'].nil? query_params[:'filter[service]'] = opts[:'filter_service'] if !opts[:'filter_service'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'meta[total]'] = opts[:'meta_total'] if !opts[:'meta_total'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'LoggerSourceListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['HTTPBearer'] new_options = opts.merge( :operation => :"LoggerSourcesApi.list_all_logger_sources", :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: LoggerSourcesApi#list_all_logger_sources\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
def list_logger_sources(id, opts = {})
-
(LoggerSourceListResponse)-
Options Hash:
(**opts)-
:meta_total(Boolean) -- When `true`, the response's `meta.pagination` block includes `total` (the total number of matching items across all pages) and `total_pages`. Computing these requires an extra `COUNT` query, so omit (or pass `false`) when the totals are not needed. Defaults to `false`. (default to false) -
:page_size(Integer) -- Number of items per page. Optional; defaults to `1000` when omitted. Must be between `1` and `1000` inclusive — requests outside that range are rejected with a 400 error. (default to 1000) -
:page_number(Integer) -- 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error. (default to 1) -
:sort(String) -- Field to sort by. Prefix with `-` for descending order. Default: `-last_seen`. Allowed values: `created_at`, `-created_at`, `environment`, `-environment`, `last_seen`, `-last_seen`, `service`, `-service`. (default to '-last_seen')
Parameters:
-
opts(Hash) -- the optional parameters -
id(String) --
def list_logger_sources(id, opts = {}) data, _status_code, _headers = list_logger_sources_with_http_info(id, opts) data end
def list_logger_sources_with_http_info(id, opts = {})
-
(Array<(LoggerSourceListResponse, Integer, Hash)>)- LoggerSourceListResponse data, response status code and response headers
Options Hash:
(**opts)-
:meta_total(Boolean) -- When `true`, the response's `meta.pagination` block includes `total` (the total number of matching items across all pages) and `total_pages`. Computing these requires an extra `COUNT` query, so omit (or pass `false`) when the totals are not needed. Defaults to `false`. (default to false) -
:page_size(Integer) -- Number of items per page. Optional; defaults to `1000` when omitted. Must be between `1` and `1000` inclusive — requests outside that range are rejected with a 400 error. (default to 1000) -
:page_number(Integer) -- 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error. (default to 1) -
:sort(String) -- Field to sort by. Prefix with `-` for descending order. Default: `-last_seen`. Allowed values: `created_at`, `-created_at`, `environment`, `-environment`, `last_seen`, `-last_seen`, `service`, `-service`. (default to '-last_seen')
Parameters:
-
opts(Hash) -- the optional parameters -
id(String) --
def list_logger_sources_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LoggerSourcesApi.list_logger_sources ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling LoggerSourcesApi.list_logger_sources" end allowable_values = ["created_at", "-created_at", "environment", "-environment", "last_seen", "-last_seen", "service", "-service"] if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort']) fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}" end # resource path local_var_path = '/api/v1/loggers/{id}/sources'.sub('{id}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'meta[total]'] = opts[:'meta_total'] if !opts[:'meta_total'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'LoggerSourceListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['HTTPBearer'] new_options = opts.merge( :operation => :"LoggerSourcesApi.list_logger_sources", :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: LoggerSourcesApi#list_logger_sources\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end