class SematextCloud::SavedQueriesApi
Attributes
Public Class Methods
# File lib/SematextCloud/api/saved_queries_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Delete saved query @param updateable_query_id updateableQueryId @param [Hash] opts the optional parameters @return [GenericApiResponse]
# File lib/SematextCloud/api/saved_queries_api.rb, line 26 def delete_saved_query_using_delete(updateable_query_id, opts = {}) data, _status_code, _headers = delete_saved_query_using_delete_with_http_info(updateable_query_id, opts) data end
Delete saved query @param updateable_query_id updateableQueryId @param [Hash] opts the optional parameters @return [Array<(GenericApiResponse
, Fixnum, Hash)>] GenericApiResponse
data, response status code and response headers
# File lib/SematextCloud/api/saved_queries_api.rb, line 35 def delete_saved_query_using_delete_with_http_info(updateable_query_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SavedQueriesApi.delete_saved_query_using_delete ...' end # verify the required parameter 'updateable_query_id' is set if @api_client.config.client_side_validation && updateable_query_id.nil? fail ArgumentError, "Missing the required parameter 'updateable_query_id' when calling SavedQueriesApi.delete_saved_query_using_delete" end # resource path local_var_path = '/users-web/api/v3/savedQueries/{updateableQueryId}'.sub('{' + 'updateableQueryId' + '}', updateable_query_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api_key'] 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 => 'GenericApiResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: SavedQueriesApi#delete_saved_query_using_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get saved queries for an app @param app_id appId @param [Hash] opts the optional parameters @return [GenericApiResponse]
# File lib/SematextCloud/api/saved_queries_api.rb, line 78 def get_saved_queries_for_app_using_get(app_id, opts = {}) data, _status_code, _headers = get_saved_queries_for_app_using_get_with_http_info(app_id, opts) data end
Get saved queries for an app @param app_id appId @param [Hash] opts the optional parameters @return [Array<(GenericApiResponse
, Fixnum, Hash)>] GenericApiResponse
data, response status code and response headers
# File lib/SematextCloud/api/saved_queries_api.rb, line 87 def get_saved_queries_for_app_using_get_with_http_info(app_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SavedQueriesApi.get_saved_queries_for_app_using_get ...' end # verify the required parameter 'app_id' is set if @api_client.config.client_side_validation && app_id.nil? fail ArgumentError, "Missing the required parameter 'app_id' when calling SavedQueriesApi.get_saved_queries_for_app_using_get" end # resource path local_var_path = '/users-web/api/v3/apps/{appId}/savedQueries'.sub('{' + 'appId' + '}', app_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api_key'] 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 => 'GenericApiResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: SavedQueriesApi#get_saved_queries_for_app_using_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Create saved query @param saved_query_dto savedQueryDto @param [Hash] opts the optional parameters @return [GenericApiResponse]
# File lib/SematextCloud/api/saved_queries_api.rb, line 130 def save_query_using_post(saved_query_dto, opts = {}) data, _status_code, _headers = save_query_using_post_with_http_info(saved_query_dto, opts) data end
Create saved query @param saved_query_dto savedQueryDto @param [Hash] opts the optional parameters @return [Array<(GenericApiResponse
, Fixnum, Hash)>] GenericApiResponse
data, response status code and response headers
# File lib/SematextCloud/api/saved_queries_api.rb, line 139 def save_query_using_post_with_http_info(saved_query_dto, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SavedQueriesApi.save_query_using_post ...' end # verify the required parameter 'saved_query_dto' is set if @api_client.config.client_side_validation && saved_query_dto.nil? fail ArgumentError, "Missing the required parameter 'saved_query_dto' when calling SavedQueriesApi.save_query_using_post" end # resource path local_var_path = '/users-web/api/v3/savedQueries' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(saved_query_dto) auth_names = ['api_key'] 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 => 'GenericApiResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: SavedQueriesApi#save_query_using_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update saved query @param saved_query_dto savedQueryDto @param updateable_query_id updateableQueryId @param [Hash] opts the optional parameters @return [GenericApiResponse]
# File lib/SematextCloud/api/saved_queries_api.rb, line 183 def save_query_using_put(saved_query_dto, updateable_query_id, opts = {}) data, _status_code, _headers = save_query_using_put_with_http_info(saved_query_dto, updateable_query_id, opts) data end
Update saved query @param saved_query_dto savedQueryDto @param updateable_query_id updateableQueryId @param [Hash] opts the optional parameters @return [Array<(GenericApiResponse
, Fixnum, Hash)>] GenericApiResponse
data, response status code and response headers
# File lib/SematextCloud/api/saved_queries_api.rb, line 193 def save_query_using_put_with_http_info(saved_query_dto, updateable_query_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SavedQueriesApi.save_query_using_put ...' end # verify the required parameter 'saved_query_dto' is set if @api_client.config.client_side_validation && saved_query_dto.nil? fail ArgumentError, "Missing the required parameter 'saved_query_dto' when calling SavedQueriesApi.save_query_using_put" end # verify the required parameter 'updateable_query_id' is set if @api_client.config.client_side_validation && updateable_query_id.nil? fail ArgumentError, "Missing the required parameter 'updateable_query_id' when calling SavedQueriesApi.save_query_using_put" end # resource path local_var_path = '/users-web/api/v3/savedQueries/{updateableQueryId}'.sub('{' + 'updateableQueryId' + '}', updateable_query_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(saved_query_dto) auth_names = ['api_key'] 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 => 'GenericApiResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: SavedQueriesApi#save_query_using_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end