Skip to content

Commit

Permalink
Merge pull request #299 from isaacdd/monitor_search_apis
Browse files Browse the repository at this point in the history
Add monitor and monitor groups search API endpoints
  • Loading branch information
yannmh committed Oct 16, 2018
2 parents d575171 + 0c4da4d commit 01fb086
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
CHANGELOG
=========
# 0.23.0 / Unreleased

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

# 0.22.0 / 2018-06-27

Expand Down
18 changes: 18 additions & 0 deletions datadog/api/monitors.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,21 @@ def unmute_all(cls):
:returns: Dictionary representing the API's JSON response
"""
return super(Monitor, cls)._trigger_class_action('POST', 'unmute_all')

@classmethod
def search(cls, **params):
"""
Search monitors.
:returns: Dictionary representing the API's JSON response
"""
return super(Monitor, cls)._trigger_class_action('GET', 'search', params=params)

@classmethod
def search_groups(cls, **params):
"""
Search monitor groups.
:returns: Dictionary representing the API's JSON response
"""
return super(Monitor, cls)._trigger_class_action('GET', 'groups/search', params=params)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def get_readme_md_contents():

setup(
name="datadog",
version="0.22.0",
version="0.23.0",
install_requires=install_reqs,
tests_require=["nose", "mock"],
packages=[
Expand Down

0 comments on commit 01fb086

Please sign in to comment.