Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
adding health checks
  • Loading branch information
Glenn Snyder committed Mar 14, 2019
commit 871f358bd813128d24834b1aa729546b7acf4ba9
8 changes: 8 additions & 0 deletions blackduck/HubRestApi.py
Original file line number Diff line number Diff line change
Expand Up @@ -1244,6 +1244,14 @@ def delete_unmapped_codelocations(self, limit=1000):
for c in codelocations:
response = self.execute_delete(c['_meta']['href'])

##
#
# Health Stuff
#
##
def get_health_checks(self):
url = self.get_urlbase() + "/api/health-checks/liveness"
return self.execute_get(url)

##
#
Expand Down
2 changes: 1 addition & 1 deletion blackduck/__version__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

VERSION = (0, 0, 22)
VERSION = (0, 0, 23)

__version__ = '.'.join(map(str, VERSION))
7 changes: 7 additions & 0 deletions examples/get_health_checks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from blackduck.HubRestApi import HubInstance

hub = HubInstance()

response = hub.get_health_checks()

print(response.json())