imaging_api.routers.upload

Attributes

router

XNATAuthHeaders

Functions

upload_data(→ list[str])

Upload data to XNAT for a given accession ID and central hub project ID

Module Contents

imaging_api.routers.upload.router
imaging_api.routers.upload.XNATAuthHeaders
async imaging_api.routers.upload.upload_data(net_id: str, request_data: imaging_api.routers.schemas.UploadDataRequest, headers: XNATAuthHeaders) list[str]

Upload data to XNAT for a given accession ID and central hub project ID

Parameters:
  • net_id (str) – The FL net ID.

  • request_data (UploadDataRequest) – The request data containing the encrypted central hub project ID and the

  • ID. (accession)

  • headers (XNATAuthHeaders) – The XNAT authentication headers.

Returns:

List of URLs of the uploaded files.

Return type:

list[str]

Raises:

HTTPException – If there is an error during the upload process or if the request cannot be processed.