class Wavefront::Usage

View and manage Wavefront usage.

Ingestion policy shares this API path, but has its own SDK class.

Public Instance Methods

export_csv(t_start, t_end = nil) click to toggle source

GET /api/v2/usage/exportcsv Export a CSV report

@param t_start [Integer] start time in epoch seconds @param t_end [Integer] end time in epoch seconds, nil being “now”. @return [Wavefront::Response]

# File lib/wavefront-sdk/usage.rb, line 19
def export_csv(t_start, t_end = nil)
  wf_epoch?(t_start)
  args = { startTime: t_start }

  if t_end
    wf_epoch?(t_end)
    args[:endTime] = t_end
  end

  api.get('exportcsv', args)
end