Method: Dogapi::V1::DashService#update_dashboard

Defined in:
lib/dogapi/v1/dash.rb

#update_dashboard(dash_id, title, description, graphs, template_variables = nil, read_only = false) ⇒ Object



24
25
26
27
28
29
30
31
32
33
34
# File 'lib/dogapi/v1/dash.rb', line 24

def update_dashboard(dash_id, title, description, graphs, template_variables = nil, read_only = false)
  body = {
    :title => title,
    :description => description,
    :graphs => graphs,
    :template_variables => (template_variables or []),
    :read_only => read_only
  }

  request(Net::HTTP::Put, "/api/#{API_VERSION}/dash/#{dash_id}", nil, body, true)
end