=begin #Sematext Cloud API #API Explorer provides access and documentation for Sematext REST API. The REST API requires the API Key to be sent as part of `Authorization` header. E.g.: `Authorization : apiKey e5f18450-205a-48eb-8589-7d49edaea813`. OpenAPI spec version: v3 Generated by: https://github.com/swagger-api/swagger-codegen.git Swagger Codegen version: 3.0.25 =end module stcloud class TagApiControllerApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # Gets tag names for the given application identifiers appearing in the given time frame. # @param app_ids appIds # @param [Hash] opts the optional parameters # @option opts [Integer] :from from # @option opts [Integer] :to to # @option opts [BOOLEAN] :metrics metrics (default to true) # @option opts [BOOLEAN] :logs logs (default to true) # @option opts [BOOLEAN] :events events (default to false) # @option opts [BOOLEAN] :rum rum (default to true) # @return [TagNamesResponse] def get_tag_names_using_get(app_ids, opts = {}) data, _status_code, _headers = get_tag_names_using_get_with_http_info(app_ids, opts) data end # Gets tag names for the given application identifiers appearing in the given time frame. # @param app_ids appIds # @param [Hash] opts the optional parameters # @option opts [Integer] :from from # @option opts [Integer] :to to # @option opts [BOOLEAN] :metrics metrics # @option opts [BOOLEAN] :logs logs # @option opts [BOOLEAN] :events events # @option opts [BOOLEAN] :rum rum # @return [Array<(TagNamesResponse, Integer, Hash)>] TagNamesResponse data, response status code and response headers def get_tag_names_using_get_with_http_info(app_ids, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TagApiControllerApi.get_tag_names_using_get ...' end # verify the required parameter 'app_ids' is set if @api_client.config.client_side_validation && app_ids.nil? fail ArgumentError, "Missing the required parameter 'app_ids' when calling TagApiControllerApi.get_tag_names_using_get" end # resource path local_var_path = '/spm-reports/api/v3/apps/{appIds}/tagNames'.sub('{' + 'appIds' + '}', app_ids.to_s) # query parameters query_params = opts[:query_params] || {} query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil? query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil? query_params[:'metrics'] = opts[:'metrics'] if !opts[:'metrics'].nil? query_params[:'logs'] = opts[:'logs'] if !opts[:'logs'].nil? query_params[:'events'] = opts[:'events'] if !opts[:'events'].nil? query_params[:'rum'] = opts[:'rum'] if !opts[:'rum'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'TagNamesResponse' auth_names = opts[:auth_names] || ['api_key'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: TagApiControllerApi#get_tag_names_using_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Gets values for specified tags for the given application identifiers appearing in the given time frame. # @param app_ids appIds # @param tag tag # @param [Hash] opts the optional parameters # @option opts [Integer] :from from # @option opts [Integer] :to to # @option opts [BOOLEAN] :metrics metrics (default to true) # @option opts [BOOLEAN] :logs logs (default to true) # @option opts [BOOLEAN] :events events (default to false) # @option opts [BOOLEAN] :rum rum (default to true) # @return [Hash] def get_using_get2(app_ids, tag, opts = {}) data, _status_code, _headers = get_using_get2_with_http_info(app_ids, tag, opts) data end # Gets values for specified tags for the given application identifiers appearing in the given time frame. # @param app_ids appIds # @param tag tag # @param [Hash] opts the optional parameters # @option opts [Integer] :from from # @option opts [Integer] :to to # @option opts [BOOLEAN] :metrics metrics # @option opts [BOOLEAN] :logs logs # @option opts [BOOLEAN] :events events # @option opts [BOOLEAN] :rum rum # @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers def get_using_get2_with_http_info(app_ids, tag, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TagApiControllerApi.get_using_get2 ...' end # verify the required parameter 'app_ids' is set if @api_client.config.client_side_validation && app_ids.nil? fail ArgumentError, "Missing the required parameter 'app_ids' when calling TagApiControllerApi.get_using_get2" end # verify the required parameter 'tag' is set if @api_client.config.client_side_validation && tag.nil? fail ArgumentError, "Missing the required parameter 'tag' when calling TagApiControllerApi.get_using_get2" end # resource path local_var_path = '/spm-reports/api/v3/apps/{appIds}/metrics/filters'.sub('{' + 'appIds' + '}', app_ids.to_s) # query parameters query_params = opts[:query_params] || {} query_params[:'tag'] = @api_client.build_collection_param(tag, :multi) query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil? query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil? query_params[:'metrics'] = opts[:'metrics'] if !opts[:'metrics'].nil? query_params[:'logs'] = opts[:'logs'] if !opts[:'logs'].nil? query_params[:'events'] = opts[:'events'] if !opts[:'events'].nil? query_params[:'rum'] = opts[:'rum'] if !opts[:'rum'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'Hash' auth_names = opts[:auth_names] || ['api_key'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: TagApiControllerApi#get_using_get2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Gets values for specified tags for the given application identifiers appearing in the given time frame. # @param app_ids appIds # @param tag tag # @param [Hash] opts the optional parameters # @option opts [Integer] :from from # @option opts [Integer] :to to # @option opts [BOOLEAN] :metrics metrics (default to true) # @option opts [BOOLEAN] :logs logs (default to true) # @option opts [BOOLEAN] :events events (default to false) # @option opts [BOOLEAN] :rum rum (default to true) # @return [Hash] def get_using_get3(app_ids, tag, opts = {}) data, _status_code, _headers = get_using_get3_with_http_info(app_ids, tag, opts) data end # Gets values for specified tags for the given application identifiers appearing in the given time frame. # @param app_ids appIds # @param tag tag # @param [Hash] opts the optional parameters # @option opts [Integer] :from from # @option opts [Integer] :to to # @option opts [BOOLEAN] :metrics metrics # @option opts [BOOLEAN] :logs logs # @option opts [BOOLEAN] :events events # @option opts [BOOLEAN] :rum rum # @return [Array<(Hash, Integer, Hash)>] Hash data, response status code and response headers def get_using_get3_with_http_info(app_ids, tag, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TagApiControllerApi.get_using_get3 ...' end # verify the required parameter 'app_ids' is set if @api_client.config.client_side_validation && app_ids.nil? fail ArgumentError, "Missing the required parameter 'app_ids' when calling TagApiControllerApi.get_using_get3" end # verify the required parameter 'tag' is set if @api_client.config.client_side_validation && tag.nil? fail ArgumentError, "Missing the required parameter 'tag' when calling TagApiControllerApi.get_using_get3" end # resource path local_var_path = '/spm-reports/api/v3/apps/{appIds}/tags'.sub('{' + 'appIds' + '}', app_ids.to_s) # query parameters query_params = opts[:query_params] || {} query_params[:'tag'] = @api_client.build_collection_param(tag, :multi) query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil? query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil? query_params[:'metrics'] = opts[:'metrics'] if !opts[:'metrics'].nil? query_params[:'logs'] = opts[:'logs'] if !opts[:'logs'].nil? query_params[:'events'] = opts[:'events'] if !opts[:'events'].nil? query_params[:'rum'] = opts[:'rum'] if !opts[:'rum'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'Hash' auth_names = opts[:auth_names] || ['api_key'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: TagApiControllerApi#get_using_get3\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end