Skip to content

Commit 75ce82f

Browse files
committed
Use the new metadata library endpoint for queries
1 parent 2663cf4 commit 75ce82f

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

lib/workload/components/python-metadata-tools-layer/metadata_tools_layer/src/metadata_tools/utils/library_helpers.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def get_library_from_library_id(library_id: Union[int | str]) -> Dict:
1010
:param library_id:
1111
:return:
1212
"""
13-
endpoint = "library"
13+
endpoint = "api/v1/library"
1414

1515
# Get library id
1616
if isinstance(library_id, str):
@@ -99,6 +99,6 @@ def get_all_libraries() -> List[Dict]:
9999
Collect all libraries from the database
100100
:return:
101101
"""
102-
endpoint = "library"
102+
endpoint = "api/v1/library"
103103

104104
return get_request_response_results(endpoint)

lib/workload/components/python-metadata-tools-layer/metadata_tools_layer/src/metadata_tools/utils/specimen_helpers.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def list_libraries_in_specimen(specimen_id: Union[str, int]) -> List[Dict]:
4747
# If subject id is a string, we have the internal id (SBJ...)
4848
specimen = get_specimen_from_specimen_id(specimen_id)
4949

50-
endpoint = f"library"
50+
endpoint = f"api/v1/library"
5151

5252
# Get the subject
5353
return list(
@@ -63,7 +63,7 @@ def get_all_specimens():
6363
Get all specimens from the specimen database
6464
:return:
6565
"""
66-
endpoint = "specimen"
66+
endpoint = "api/v1/specimen"
6767

6868
return get_request_response_results(endpoint)
6969

lib/workload/components/python-metadata-tools-layer/metadata_tools_layer/src/metadata_tools/utils/subject_helpers.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def get_subject_from_subject_id(subject_id: Union[str, int]) -> Dict:
1818
:param subject_id:
1919
:return:
2020
"""
21-
endpoint = "subject"
21+
endpoint = "api/v1/subject"
2222

2323
# Get subject id
2424
if isinstance(subject_id, str):
@@ -80,6 +80,6 @@ def get_all_subjects() -> List[Dict]:
8080
:return:
8181
"""
8282

83-
endpoint = "subject"
83+
endpoint = "api/v1/subject"
8484

8585
return get_request_response_results(endpoint)

0 commit comments

Comments
 (0)