Skip to content

Commit

Permalink
Add monitor and monitor groups search API (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacdd authored and gmmeyer committed Oct 16, 2018
1 parent df0e46e commit e5de500
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changes

## 1.32.0 / Unreleased

* Add [monitor search](https://docs.datadoghq.com/api/?lang=ruby#monitors-search) and [monitor groups search](https://docs.datadoghq.com/api/?lang=ruby#monitors-group-search) API endpoints.

## 1.31.0 / 2018-10-01

* [FIX] Handle nil values from benchmarks in Capistrano. See [#159][].
Expand Down
8 changes: 8 additions & 0 deletions lib/dogapi/facade.rb
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,14 @@ def unmute_monitor(monitor_id, options= {})
@monitor_svc.unmute_monitor(monitor_id, options)
end

def search_monitors(options = {})
@monitor_svc.search_monitors(options)
end

def search_monitor_groups(options = {})
@monitor_svc.search_monitor_groups(options)
end

#
# MONITOR DOWNTIME
#
Expand Down
8 changes: 8 additions & 0 deletions lib/dogapi/v1/monitor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ def unmute_monitor(monitor_id, options = {})
request(Net::HTTP::Post, "/api/#{API_VERSION}/monitor/#{monitor_id}/unmute", nil, options, true)
end

def search_monitors(options = {})
request(Net::HTTP::Get, "/api/#{API_VERSION}/monitor/search", options, nil, false)
end

def search_monitor_groups(options = {})
request(Net::HTTP::Get, "/api/#{API_VERSION}/monitor/groups/search", options, nil, false)
end

#
# DOWNTIMES

Expand Down
2 changes: 1 addition & 1 deletion lib/dogapi/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Dogapi
VERSION = '1.31.0'
VERSION = '1.32.0'
end

0 comments on commit e5de500

Please sign in to comment.