Module: Grafana::Modules::DataSource

Included in:
DataSources
Defined in:
lib/grafana/modules/data_source.rb

Instance Method Summary collapse

Instance Method Details

#create_data_source(data_source) ⇒ Object



16
17
18
# File 'lib/grafana/modules/data_source.rb', line 16

def create_data_source(data_source)
  post('/api/datasources', data_source)
end

#data_source(uid:) ⇒ Object



8
9
10
# File 'lib/grafana/modules/data_source.rb', line 8

def data_source(uid:)
  get("/api/datasources/uid/#{uid}")
end

#data_sourcesObject



4
5
6
# File 'lib/grafana/modules/data_source.rb', line 4

def data_sources
  get('/api/datasources')
end

#delete_data_source(uid:) ⇒ Object



20
21
22
# File 'lib/grafana/modules/data_source.rb', line 20

def delete_data_source(uid:)
  delete("/api/datasources/uid/#{uid}")
end

#named_data_source(name:) ⇒ Object



12
13
14
# File 'lib/grafana/modules/data_source.rb', line 12

def named_data_source(name:)
  get("/api/datasources/name/#{name}")
end