Skip to content

Latest commit

 

History

History
59 lines (50 loc) · 1.07 KB

DATASOURCE.md

File metadata and controls

59 lines (50 loc) · 1.07 KB

Datasource Related API Methods


The following methods are all relating to data sources

Get all current data sources:
g.get_data_sources()
Get the CloudWatch namespaces for a given CloudWatch data source id:
g.get_cw_namespaces(23)
Create a data source:
g.create_data_source(
    {
      "access" => "proxy",
      "name" => "cloudwatch_metrics_us-east-1",
      "database" => "metrics_us-east-1",
      "type" => "cloudwatch",
      "jsonData" => { "defaultRegion" => "us-east-1"}
    }
)
Get available data source types:
g.get_available_data_source_types()
Update a data source:
g.update_data_source({
  "id": 1,
  "orgId": 1,
  "name": "test_datasource",
  "type": "graphite",
  "access": "proxy",
  "url": "http://mydatasource.com",
  "password": "",
  "user": "",
  "database": "",
  "basicAuth": true,
  "basicAuthUser": "basicuser",
  "basicAuthPassword": "basicuser",
  "isDefault": false,
  "jsonData": null
})
Delete a data source:
g.delete_data_source(23)