imaging_api.routers.retrieval
Attributes
Functions
|
Decode a Base64 URL-encoded string, adding padding if necessary. |
Returns a project with details about the status of study imports |
|
Retries failed study imports for a given imaging project ID and encoded cohort query. |
Module Contents
- imaging_api.routers.retrieval.router
- imaging_api.routers.retrieval.XNATAuthHeaders
- imaging_api.routers.retrieval.base64_url_decode(data: str) str
Decode a Base64 URL-encoded string, adding padding if necessary.
- Parameters:
data (str) – The Base64 URL-encoded string to decode. Padding is added if missing.
- Returns:
The decoded UTF-8 string.
- Return type:
str
- async imaging_api.routers.retrieval.get_import_status_count(project_id: str, encoded_query: str, headers: XNATAuthHeaders) imaging_api.routers.schemas.ProjectRetrieval
Returns a project with details about the status of study imports
- Parameters:
project_id (str) – The imaging project ID to retrieve the data about.
encoded_query (str) – Project cohort query base64 url encoded.
headers (XNATAuthHeaders) – The headers containing XNAT authentication details.
- Returns:
An object containing the status of study imports.
- Return type:
- Raises:
HTTPException – If the project does not exist or if there was an error while retrieving the project.
- async imaging_api.routers.retrieval.reimport_imaging_project_studies(project_id: str, encoded_query: str, headers: XNATAuthHeaders, background_tasks: fastapi.BackgroundTasks) fastapi.responses.JSONResponse
Retries failed study imports for a given imaging project ID and encoded cohort query.
- Parameters:
project_id (str) – The imaging project ID to retrieve the data about.
encoded_query (str) – Project cohort query base64 url encoded.
headers (XNATAuthHeaders) – The headers containing XNAT authentication details.
background_tasks (BackgroundTasks) – FastAPI BackgroundTasks instance for scheduling the reimport task.
- Returns:
A response indicating the result of the reimport operation.
- Return type:
JSONResponse
- Raises:
HTTPException – If the reimport feature is not enabled or if the query is empty