lib/datadog_api_client/v1/api/service_level_objectives_api.rb
# Get all SLOs
# Get a list of service level objective objects for your organization.
# @param opts [Hash] the optional parameters
# @option opts [String] :ids A comma separated list of the IDs of the service level objectives objects.
# @option opts [String] :query The query string to filter results based on SLO names.
# @option opts [String] :tags_query The query string to filter results based on a single SLO tag.
# @option opts [String] :metrics_query The query string to filter results based on SLO numerator and denominator.
# @option opts [Integer] :limit The number of SLOs to return in the response.
# @option opts [Integer] :offset The specific offset to use as the beginning of the returned response.
# @return [Array<(SLOListResponse, Integer, Hash)>] SLOListResponse data, response status code and response headers
Get all SLOs
Get a list of service level objective objects for your organization.
Get all SLOs Get a list of service level objective objects for your organization .
def list_sl_os_with_http_info(opts = {})
      if @api_client.config.unstable_operations.has_key?(:list_sl_os)
        unstable_enabled = @api_client.config.unstable_operations[:list_sl_os]
        if unstable_enabled
          @api_client.config.logger.warn format("Using unstable operation '%s'", "list_sl_os")
        else
          raise APIError.new(message: format("Unstable operation '%s' is disabled", "list_sl_os"))
        end
      end
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: ServiceLevelObjectivesAPI.list_sl_os ...'
      end
      local_var_path = '/api/v1/slo'
      query_params = opts[:query_params] || {}
      query_params[:'ids'] = opts[:'ids'] if !opts[:'ids'].nil?
      query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
      query_params[:'tags_query'] = opts[:'tags_query'] if !opts[:'tags_query'].nil?
      query_params[:'metrics_query'] = opts[:'metrics_query'] if !opts[:'metrics_query'].nil?
      query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
      query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
      header_params = opts[:header_params] || {}
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      form_params = opts[:form_params] || {}
      post_body = opts[:debug_body]
      return_type = opts[:debug_return_type] || 'SLOListResponse'
      auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
      new_options = opts.merge(
        :operation => :list_sl_os,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )
      data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ServiceLevelObjectivesAPI#list_sl_os\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
def list_sl_os_with_http_info ( opts = { } ) if @api_client . config . unstable_operations . has_key? ( :list_sl_os ) unstable_enabled = @api_client . config . unstable_operations [ :list_sl_os ] if unstable_enabled @api_client . config . logger . warn format ( "Using unstable operation '%s'" , "list_sl_os" ) else raise APIError . new ( message : format ( "Unstable operation '%s' is disabled" , "list_sl_os" ) ) end end if @api_client . config . debugging @api_client . config . logger . debug 'Calling API: ServiceLevelObjectivesAPI.list_sl_os ...' end local_var_path = '/api/v1/slo' query_params = opts [ :query_params ] || { } query_params [ :' ids ' ] = opts [ :' ids ' ] if ! opts [ :' ids ' ] . nil? query_params [ :' query ' ] = opts [ :' query ' ] if ! opts [ :' query ' ] . nil? query_params [ :' tags_query ' ] = opts [ :' tags_query ' ] if ! opts [ :' tags_query ' ] . nil? query_params [ :' metrics_query ' ] = opts [ :' metrics_query ' ] if ! opts [ :' metrics_query ' ] . nil? query_params [ :' limit ' ] = opts [ :' limit ' ] if ! opts [ :' limit ' ] . nil? query_params [ :' offset ' ] = opts [ :' offset ' ] if ! opts [ :' offset ' ] . nil? header_params = opts [ :header_params ] || { } header_params [ 'Accept' ] = @api_client . select_header_accept ( [ 'application/json' ] ) form_params = opts [ :form_params ] || { } post_body = opts [ :debug_body ] return_type = opts [ :debug_return_type ] || 'SLOListResponse' auth_names = opts [ :debug_auth_names ] || [ :apiKeyAuth , :appKeyAuth , :AuthZ ] new_options = opts . merge ( :operation => :list_sl_os , :header_params => header_params , :query_params => query_params , :form_params => form_params , :body => post_body , :auth_names => auth_names , :return_type => return_type ) data , status_code , headers = @api_client . call_api ( :GET , local_var_path , new_options ) if @api_client . config . debugging @api_client . config . logger . debug "API called: ServiceLevelObjectivesAPI#list_sl_os\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data , status_code , headers end
Get all SLOs
Get a list of service level objective objects for your organization.
Get all SLOs Get a list of service level objective objects for your organization .
# resource path # query parameters # header parameters # HTTP header 'Accept' (if needed) # form parameters # http body (model) # return_type # auth_names
SLOListResponse data, response status code and response headers
SLOListResponse data response status code and response headers
Array<(SLOListResponse, Integer, Hash)>
opts
:offset The specific offset to use as the beginning of the returned response.
: offset The specific offset to use as the beginning of the returned response .