class Dogapi::V1::DashService

Constants

API_VERSION

Public Instance Methods

create_dashboard(title, description, graphs, template_variables = nil, read_only = false) click to toggle source
   # File lib/dogapi/v1/dash.rb
12 def create_dashboard(title, description, graphs, template_variables = nil, read_only = false)
13   body = {
14     :title => title,
15     :description => description,
16     :graphs => graphs,
17     :template_variables => (template_variables or []),
18     :read_only => read_only
19   }
20 
21   request(Net::HTTP::Post, "/api/#{API_VERSION}/dash", nil, body, true)
22 end
delete_dashboard(dash_id) click to toggle source
   # File lib/dogapi/v1/dash.rb
44 def delete_dashboard(dash_id)
45   request(Net::HTTP::Delete, "/api/#{API_VERSION}/dash/#{dash_id}", nil, nil, false)
46 end
get_dashboard(dash_id) click to toggle source
   # File lib/dogapi/v1/dash.rb
36 def get_dashboard(dash_id)
37   request(Net::HTTP::Get, "/api/#{API_VERSION}/dash/#{dash_id}", nil, nil, false)
38 end
get_dashboards() click to toggle source
   # File lib/dogapi/v1/dash.rb
40 def get_dashboards
41   request(Net::HTTP::Get, "/api/#{API_VERSION}/dash", nil, nil, false)
42 end
update_dashboard(dash_id, title, description, graphs, template_variables = nil, read_only = false) click to toggle source
   # File lib/dogapi/v1/dash.rb
24 def update_dashboard(dash_id, title, description, graphs, template_variables = nil, read_only = false)
25   body = {
26     :title => title,
27     :description => description,
28     :graphs => graphs,
29     :template_variables => (template_variables or []),
30     :read_only => read_only
31   }
32 
33   request(Net::HTTP::Put, "/api/#{API_VERSION}/dash/#{dash_id}", nil, body, true)
34 end