Skip to content

Commit 3acfb30

Browse files
committed
Added end point to list all analyze functions
1 parent bf37868 commit 3acfb30

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

pfbridge/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
3.7.5
1+
3.7.6
22

pfbridge/models/relayModel.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,10 @@ class clientResponseSchema(BaseModel):
127127
ErrorWorkflow:str = ''
128128
ModelViolation:Any = None
129129
ErrorComms:pflinkError = pflinkError()
130+
131+
class analyzeFunctionList(BaseModel):
132+
"""
133+
Response model for storing the list of all
134+
the analyze functions available.
135+
"""
136+
methods: list[str] = []

pfbridge/routes/relayRouter.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,18 @@ def urlOrthanc_update(URL:str) -> relayModel.serviceURLs:
266266
update.urlOrthanc = URL
267267
return update
268268

269+
270+
@router.get(
271+
'/analyze_function/list/',
272+
response_model = list[str],
273+
summary = '''
274+
GET the list of all analyze functions.
275+
'''
276+
)
277+
async def retrieve_analyze_methods() -> list[str]:
278+
return list(settings.analyses.analyses.keys())
279+
280+
269281
@router.put(
270282
'/analysis/',
271283
response_model = settings.DylldAnalysis,
@@ -415,3 +427,5 @@ class PACSqueryCore(BaseModel):
415427
)
416428
return d_ret
417429

430+
431+

0 commit comments

Comments
 (0)