class ForemanApi::Resources::Report

Public Class Methods

doc() click to toggle source
# File lib/foreman_api/resources/report.rb, line 4
def self.doc
  @doc ||= ForemanApi.doc['resources']["reports"]
end

Public Instance Methods

create(params = {}, headers = {}) click to toggle source

@param [Hash] params a hash of params to be passed to the service @option params [Hash] report

allowed keys are:
* host [String]  hostname or certname 
* logs [Array]  optional array of log hashes 
* metrics [Hash]  hash of report metrics, can be just {} 
* reported_at [String]  utc time of report 
* status [Hash]  hash of status type totals

@param [Hash] headers additional http headers @return [Array] First item: parsed data; second item: raw body

# File lib/foreman_api/resources/report.rb, line 59
def create(params = {}, headers = {})
  perform_call(__method__, params, headers)
end
destroy(params = {}, headers = {}) click to toggle source

@param [Hash] params a hash of params to be passed to the service @option params [String] id

@param [Hash] headers additional http headers @return [Array] First item: parsed data; second item: raw body

# File lib/foreman_api/resources/report.rb, line 34
def destroy(params = {}, headers = {})
  perform_call(__method__, params, headers)
end
index(params = {}, headers = {}) click to toggle source

@param [Hash] params a hash of params to be passed to the service @option params [String] order sort results @option params [String] page paginate results @option params [String] per_page number of entries per request @option params [String] search filter results

@param [Hash] headers additional http headers @return [Array] First item: parsed data; second item: raw body

# File lib/foreman_api/resources/report.rb, line 16
def index(params = {}, headers = {})
  perform_call(__method__, params, headers)
end
last(params = {}, headers = {}) click to toggle source

@param [Hash] params a hash of params to be passed to the service @option params [String] id @option params [Object] host_id Part of +/api/hosts/:host_id/reports/last+ path

@param [Hash] headers additional http headers @return [Array] First item: parsed data; second item: raw body

# File lib/foreman_api/resources/report.rb, line 44
def last(params = {}, headers = {})
  perform_call(__method__, params, headers)
end
show(params = {}, headers = {}) click to toggle source

@param [Hash] params a hash of params to be passed to the service @option params [String] id

@param [Hash] headers additional http headers @return [Array] First item: parsed data; second item: raw body

# File lib/foreman_api/resources/report.rb, line 25
def show(params = {}, headers = {})
  perform_call(__method__, params, headers)
end