=begin #DocuSign Monitor API - v2 #An API for an integrator to access the features of DocuSign Monitor OpenAPI spec version: v2.0 Contact: devcenter@docusign.com Generated by: https://github.com/swagger-api/swagger-codegen.git =end require "uri" module DocuSign_Monitor class GetStreamForDatasetOptions # Starting cursor position attr_accessor :cursor # Max number of results to return attr_accessor :limit def self.default @@default ||= GetStreamForDatasetOptions.new end end class GetWebQueryForDatasetOptions # A JSON list of filters to apply to the underlying dataset attr_accessor :filters # A JSON list of aggregations to apply to the filtered dataset attr_accessor :aggregations # The scope to limit the query by. If omitted, defaults to the QueryScope of the DataSet. DocuSign.API.Lens.Common.QueryScope attr_accessor :query_scope # The AccountId or OrganizationId for this query, which will be double-checked against the User JWT. If QueryScope==AccountId, this is required. If QueryScope==OrganizationId, this is optional. attr_accessor :query_scope_id def self.default @@default ||= GetWebQueryForDatasetOptions.new end end class DataSetApi attr_accessor :api_client def initialize(api_client = DataSetApi.default) @api_client = api_client end # # # @param data_set_name The name of the dataset to stream # @param version The requested API version # @param DocuSign_Monitor::GetStreamForDatasetOptions Options for modifying the behavior of the function. # @return [nil] def get_stream_for_dataset(data_set_name, version, options = DocuSign_Monitor::GetStreamForDatasetOptions.default) get_stream_for_dataset_with_http_info(data_set_name, version, options) return nil end # # # @param data_set_name The name of the dataset to stream # @param version The requested API version # @param DocuSign_Monitor::GetStreamForDatasetOptions Options for modifying the behavior of the function. # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def get_stream_for_dataset_with_http_info(data_set_name, version, options = DocuSign_Monitor::GetStreamForDatasetOptions.default) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DataSetApi.get_stream_for_dataset ..." end # verify the required parameter 'data_set_name' is set fail ArgumentError, "Missing the required parameter 'data_set_name' when calling DataSetApi.get_stream_for_dataset" if data_set_name.nil? # verify the required parameter 'version' is set fail ArgumentError, "Missing the required parameter 'version' when calling DataSetApi.get_stream_for_dataset" if version.nil? # resource path local_var_path = "/api/v{version}/datasets/{dataSetName}/stream".sub('{format}','json').sub('{' + 'dataSetName' + '}', data_set_name.to_s).sub('{' + 'version' + '}', version.to_s) # query parameters query_params = {} query_params[:'cursor'] = options.cursor if !options.cursor.nil? query_params[:'limit'] = options.limit if !options.limit.nil? # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: DataSetApi#get_stream_for_dataset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Supplies secured, processed data for web-based dashboards # # @param data_set_name The name of the dataset to query # @param version The requested API version # @param DocuSign_Monitor::GetWebQueryForDatasetOptions Options for modifying the behavior of the function. # @return [nil] def get_web_query_for_dataset(data_set_name, version, options = DocuSign_Monitor::GetWebQueryForDatasetOptions.default) get_web_query_for_dataset_with_http_info(data_set_name, version, options) return nil end # Supplies secured, processed data for web-based dashboards # # @param data_set_name The name of the dataset to query # @param version The requested API version # @param DocuSign_Monitor::GetWebQueryForDatasetOptions Options for modifying the behavior of the function. # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def get_web_query_for_dataset_with_http_info(data_set_name, version, options = DocuSign_Monitor::GetWebQueryForDatasetOptions.default) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DataSetApi.get_web_query_for_dataset ..." end # verify the required parameter 'data_set_name' is set fail ArgumentError, "Missing the required parameter 'data_set_name' when calling DataSetApi.get_web_query_for_dataset" if data_set_name.nil? # verify the required parameter 'version' is set fail ArgumentError, "Missing the required parameter 'version' when calling DataSetApi.get_web_query_for_dataset" if version.nil? if options.query_scope && !['AccountId', 'OrganizationId', 'None'].include?(options.query_scope) fail ArgumentError, 'invalid value for "query_scope", must be one of AccountId, OrganizationId, None' end # resource path local_var_path = "/api/v{version}/datasets/{dataSetName}/web_query".sub('{format}','json').sub('{' + 'dataSetName' + '}', data_set_name.to_s).sub('{' + 'version' + '}', version.to_s) # query parameters query_params = {} query_params[:'filters'] = options.filters if !options.filters.nil? query_params[:'aggregations'] = options.aggregations if !options.aggregations.nil? query_params[:'queryScope'] = options.query_scope if !options.query_scope.nil? query_params[:'queryScopeId'] = options.query_scope_id if !options.query_scope_id.nil? # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: DataSetApi#get_web_query_for_dataset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Provides a raw kusto query capability to internal Docusign services # # @param data_set_name The name of the dataset to query # @param version The requested API version # @param raw_request The request body DocuSign.API.Lens.Common.RawRequest (optional parameter) # @return [nil] def post_raw_for_dataset(data_set_name, version, raw_request) post_raw_for_dataset_with_http_info(data_set_name, version, raw_request) return nil end # Provides a raw kusto query capability to internal Docusign services # # @param data_set_name The name of the dataset to query # @param version The requested API version # @param raw_request The request body DocuSign.API.Lens.Common.RawRequest (optional parameter) # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def post_raw_for_dataset_with_http_info(data_set_name, version, raw_request) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DataSetApi.post_raw_for_dataset ..." end # verify the required parameter 'data_set_name' is set fail ArgumentError, "Missing the required parameter 'data_set_name' when calling DataSetApi.post_raw_for_dataset" if data_set_name.nil? # verify the required parameter 'version' is set fail ArgumentError, "Missing the required parameter 'version' when calling DataSetApi.post_raw_for_dataset" if version.nil? # resource path local_var_path = "/api/v{version}/datasets/{dataSetName}/raw".sub('{format}','json').sub('{' + 'dataSetName' + '}', data_set_name.to_s).sub('{' + 'version' + '}', version.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(raw_request) auth_names = [] 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: DataSetApi#post_raw_for_dataset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # # @param data_set_name # @param version The requested API version # @param web_query (optional parameter) # @return [nil] def post_web_query_for_dataset(data_set_name, version, web_query) post_web_query_for_dataset_with_http_info(data_set_name, version, web_query) return nil end # # # @param data_set_name # @param version The requested API version # @param web_query (optional parameter) # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def post_web_query_for_dataset_with_http_info(data_set_name, version, web_query) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DataSetApi.post_web_query_for_dataset ..." end # verify the required parameter 'data_set_name' is set fail ArgumentError, "Missing the required parameter 'data_set_name' when calling DataSetApi.post_web_query_for_dataset" if data_set_name.nil? # verify the required parameter 'version' is set fail ArgumentError, "Missing the required parameter 'version' when calling DataSetApi.post_web_query_for_dataset" if version.nil? # resource path local_var_path = "/api/v{version}/datasets/{dataSetName}/web_query".sub('{format}','json').sub('{' + 'dataSetName' + '}', data_set_name.to_s).sub('{' + 'version' + '}', version.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(web_query) auth_names = [] 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: DataSetApi#post_web_query_for_dataset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end