# Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. module Algolia class IngestionClient attr_accessor :api_client def initialize(config = nil) raise '`config` is missing.' if config.nil? raise '`app_id` is missing.' if config.app_id.nil? || config.app_id == '' raise '`api_key` is missing.' if config.api_key.nil? || config.api_key == '' @api_client = Algolia::ApiClient.new(config) end def self.create(app_id, api_key, region = nil, opts = {}) hosts = [] regions = ['eu', 'us'] if region.is_a?(Hash) && (opts.nil? || opts.empty?) opts = region region = nil end raise "`region` is required and must be one of the following: #{regions.join(', ')}" if region.nil? || !region.is_a?(String) || !regions.include?(region) hosts << Transport::StatefulHost.new('data.{region}.algolia.com'.sub!('{region}', region), accept: CallType::READ | CallType::WRITE) config = Algolia::Configuration.new(app_id, api_key, hosts, 'Ingestion', opts) create_with_config(config) end def self.create_with_config(config) new(config) end # Create a authentication. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param authentication_create [AuthenticationCreate] (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def create_authentication_with_http_info(authentication_create, request_options = {}) # verify the required parameter 'authentication_create' is set if @api_client.config.client_side_validation && authentication_create.nil? raise ArgumentError, "Parameter `authentication_create` is required when calling `create_authentication`." end path = '/1/authentications' query_params = {} query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil? header_params = {} header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil? post_body = request_options[:debug_body] || @api_client.object_to_http_body(authentication_create) new_options = request_options.merge( :operation => :'IngestionClient.create_authentication', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:POST, path, new_options) end # Create a authentication. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param authentication_create [AuthenticationCreate] (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [AuthenticationCreateResponse] def create_authentication(authentication_create, request_options = {}) response = create_authentication_with_http_info(authentication_create, request_options) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::AuthenticationCreateResponse') end # Create a destination. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param destination_create [DestinationCreate] (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def create_destination_with_http_info(destination_create, request_options = {}) # verify the required parameter 'destination_create' is set if @api_client.config.client_side_validation && destination_create.nil? raise ArgumentError, "Parameter `destination_create` is required when calling `create_destination`." end path = '/1/destinations' query_params = {} query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil? header_params = {} header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil? post_body = request_options[:debug_body] || @api_client.object_to_http_body(destination_create) new_options = request_options.merge( :operation => :'IngestionClient.create_destination', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:POST, path, new_options) end # Create a destination. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param destination_create [DestinationCreate] (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [DestinationCreateResponse] def create_destination(destination_create, request_options = {}) response = create_destination_with_http_info(destination_create, request_options) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::DestinationCreateResponse') end # Create a source. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param source_create [SourceCreate] (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def create_source_with_http_info(source_create, request_options = {}) # verify the required parameter 'source_create' is set if @api_client.config.client_side_validation && source_create.nil? raise ArgumentError, "Parameter `source_create` is required when calling `create_source`." end path = '/1/sources' query_params = {} query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil? header_params = {} header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil? post_body = request_options[:debug_body] || @api_client.object_to_http_body(source_create) new_options = request_options.merge( :operation => :'IngestionClient.create_source', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:POST, path, new_options) end # Create a source. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param source_create [SourceCreate] (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [SourceCreateResponse] def create_source(source_create, request_options = {}) response = create_source_with_http_info(source_create, request_options) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::SourceCreateResponse') end # Create a task. # @param task_create [TaskCreate] (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def create_task_with_http_info(task_create, request_options = {}) # verify the required parameter 'task_create' is set if @api_client.config.client_side_validation && task_create.nil? raise ArgumentError, "Parameter `task_create` is required when calling `create_task`." end path = '/1/tasks' query_params = {} query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil? header_params = {} header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil? post_body = request_options[:debug_body] || @api_client.object_to_http_body(task_create) new_options = request_options.merge( :operation => :'IngestionClient.create_task', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:POST, path, new_options) end # Create a task. # @param task_create [TaskCreate] (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [TaskCreateResponse] def create_task(task_create, request_options = {}) response = create_task_with_http_info(task_create, request_options) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::TaskCreateResponse') end # This method allow you to send requests to the Algolia REST API. # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required) # @param parameters [Hash] Query parameters to apply to the current query. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def custom_delete_with_http_info(path, parameters = nil, request_options = {}) # verify the required parameter 'path' is set if @api_client.config.client_side_validation && path.nil? raise ArgumentError, "Parameter `path` is required when calling `custom_delete`." end path = '/1{path}'.sub('{' + 'path' + '}', path.to_s) query_params = {} query_params = query_params.merge(parameters) unless parameters.nil? query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil? header_params = {} header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil? post_body = request_options[:debug_body] new_options = request_options.merge( :operation => :'IngestionClient.custom_delete', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:DELETE, path, new_options) end # This method allow you to send requests to the Algolia REST API. # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required) # @param parameters [Hash] Query parameters to apply to the current query. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Object] def custom_delete(path, parameters = nil, request_options = {}) response = custom_delete_with_http_info(path, parameters, request_options) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object') end # This method allow you to send requests to the Algolia REST API. # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required) # @param parameters [Hash] Query parameters to apply to the current query. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def custom_get_with_http_info(path, parameters = nil, request_options = {}) # verify the required parameter 'path' is set if @api_client.config.client_side_validation && path.nil? raise ArgumentError, "Parameter `path` is required when calling `custom_get`." end path = '/1{path}'.sub('{' + 'path' + '}', path.to_s) query_params = {} query_params = query_params.merge(parameters) unless parameters.nil? query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil? header_params = {} header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil? post_body = request_options[:debug_body] new_options = request_options.merge( :operation => :'IngestionClient.custom_get', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:GET, path, new_options) end # This method allow you to send requests to the Algolia REST API. # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required) # @param parameters [Hash] Query parameters to apply to the current query. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Object] def custom_get(path, parameters = nil, request_options = {}) response = custom_get_with_http_info(path, parameters, request_options) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object') end # This method allow you to send requests to the Algolia REST API. # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required) # @param parameters [Hash] Query parameters to apply to the current query. # @param body [Object] Parameters to send with the custom request. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def custom_post_with_http_info(path, parameters = nil, body = nil, request_options = {}) # verify the required parameter 'path' is set if @api_client.config.client_side_validation && path.nil? raise ArgumentError, "Parameter `path` is required when calling `custom_post`." end path = '/1{path}'.sub('{' + 'path' + '}', path.to_s) query_params = {} query_params = query_params.merge(parameters) unless parameters.nil? query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil? header_params = {} header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil? post_body = request_options[:debug_body] || @api_client.object_to_http_body(body) new_options = request_options.merge( :operation => :'IngestionClient.custom_post', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:POST, path, new_options) end # This method allow you to send requests to the Algolia REST API. # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required) # @param parameters [Hash] Query parameters to apply to the current query. # @param body [Object] Parameters to send with the custom request. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Object] def custom_post(path, parameters = nil, body = nil, request_options = {}) response = custom_post_with_http_info(path, parameters, body, request_options) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object') end # This method allow you to send requests to the Algolia REST API. # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required) # @param parameters [Hash] Query parameters to apply to the current query. # @param body [Object] Parameters to send with the custom request. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def custom_put_with_http_info(path, parameters = nil, body = nil, request_options = {}) # verify the required parameter 'path' is set if @api_client.config.client_side_validation && path.nil? raise ArgumentError, "Parameter `path` is required when calling `custom_put`." end path = '/1{path}'.sub('{' + 'path' + '}', path.to_s) query_params = {} query_params = query_params.merge(parameters) unless parameters.nil? query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil? header_params = {} header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil? post_body = request_options[:debug_body] || @api_client.object_to_http_body(body) new_options = request_options.merge( :operation => :'IngestionClient.custom_put', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:PUT, path, new_options) end # This method allow you to send requests to the Algolia REST API. # @param path [String] Path of the endpoint, anything after \"/1\" must be specified. (required) # @param parameters [Hash] Query parameters to apply to the current query. # @param body [Object] Parameters to send with the custom request. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Object] def custom_put(path, parameters = nil, body = nil, request_options = {}) response = custom_put_with_http_info(path, parameters, body, request_options) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object') end # Soft delete the authentication of the given authenticationID. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param authentication_id [String] The authentication UUID. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def delete_authentication_with_http_info(authentication_id, request_options = {}) # verify the required parameter 'authentication_id' is set if @api_client.config.client_side_validation && authentication_id.nil? raise ArgumentError, "Parameter `authentication_id` is required when calling `delete_authentication`." end path = '/1/authentications/{authenticationID}'.sub('{' + 'authenticationID' + '}', Transport.encode_uri(authentication_id.to_s)) query_params = {} query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil? header_params = {} header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil? post_body = request_options[:debug_body] new_options = request_options.merge( :operation => :'IngestionClient.delete_authentication', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:DELETE, path, new_options) end # Soft delete the authentication of the given authenticationID. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param authentication_id [String] The authentication UUID. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [DeleteResponse] def delete_authentication(authentication_id, request_options = {}) response = delete_authentication_with_http_info(authentication_id, request_options) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::DeleteResponse') end # Soft delete the destination of the given destinationID. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param destination_id [String] The destination UUID. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def delete_destination_with_http_info(destination_id, request_options = {}) # verify the required parameter 'destination_id' is set if @api_client.config.client_side_validation && destination_id.nil? raise ArgumentError, "Parameter `destination_id` is required when calling `delete_destination`." end path = '/1/destinations/{destinationID}'.sub('{' + 'destinationID' + '}', Transport.encode_uri(destination_id.to_s)) query_params = {} query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil? header_params = {} header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil? post_body = request_options[:debug_body] new_options = request_options.merge( :operation => :'IngestionClient.delete_destination', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:DELETE, path, new_options) end # Soft delete the destination of the given destinationID. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param destination_id [String] The destination UUID. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [DeleteResponse] def delete_destination(destination_id, request_options = {}) response = delete_destination_with_http_info(destination_id, request_options) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::DeleteResponse') end # Soft delete the source of the given sourceID. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param source_id [String] The source UUID. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def delete_source_with_http_info(source_id, request_options = {}) # verify the required parameter 'source_id' is set if @api_client.config.client_side_validation && source_id.nil? raise ArgumentError, "Parameter `source_id` is required when calling `delete_source`." end path = '/1/sources/{sourceID}'.sub('{' + 'sourceID' + '}', Transport.encode_uri(source_id.to_s)) query_params = {} query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil? header_params = {} header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil? post_body = request_options[:debug_body] new_options = request_options.merge( :operation => :'IngestionClient.delete_source', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:DELETE, path, new_options) end # Soft delete the source of the given sourceID. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param source_id [String] The source UUID. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [DeleteResponse] def delete_source(source_id, request_options = {}) response = delete_source_with_http_info(source_id, request_options) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::DeleteResponse') end # Soft delete the task of the given taskID. # @param task_id [String] The task UUID. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def delete_task_with_http_info(task_id, request_options = {}) # verify the required parameter 'task_id' is set if @api_client.config.client_side_validation && task_id.nil? raise ArgumentError, "Parameter `task_id` is required when calling `delete_task`." end path = '/1/tasks/{taskID}'.sub('{' + 'taskID' + '}', Transport.encode_uri(task_id.to_s)) query_params = {} query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil? header_params = {} header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil? post_body = request_options[:debug_body] new_options = request_options.merge( :operation => :'IngestionClient.delete_task', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:DELETE, path, new_options) end # Soft delete the task of the given taskID. # @param task_id [String] The task UUID. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [DeleteResponse] def delete_task(task_id, request_options = {}) response = delete_task_with_http_info(task_id, request_options) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::DeleteResponse') end # Disable the task of the given taskID. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param task_id [String] The task UUID. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def disable_task_with_http_info(task_id, request_options = {}) # verify the required parameter 'task_id' is set if @api_client.config.client_side_validation && task_id.nil? raise ArgumentError, "Parameter `task_id` is required when calling `disable_task`." end path = '/1/tasks/{taskID}/disable'.sub('{' + 'taskID' + '}', Transport.encode_uri(task_id.to_s)) query_params = {} query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil? header_params = {} header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil? post_body = request_options[:debug_body] new_options = request_options.merge( :operation => :'IngestionClient.disable_task', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:PUT, path, new_options) end # Disable the task of the given taskID. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param task_id [String] The task UUID. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [TaskUpdateResponse] def disable_task(task_id, request_options = {}) response = disable_task_with_http_info(task_id, request_options) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::TaskUpdateResponse') end # Enable the task of the given taskID. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param task_id [String] The task UUID. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def enable_task_with_http_info(task_id, request_options = {}) # verify the required parameter 'task_id' is set if @api_client.config.client_side_validation && task_id.nil? raise ArgumentError, "Parameter `task_id` is required when calling `enable_task`." end path = '/1/tasks/{taskID}/enable'.sub('{' + 'taskID' + '}', Transport.encode_uri(task_id.to_s)) query_params = {} query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil? header_params = {} header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil? post_body = request_options[:debug_body] new_options = request_options.merge( :operation => :'IngestionClient.enable_task', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:PUT, path, new_options) end # Enable the task of the given taskID. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param task_id [String] The task UUID. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [TaskUpdateResponse] def enable_task(task_id, request_options = {}) response = enable_task_with_http_info(task_id, request_options) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::TaskUpdateResponse') end # Get the authentication of the given authenticationID. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param authentication_id [String] The authentication UUID. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def get_authentication_with_http_info(authentication_id, request_options = {}) # verify the required parameter 'authentication_id' is set if @api_client.config.client_side_validation && authentication_id.nil? raise ArgumentError, "Parameter `authentication_id` is required when calling `get_authentication`." end path = '/1/authentications/{authenticationID}'.sub('{' + 'authenticationID' + '}', Transport.encode_uri(authentication_id.to_s)) query_params = {} query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil? header_params = {} header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil? post_body = request_options[:debug_body] new_options = request_options.merge( :operation => :'IngestionClient.get_authentication', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:GET, path, new_options) end # Get the authentication of the given authenticationID. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param authentication_id [String] The authentication UUID. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Authentication] def get_authentication(authentication_id, request_options = {}) response = get_authentication_with_http_info(authentication_id, request_options) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::Authentication') end # Get a list of authentications for the given query parameters, with pagination details. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param items_per_page [Integer] The number of items per page to return. # @param page [Integer] The page number to fetch, starting at 1. # @param type [Array] The type of the authentications to retrieve. # @param platform [Array] The platform of the authentications to retrieve. # @param sort [AuthenticationSortKeys] The key by which the list should be sorted. # @param order [OrderKeys] The order of the returned list. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def get_authentications_with_http_info(items_per_page = nil, page = nil, type = nil, platform = nil, sort = nil, order = nil, request_options = {}) path = '/1/authentications' query_params = {} query_params[:itemsPerPage] = items_per_page unless items_per_page.nil? query_params[:page] = page unless page.nil? query_params[:type] = @api_client.build_collection_param(type, :csv) unless type.nil? query_params[:platform] = @api_client.build_collection_param(platform, :csv) unless platform.nil? query_params[:sort] = sort unless sort.nil? query_params[:order] = order unless order.nil? query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil? header_params = {} header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil? post_body = request_options[:debug_body] new_options = request_options.merge( :operation => :'IngestionClient.get_authentications', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:GET, path, new_options) end # Get a list of authentications for the given query parameters, with pagination details. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param items_per_page [Integer] The number of items per page to return. # @param page [Integer] The page number to fetch, starting at 1. # @param type [Array] The type of the authentications to retrieve. # @param platform [Array] The platform of the authentications to retrieve. # @param sort [AuthenticationSortKeys] The key by which the list should be sorted. # @param order [OrderKeys] The order of the returned list. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [ListAuthenticationsResponse] def get_authentications(items_per_page = nil, page = nil, type = nil, platform = nil, sort = nil, order = nil, request_options = {}) response = get_authentications_with_http_info(items_per_page, page, type, platform, sort, order, request_options) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::ListAuthenticationsResponse') end # Get the destination of the given destinationID. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param destination_id [String] The destination UUID. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def get_destination_with_http_info(destination_id, request_options = {}) # verify the required parameter 'destination_id' is set if @api_client.config.client_side_validation && destination_id.nil? raise ArgumentError, "Parameter `destination_id` is required when calling `get_destination`." end path = '/1/destinations/{destinationID}'.sub('{' + 'destinationID' + '}', Transport.encode_uri(destination_id.to_s)) query_params = {} query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil? header_params = {} header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil? post_body = request_options[:debug_body] new_options = request_options.merge( :operation => :'IngestionClient.get_destination', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:GET, path, new_options) end # Get the destination of the given destinationID. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param destination_id [String] The destination UUID. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Destination] def get_destination(destination_id, request_options = {}) response = get_destination_with_http_info(destination_id, request_options) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::Destination') end # Get a list of destinations for the given query parameters, with pagination details. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param items_per_page [Integer] The number of items per page to return. # @param page [Integer] The page number to fetch, starting at 1. # @param type [Array] The type of the destinations to retrive. # @param authentication_id [Array] The authenticationIDs of the destinations to retrive. # @param sort [DestinationSortKeys] The key by which the list should be sorted. # @param order [OrderKeys] The order of the returned list. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def get_destinations_with_http_info(items_per_page = nil, page = nil, type = nil, authentication_id = nil, sort = nil, order = nil, request_options = {}) path = '/1/destinations' query_params = {} query_params[:itemsPerPage] = items_per_page unless items_per_page.nil? query_params[:page] = page unless page.nil? query_params[:type] = @api_client.build_collection_param(type, :csv) unless type.nil? query_params[:authenticationID] = @api_client.build_collection_param(authentication_id, :csv) unless authentication_id.nil? query_params[:sort] = sort unless sort.nil? query_params[:order] = order unless order.nil? query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil? header_params = {} header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil? post_body = request_options[:debug_body] new_options = request_options.merge( :operation => :'IngestionClient.get_destinations', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:GET, path, new_options) end # Get a list of destinations for the given query parameters, with pagination details. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param items_per_page [Integer] The number of items per page to return. # @param page [Integer] The page number to fetch, starting at 1. # @param type [Array] The type of the destinations to retrive. # @param authentication_id [Array] The authenticationIDs of the destinations to retrive. # @param sort [DestinationSortKeys] The key by which the list should be sorted. # @param order [OrderKeys] The order of the returned list. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [ListDestinationsResponse] def get_destinations(items_per_page = nil, page = nil, type = nil, authentication_id = nil, sort = nil, order = nil, request_options = {}) response = get_destinations_with_http_info(items_per_page, page, type, authentication_id, sort, order, request_options) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::ListDestinationsResponse') end # Retrieve a stream listing for a given Singer specification compatible docker type source ID. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param source_id [String] The source UUID. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def get_docker_source_streams_with_http_info(source_id, request_options = {}) # verify the required parameter 'source_id' is set if @api_client.config.client_side_validation && source_id.nil? raise ArgumentError, "Parameter `source_id` is required when calling `get_docker_source_streams`." end path = '/1/sources/{sourceID}/discover'.sub('{' + 'sourceID' + '}', Transport.encode_uri(source_id.to_s)) query_params = {} query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil? header_params = {} header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil? post_body = request_options[:debug_body] new_options = request_options.merge( :operation => :'IngestionClient.get_docker_source_streams', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:GET, path, new_options) end # Retrieve a stream listing for a given Singer specification compatible docker type source ID. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param source_id [String] The source UUID. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [DockerSourceStreams] def get_docker_source_streams(source_id, request_options = {}) response = get_docker_source_streams_with_http_info(source_id, request_options) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::DockerSourceStreams') end # Get a single event for a specific runID. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param run_id [String] The run UUID. (required) # @param event_id [String] The event UUID. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def get_event_with_http_info(run_id, event_id, request_options = {}) # verify the required parameter 'run_id' is set if @api_client.config.client_side_validation && run_id.nil? raise ArgumentError, "Parameter `run_id` is required when calling `get_event`." end # verify the required parameter 'event_id' is set if @api_client.config.client_side_validation && event_id.nil? raise ArgumentError, "Parameter `event_id` is required when calling `get_event`." end path = '/1/runs/{runID}/events/{eventID}'.sub('{' + 'runID' + '}', Transport.encode_uri(run_id.to_s)).sub('{' + 'eventID' + '}', Transport.encode_uri(event_id.to_s)) query_params = {} query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil? header_params = {} header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil? post_body = request_options[:debug_body] new_options = request_options.merge( :operation => :'IngestionClient.get_event', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:GET, path, new_options) end # Get a single event for a specific runID. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param run_id [String] The run UUID. (required) # @param event_id [String] The event UUID. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Event] def get_event(run_id, event_id, request_options = {}) response = get_event_with_http_info(run_id, event_id, request_options) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::Event') end # Get a list of events associated to the given runID, for the given query parameters. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param run_id [String] The run UUID. (required) # @param items_per_page [Integer] The number of items per page to return. # @param page [Integer] The page number to fetch, starting at 1. # @param status [Array] Filter the status of the events. # @param type [Array] Filter the type of the events. # @param sort [EventSortKeys] The key by which the list should be sorted. # @param order [OrderKeys] The order of the returned list. # @param start_date [String] The start date (in RFC3339 format) of the events fetching window. Defaults to 'now'-3 hours if omitted. # @param end_date [String] The end date (in RFC3339 format) of the events fetching window. Defaults to 'now' days if omitted. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def get_events_with_http_info(run_id, items_per_page = nil, page = nil, status = nil, type = nil, sort = nil, order = nil, start_date = nil, end_date = nil, request_options = {}) # verify the required parameter 'run_id' is set if @api_client.config.client_side_validation && run_id.nil? raise ArgumentError, "Parameter `run_id` is required when calling `get_events`." end path = '/1/runs/{runID}/events'.sub('{' + 'runID' + '}', Transport.encode_uri(run_id.to_s)) query_params = {} query_params[:itemsPerPage] = items_per_page unless items_per_page.nil? query_params[:page] = page unless page.nil? query_params[:status] = @api_client.build_collection_param(status, :multi) unless status.nil? query_params[:type] = @api_client.build_collection_param(type, :multi) unless type.nil? query_params[:sort] = sort unless sort.nil? query_params[:order] = order unless order.nil? query_params[:startDate] = start_date unless start_date.nil? query_params[:endDate] = end_date unless end_date.nil? query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil? header_params = {} header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil? post_body = request_options[:debug_body] new_options = request_options.merge( :operation => :'IngestionClient.get_events', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:GET, path, new_options) end # Get a list of events associated to the given runID, for the given query parameters. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param run_id [String] The run UUID. (required) # @param items_per_page [Integer] The number of items per page to return. # @param page [Integer] The page number to fetch, starting at 1. # @param status [Array] Filter the status of the events. # @param type [Array] Filter the type of the events. # @param sort [EventSortKeys] The key by which the list should be sorted. # @param order [OrderKeys] The order of the returned list. # @param start_date [String] The start date (in RFC3339 format) of the events fetching window. Defaults to 'now'-3 hours if omitted. # @param end_date [String] The end date (in RFC3339 format) of the events fetching window. Defaults to 'now' days if omitted. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [ListEventsResponse] def get_events(run_id, items_per_page = nil, page = nil, status = nil, type = nil, sort = nil, order = nil, start_date = nil, end_date = nil, request_options = {}) response = get_events_with_http_info(run_id, items_per_page, page, status, type, sort, order, start_date, end_date, request_options) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::ListEventsResponse') end # Get a single run for the given ID. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param run_id [String] The run UUID. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def get_run_with_http_info(run_id, request_options = {}) # verify the required parameter 'run_id' is set if @api_client.config.client_side_validation && run_id.nil? raise ArgumentError, "Parameter `run_id` is required when calling `get_run`." end path = '/1/runs/{runID}'.sub('{' + 'runID' + '}', Transport.encode_uri(run_id.to_s)) query_params = {} query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil? header_params = {} header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil? post_body = request_options[:debug_body] new_options = request_options.merge( :operation => :'IngestionClient.get_run', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:GET, path, new_options) end # Get a single run for the given ID. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param run_id [String] The run UUID. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Run] def get_run(run_id, request_options = {}) response = get_run_with_http_info(run_id, request_options) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::Run') end # Get a list of runs for the given query parameters, with pagination details. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param items_per_page [Integer] The number of items per page to return. # @param page [Integer] The page number to fetch, starting at 1. # @param status [Array] Filter the status of the runs. # @param task_id [String] Filter by taskID. # @param sort [RunSortKeys] The key by which the list should be sorted. # @param order [OrderKeys] The order of the returned list. # @param start_date [String] The start date (in RFC3339 format) of the runs fetching window. Defaults to 'now'-7 days if omitted. # @param end_date [String] The end date (in RFC3339 format) of the runs fetching window. Defaults to 'now' days if omitted. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def get_runs_with_http_info(items_per_page = nil, page = nil, status = nil, task_id = nil, sort = nil, order = nil, start_date = nil, end_date = nil, request_options = {}) path = '/1/runs' query_params = {} query_params[:itemsPerPage] = items_per_page unless items_per_page.nil? query_params[:page] = page unless page.nil? query_params[:status] = @api_client.build_collection_param(status, :multi) unless status.nil? query_params[:taskID] = task_id unless task_id.nil? query_params[:sort] = sort unless sort.nil? query_params[:order] = order unless order.nil? query_params[:startDate] = start_date unless start_date.nil? query_params[:endDate] = end_date unless end_date.nil? query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil? header_params = {} header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil? post_body = request_options[:debug_body] new_options = request_options.merge( :operation => :'IngestionClient.get_runs', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:GET, path, new_options) end # Get a list of runs for the given query parameters, with pagination details. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param items_per_page [Integer] The number of items per page to return. # @param page [Integer] The page number to fetch, starting at 1. # @param status [Array] Filter the status of the runs. # @param task_id [String] Filter by taskID. # @param sort [RunSortKeys] The key by which the list should be sorted. # @param order [OrderKeys] The order of the returned list. # @param start_date [String] The start date (in RFC3339 format) of the runs fetching window. Defaults to 'now'-7 days if omitted. # @param end_date [String] The end date (in RFC3339 format) of the runs fetching window. Defaults to 'now' days if omitted. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [RunListResponse] def get_runs(items_per_page = nil, page = nil, status = nil, task_id = nil, sort = nil, order = nil, start_date = nil, end_date = nil, request_options = {}) response = get_runs_with_http_info(items_per_page, page, status, task_id, sort, order, start_date, end_date, request_options) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::RunListResponse') end # Get the source of the given sourceID. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param source_id [String] The source UUID. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def get_source_with_http_info(source_id, request_options = {}) # verify the required parameter 'source_id' is set if @api_client.config.client_side_validation && source_id.nil? raise ArgumentError, "Parameter `source_id` is required when calling `get_source`." end path = '/1/sources/{sourceID}'.sub('{' + 'sourceID' + '}', Transport.encode_uri(source_id.to_s)) query_params = {} query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil? header_params = {} header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil? post_body = request_options[:debug_body] new_options = request_options.merge( :operation => :'IngestionClient.get_source', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:GET, path, new_options) end # Get the source of the given sourceID. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param source_id [String] The source UUID. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Source] def get_source(source_id, request_options = {}) response = get_source_with_http_info(source_id, request_options) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::Source') end # Get a list of sources for the given query parameters, with pagination details. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param items_per_page [Integer] The number of items per page to return. # @param page [Integer] The page number to fetch, starting at 1. # @param type [Array] The type of the sources to retrieve. # @param authentication_id [Array] The authenticationIDs of the sources to retrieve. 'none' returns sources that doesn't have an authentication. # @param sort [SourceSortKeys] The key by which the list should be sorted. # @param order [OrderKeys] The order of the returned list. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def get_sources_with_http_info(items_per_page = nil, page = nil, type = nil, authentication_id = nil, sort = nil, order = nil, request_options = {}) path = '/1/sources' query_params = {} query_params[:itemsPerPage] = items_per_page unless items_per_page.nil? query_params[:page] = page unless page.nil? query_params[:type] = @api_client.build_collection_param(type, :csv) unless type.nil? query_params[:authenticationID] = @api_client.build_collection_param(authentication_id, :csv) unless authentication_id.nil? query_params[:sort] = sort unless sort.nil? query_params[:order] = order unless order.nil? query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil? header_params = {} header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil? post_body = request_options[:debug_body] new_options = request_options.merge( :operation => :'IngestionClient.get_sources', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:GET, path, new_options) end # Get a list of sources for the given query parameters, with pagination details. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param items_per_page [Integer] The number of items per page to return. # @param page [Integer] The page number to fetch, starting at 1. # @param type [Array] The type of the sources to retrieve. # @param authentication_id [Array] The authenticationIDs of the sources to retrieve. 'none' returns sources that doesn't have an authentication. # @param sort [SourceSortKeys] The key by which the list should be sorted. # @param order [OrderKeys] The order of the returned list. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [ListSourcesResponse] def get_sources(items_per_page = nil, page = nil, type = nil, authentication_id = nil, sort = nil, order = nil, request_options = {}) response = get_sources_with_http_info(items_per_page, page, type, authentication_id, sort, order, request_options) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::ListSourcesResponse') end # Get the task of the given taskID. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param task_id [String] The task UUID. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def get_task_with_http_info(task_id, request_options = {}) # verify the required parameter 'task_id' is set if @api_client.config.client_side_validation && task_id.nil? raise ArgumentError, "Parameter `task_id` is required when calling `get_task`." end path = '/1/tasks/{taskID}'.sub('{' + 'taskID' + '}', Transport.encode_uri(task_id.to_s)) query_params = {} query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil? header_params = {} header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil? post_body = request_options[:debug_body] new_options = request_options.merge( :operation => :'IngestionClient.get_task', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:GET, path, new_options) end # Get the task of the given taskID. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param task_id [String] The task UUID. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Task] def get_task(task_id, request_options = {}) response = get_task_with_http_info(task_id, request_options) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::Task') end # Get a list of tasks for the given query parameters, with pagination details. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param items_per_page [Integer] The number of items per page to return. # @param page [Integer] The page number to fetch, starting at 1. # @param action [Array] The action of the tasks to retrieve. # @param enabled [Boolean] Whether the task is enabled or not. # @param source_id [Array] The sourceIDs of the tasks to retrive. # @param destination_id [Array] The destinationIDs of the tasks to retrive. # @param trigger_type [Array] The trigger type of the task. # @param sort [TaskSortKeys] The key by which the list should be sorted. # @param order [OrderKeys] The order of the returned list. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def get_tasks_with_http_info(items_per_page = nil, page = nil, action = nil, enabled = nil, source_id = nil, destination_id = nil, trigger_type = nil, sort = nil, order = nil, request_options = {}) path = '/1/tasks' query_params = {} query_params[:itemsPerPage] = items_per_page unless items_per_page.nil? query_params[:page] = page unless page.nil? query_params[:action] = @api_client.build_collection_param(action, :csv) unless action.nil? query_params[:enabled] = enabled unless enabled.nil? query_params[:sourceID] = @api_client.build_collection_param(source_id, :csv) unless source_id.nil? query_params[:destinationID] = @api_client.build_collection_param(destination_id, :csv) unless destination_id.nil? query_params[:triggerType] = @api_client.build_collection_param(trigger_type, :csv) unless trigger_type.nil? query_params[:sort] = sort unless sort.nil? query_params[:order] = order unless order.nil? query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil? header_params = {} header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil? post_body = request_options[:debug_body] new_options = request_options.merge( :operation => :'IngestionClient.get_tasks', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:GET, path, new_options) end # Get a list of tasks for the given query parameters, with pagination details. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param items_per_page [Integer] The number of items per page to return. # @param page [Integer] The page number to fetch, starting at 1. # @param action [Array] The action of the tasks to retrieve. # @param enabled [Boolean] Whether the task is enabled or not. # @param source_id [Array] The sourceIDs of the tasks to retrive. # @param destination_id [Array] The destinationIDs of the tasks to retrive. # @param trigger_type [Array] The trigger type of the task. # @param sort [TaskSortKeys] The key by which the list should be sorted. # @param order [OrderKeys] The order of the returned list. # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [ListTasksResponse] def get_tasks(items_per_page = nil, page = nil, action = nil, enabled = nil, source_id = nil, destination_id = nil, trigger_type = nil, sort = nil, order = nil, request_options = {}) response = get_tasks_with_http_info(items_per_page, page, action, enabled, source_id, destination_id, trigger_type, sort, order, request_options) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::ListTasksResponse') end # Run the task of the given taskID. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param task_id [String] The task UUID. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def run_task_with_http_info(task_id, request_options = {}) # verify the required parameter 'task_id' is set if @api_client.config.client_side_validation && task_id.nil? raise ArgumentError, "Parameter `task_id` is required when calling `run_task`." end path = '/1/tasks/{taskID}/run'.sub('{' + 'taskID' + '}', Transport.encode_uri(task_id.to_s)) query_params = {} query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil? header_params = {} header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil? post_body = request_options[:debug_body] new_options = request_options.merge( :operation => :'IngestionClient.run_task', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:POST, path, new_options) end # Run the task of the given taskID. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param task_id [String] The task UUID. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [RunResponse] def run_task(task_id, request_options = {}) response = run_task_with_http_info(task_id, request_options) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::RunResponse') end # Search among authentications with a defined set of parameters. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param authentication_search [AuthenticationSearch] (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def search_authentications_with_http_info(authentication_search, request_options = {}) # verify the required parameter 'authentication_search' is set if @api_client.config.client_side_validation && authentication_search.nil? raise ArgumentError, "Parameter `authentication_search` is required when calling `search_authentications`." end path = '/1/authentications/search' query_params = {} query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil? header_params = {} header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil? post_body = request_options[:debug_body] || @api_client.object_to_http_body(authentication_search) new_options = request_options.merge( :operation => :'IngestionClient.search_authentications', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:POST, path, new_options) end # Search among authentications with a defined set of parameters. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param authentication_search [AuthenticationSearch] (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Array] def search_authentications(authentication_search, request_options = {}) response = search_authentications_with_http_info(authentication_search, request_options) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Array') end # Search among destinations with a defined set of parameters. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param destination_search [DestinationSearch] (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def search_destinations_with_http_info(destination_search, request_options = {}) # verify the required parameter 'destination_search' is set if @api_client.config.client_side_validation && destination_search.nil? raise ArgumentError, "Parameter `destination_search` is required when calling `search_destinations`." end path = '/1/destinations/search' query_params = {} query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil? header_params = {} header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil? post_body = request_options[:debug_body] || @api_client.object_to_http_body(destination_search) new_options = request_options.merge( :operation => :'IngestionClient.search_destinations', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:POST, path, new_options) end # Search among destinations with a defined set of parameters. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param destination_search [DestinationSearch] (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Array] def search_destinations(destination_search, request_options = {}) response = search_destinations_with_http_info(destination_search, request_options) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Array') end # Search among sources with a defined set of parameters. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param source_search [SourceSearch] (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def search_sources_with_http_info(source_search, request_options = {}) # verify the required parameter 'source_search' is set if @api_client.config.client_side_validation && source_search.nil? raise ArgumentError, "Parameter `source_search` is required when calling `search_sources`." end path = '/1/sources/search' query_params = {} query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil? header_params = {} header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil? post_body = request_options[:debug_body] || @api_client.object_to_http_body(source_search) new_options = request_options.merge( :operation => :'IngestionClient.search_sources', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:POST, path, new_options) end # Search among sources with a defined set of parameters. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param source_search [SourceSearch] (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Array] def search_sources(source_search, request_options = {}) response = search_sources_with_http_info(source_search, request_options) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Array') end # Search among tasks with a defined set of parameters. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param task_search [TaskSearch] (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def search_tasks_with_http_info(task_search, request_options = {}) # verify the required parameter 'task_search' is set if @api_client.config.client_side_validation && task_search.nil? raise ArgumentError, "Parameter `task_search` is required when calling `search_tasks`." end path = '/1/tasks/search' query_params = {} query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil? header_params = {} header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil? post_body = request_options[:debug_body] || @api_client.object_to_http_body(task_search) new_options = request_options.merge( :operation => :'IngestionClient.search_tasks', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:POST, path, new_options) end # Search among tasks with a defined set of parameters. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param task_search [TaskSearch] (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Array] def search_tasks(task_search, request_options = {}) response = search_tasks_with_http_info(task_search, request_options) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Array') end # Trigger a stream listing request for a Singer specification compatible docker type source. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param source_id [String] The source UUID. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def trigger_docker_source_discover_with_http_info(source_id, request_options = {}) # verify the required parameter 'source_id' is set if @api_client.config.client_side_validation && source_id.nil? raise ArgumentError, "Parameter `source_id` is required when calling `trigger_docker_source_discover`." end path = '/1/sources/{sourceID}/discover'.sub('{' + 'sourceID' + '}', Transport.encode_uri(source_id.to_s)) query_params = {} query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil? header_params = {} header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil? post_body = request_options[:debug_body] new_options = request_options.merge( :operation => :'IngestionClient.trigger_docker_source_discover', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:POST, path, new_options) end # Trigger a stream listing request for a Singer specification compatible docker type source. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param source_id [String] The source UUID. (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [DockerSourceDiscover] def trigger_docker_source_discover(source_id, request_options = {}) response = trigger_docker_source_discover_with_http_info(source_id, request_options) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::DockerSourceDiscover') end # Update the authentication of the given authenticationID. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param authentication_id [String] The authentication UUID. (required) # @param authentication_update [AuthenticationUpdate] (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def update_authentication_with_http_info(authentication_id, authentication_update, request_options = {}) # verify the required parameter 'authentication_id' is set if @api_client.config.client_side_validation && authentication_id.nil? raise ArgumentError, "Parameter `authentication_id` is required when calling `update_authentication`." end # verify the required parameter 'authentication_update' is set if @api_client.config.client_side_validation && authentication_update.nil? raise ArgumentError, "Parameter `authentication_update` is required when calling `update_authentication`." end path = '/1/authentications/{authenticationID}'.sub('{' + 'authenticationID' + '}', Transport.encode_uri(authentication_id.to_s)) query_params = {} query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil? header_params = {} header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil? post_body = request_options[:debug_body] || @api_client.object_to_http_body(authentication_update) new_options = request_options.merge( :operation => :'IngestionClient.update_authentication', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:PATCH, path, new_options) end # Update the authentication of the given authenticationID. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param authentication_id [String] The authentication UUID. (required) # @param authentication_update [AuthenticationUpdate] (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [AuthenticationUpdateResponse] def update_authentication(authentication_id, authentication_update, request_options = {}) response = update_authentication_with_http_info(authentication_id, authentication_update, request_options) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::AuthenticationUpdateResponse') end # Update the destination of the given destinationID. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param destination_id [String] The destination UUID. (required) # @param destination_update [DestinationUpdate] (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def update_destination_with_http_info(destination_id, destination_update, request_options = {}) # verify the required parameter 'destination_id' is set if @api_client.config.client_side_validation && destination_id.nil? raise ArgumentError, "Parameter `destination_id` is required when calling `update_destination`." end # verify the required parameter 'destination_update' is set if @api_client.config.client_side_validation && destination_update.nil? raise ArgumentError, "Parameter `destination_update` is required when calling `update_destination`." end path = '/1/destinations/{destinationID}'.sub('{' + 'destinationID' + '}', Transport.encode_uri(destination_id.to_s)) query_params = {} query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil? header_params = {} header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil? post_body = request_options[:debug_body] || @api_client.object_to_http_body(destination_update) new_options = request_options.merge( :operation => :'IngestionClient.update_destination', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:PATCH, path, new_options) end # Update the destination of the given destinationID. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param destination_id [String] The destination UUID. (required) # @param destination_update [DestinationUpdate] (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [DestinationUpdateResponse] def update_destination(destination_id, destination_update, request_options = {}) response = update_destination_with_http_info(destination_id, destination_update, request_options) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::DestinationUpdateResponse') end # Update the source of the given sourceID. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param source_id [String] The source UUID. (required) # @param source_update [SourceUpdate] (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def update_source_with_http_info(source_id, source_update, request_options = {}) # verify the required parameter 'source_id' is set if @api_client.config.client_side_validation && source_id.nil? raise ArgumentError, "Parameter `source_id` is required when calling `update_source`." end # verify the required parameter 'source_update' is set if @api_client.config.client_side_validation && source_update.nil? raise ArgumentError, "Parameter `source_update` is required when calling `update_source`." end path = '/1/sources/{sourceID}'.sub('{' + 'sourceID' + '}', Transport.encode_uri(source_id.to_s)) query_params = {} query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil? header_params = {} header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil? post_body = request_options[:debug_body] || @api_client.object_to_http_body(source_update) new_options = request_options.merge( :operation => :'IngestionClient.update_source', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:PATCH, path, new_options) end # Update the source of the given sourceID. # # Required API Key ACLs: # - addObject # - deleteIndex # - editSettings # @param source_id [String] The source UUID. (required) # @param source_update [SourceUpdate] (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [SourceUpdateResponse] def update_source(source_id, source_update, request_options = {}) response = update_source_with_http_info(source_id, source_update, request_options) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::SourceUpdateResponse') end # Update the task of the given taskID. # @param task_id [String] The task UUID. (required) # @param task_update [TaskUpdate] (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [Http::Response] the response def update_task_with_http_info(task_id, task_update, request_options = {}) # verify the required parameter 'task_id' is set if @api_client.config.client_side_validation && task_id.nil? raise ArgumentError, "Parameter `task_id` is required when calling `update_task`." end # verify the required parameter 'task_update' is set if @api_client.config.client_side_validation && task_update.nil? raise ArgumentError, "Parameter `task_update` is required when calling `update_task`." end path = '/1/tasks/{taskID}'.sub('{' + 'taskID' + '}', Transport.encode_uri(task_id.to_s)) query_params = {} query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil? header_params = {} header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil? post_body = request_options[:debug_body] || @api_client.object_to_http_body(task_update) new_options = request_options.merge( :operation => :'IngestionClient.update_task', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:PATCH, path, new_options) end # Update the task of the given taskID. # @param task_id [String] The task UUID. (required) # @param task_update [TaskUpdate] (required) # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) # @return [TaskUpdateResponse] def update_task(task_id, task_update, request_options = {}) response = update_task_with_http_info(task_id, task_update, request_options) @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::TaskUpdateResponse') end end end