Skip to content

Commit

Permalink
Merge pull request #504 from umccr/update/use-new-metadata-library-en…
Browse files Browse the repository at this point in the history
…dpoint

Use the new metadata library endpoint for queries
  • Loading branch information
alexiswl authored Aug 20, 2024
2 parents 7333bed + 75ce82f commit 1cb82bf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def get_library_from_library_id(library_id: Union[int | str]) -> Dict:
:param library_id:
:return:
"""
endpoint = "library"
endpoint = "api/v1/library"

# Get library id
if isinstance(library_id, str):
Expand Down Expand Up @@ -99,6 +99,6 @@ def get_all_libraries() -> List[Dict]:
Collect all libraries from the database
:return:
"""
endpoint = "library"
endpoint = "api/v1/library"

return get_request_response_results(endpoint)
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def list_libraries_in_specimen(specimen_id: Union[str, int]) -> List[Dict]:
# If subject id is a string, we have the internal id (SBJ...)
specimen = get_specimen_from_specimen_id(specimen_id)

endpoint = f"library"
endpoint = f"api/v1/library"

# Get the subject
return list(
Expand All @@ -63,7 +63,7 @@ def get_all_specimens():
Get all specimens from the specimen database
:return:
"""
endpoint = "specimen"
endpoint = "api/v1/specimen"

return get_request_response_results(endpoint)

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def get_subject_from_subject_id(subject_id: Union[str, int]) -> Dict:
:param subject_id:
:return:
"""
endpoint = "subject"
endpoint = "api/v1/subject"

# Get subject id
if isinstance(subject_id, str):
Expand Down Expand Up @@ -80,6 +80,6 @@ def get_all_subjects() -> List[Dict]:
:return:
"""

endpoint = "subject"
endpoint = "api/v1/subject"

return get_request_response_results(endpoint)

0 comments on commit 1cb82bf

Please sign in to comment.