Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions maap/maap.py
Original file line number Diff line number Diff line change
Expand Up @@ -818,16 +818,27 @@ def show(self, granule, display_config={}):
viz.show()

# OGC-compliant endpoint functions
def list_algorithms(self):
def list_algorithms(self, deployer=None, algorithm_name=None, algorithm_version=None):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add more documentation here including the response ?

"""
Search all OGC processes
:return: Response object with all deployed processes
Search all OGC processes, can filter by the deployer, algorithm name, and algorithm version
:return: Response json with all deployed processes (filtered if requested)
"""
headers = self._get_api_header()
logger.debug('GET request sent to {}'.format(self.config.processes_ogc))

params = {
k: v
for k, v in (
("deployer", deployer),
("algorithmName", algorithm_name),
("algorithmVersion", algorithm_version),
)
if v is not None
}

response = requests.get(
url=self.config.processes_ogc,
params=params,
headers=headers
)
return response
Expand Down
Loading