We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b88806d commit e96fb8dCopy full SHA for e96fb8d
src/murfey/server/api/__init__.py
@@ -1805,6 +1805,18 @@ async def get_sessions(db=murfey_db):
1805
return res
1806
1807
1808
+@router.get("/instruments/{instrument_name}/visits/{visit_name}/sessions")
1809
+def get_sessions_with_visit(
1810
+ instrument_name: str, visit_name: str, db=murfey_db
1811
+) -> List[Session]:
1812
+ sessions = db.exec(
1813
+ select(Session)
1814
+ .where(Session.instrument_name == instrument_name)
1815
+ .where(Session.visit == visit_name)
1816
+ ).all()
1817
+ return sessions
1818
+
1819
1820
@router.get("/instruments/{instrument_name}/sessions")
1821
async def get_sessions_by_instrument_name(
1822
instrument_name: str, db=murfey_db
0 commit comments