Skip to content

Commit 6942698

Browse files
committed
Adding ID search to tools
1 parent 6a61c0d commit 6942698

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,4 @@ config/config.json
105105

106106
test.py
107107
.DS_Store
108+
temp

defectdojo_api/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '1.0.7'
1+
__version__ = '1.0.8'

defectdojo_api/defectdojo.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ def get_container(self, container_id, limit=20):
812812

813813
###### Tool API #######
814814

815-
def list_tool_types(self, name=None, limit=20):
815+
def list_tool_types(self, id=None, name=None, limit=20):
816816
"""Retrieves all the tool types.
817817
818818
:param name_contains: Search by tool type name.
@@ -824,12 +824,15 @@ def list_tool_types(self, name=None, limit=20):
824824
if limit:
825825
params['limit'] = limit
826826

827+
if id:
828+
params['id'] = id
829+
827830
if name:
828831
params['name__contains'] = name
829832

830833
return self._request('GET', 'tool_types/', params)
831834

832-
def list_tools(self, name=None, tool_type_id=None, url=None, limit=20):
835+
def list_tools(self, id=None, name=None, tool_type_id=None, url=None, limit=20):
833836
"""Retrieves all the tool configurations.
834837
835838
:param name_contains: Search by tool name.
@@ -843,6 +846,9 @@ def list_tools(self, name=None, tool_type_id=None, url=None, limit=20):
843846
if limit:
844847
params['limit'] = limit
845848

849+
if id:
850+
params['id'] = id
851+
846852
if name:
847853
params['name'] = name
848854

@@ -871,6 +877,9 @@ def list_tool_products(self, url=None, name=None, tool_configuration_id=None,
871877
if limit:
872878
params['limit'] = limit
873879

880+
if id:
881+
params['id'] = id
882+
874883
if name:
875884
params['name'] = name
876885

0 commit comments

Comments
 (0)