flywheel.api.upload_api
UploadApi
Bases: object
cleanup_signed_upload_url(body, **kwargs)
Cleanup unused file blob previously uploaded using signed URL
This method makes a synchronous HTTP request by default.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body | SignedUrlCleanupInput | | required |
async_ | (bool, optional) | Perform the request asynchronously | required |
cleanup_signed_upload_url_with_http_info(body, **kwargs)
Cleanup unused file blob previously uploaded using signed URL
This method makes a synchronous HTTP request by default.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body | SignedUrlCleanupInput | | required |
async_ | (bool, optional) | Perform the request asynchronously | required |
complete_s3_multipart_upload(body, **kwargs)
Complete S3 multipart signed url upload
Complete S3 uploads exceeding 5GB and create the final object in the bucket. Expected an upload id returned previously by the POST /upload/signed-url endpoint and the e-tags returned by S3 after uploaded each file part. This method makes a synchronous HTTP request by default.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body | CompleteS3MultipartUploadInput | | required |
async_ | (bool, optional) | Perform the request asynchronously | required |
complete_s3_multipart_upload_with_http_info(body, **kwargs)
Complete S3 multipart signed url upload
Complete S3 uploads exceeding 5GB and create the final object in the bucket. Expected an upload id returned previously by the POST /upload/signed-url endpoint and the e-tags returned by S3 after uploaded each file part. This method makes a synchronous HTTP request by default.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body | CompleteS3MultipartUploadInput | | required |
async_ | (bool, optional) | Perform the request asynchronously | required |
create_signed_upload_url(body, **kwargs)
Create new signed upload URL
Return a signed upload URL for the requested storage provider_id. Multiple URLs are returned for S3 uploads exceeding 5GB. This method makes a synchronous HTTP request by default.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body | SignedUrlUploadInput | | required |
async_ | (bool, optional) | Perform the request asynchronously | required |
create_signed_upload_url_with_http_info(body, **kwargs)
Create new signed upload URL
Return a signed upload URL for the requested storage provider_id. Multiple URLs are returned for S3 uploads exceeding 5GB. This method makes a synchronous HTTP request by default.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body | SignedUrlUploadInput | | required |
async_ | (bool, optional) | Perform the request asynchronously | required |
upload_by_label(**kwargs)
Multipart form upload with N file fields, each with their desired filename.
Default behavior: > For technical reasons, no form field names can be repeated. Instead, use (file1, file2) and so forth. > A non-file form field called "metadata" is also required, which must be a string containing JSON. > See api/schemas/input/labelupload.json for the format of this metadata. ### Signed URL upload with ticket > Upload a single file directly to the storage backend. The workflow is the following: - Send a request with an empty ?ticket= query parameter to get an upload ticket and URL - Upload the file using a PUT request to the upload URL - Once done, send a POST request to this endpoint with the upload ticket to finalize the upload. The file will be placed into the DB via this POST request.
This method makes a synchronous HTTP request by default.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
preserve_metadata | (bool, optional) | , defaults to false | required |
ticket | (str, optional) | Use empty value to get a ticket, and provide the ticket id to finalize the upload | required |
id | (str, optional) | | required |
level | (ContainerType, optional) | | required |
job | (str, optional) | | required |
files | (str, optional) | | required |
metadata | (object, optional) | Metadata object | required |
content_type | (str, optional) | | required |
async_ | (bool, optional) | Perform the request asynchronously | required |
upload_by_label_with_http_info(**kwargs)
Multipart form upload with N file fields, each with their desired filename.
Default behavior: > For technical reasons, no form field names can be repeated. Instead, use (file1, file2) and so forth. > A non-file form field called "metadata" is also required, which must be a string containing JSON. > See api/schemas/input/labelupload.json for the format of this metadata. ### Signed URL upload with ticket > Upload a single file directly to the storage backend. The workflow is the following: - Send a request with an empty ?ticket= query parameter to get an upload ticket and URL - Upload the file using a PUT request to the upload URL - Once done, send a POST request to this endpoint with the upload ticket to finalize the upload. The file will be placed into the DB via this POST request.
This method makes a synchronous HTTP request by default.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
preserve_metadata | (bool, optional) | , defaults to false | required |
ticket | (str, optional) | Use empty value to get a ticket, and provide the ticket id to finalize the upload | required |
id | (str, optional) | | required |
level | (ContainerType, optional) | | required |
job | (str, optional) | | required |
files | (str, optional) | | required |
metadata | (object, optional) | Metadata object | required |
content_type | (str, optional) | | required |
async_ | (bool, optional) | Perform the request asynchronously | required |
upload_by_reaper(**kwargs)
Bottom-up UID matching of Multipart form upload with N file fields, each with their desired filename.
Default behavior: > Upload data, allowing users to move sessions during scans without causing new data to be created in referenced project/group. ### Evaluation Order: * If a matching acquisition UID is found anywhere on the system, the related files will be placed under that acquisition. * OR If a matching session UID is found, a new acquistion is created with the specified UID under that Session UID. * OR If a matching group ID and project label are found, a new session and acquisition will be created within that project * OR If a matching group ID is found, a new project and session and acquisition will be created within that group. * OR A new session and acquisition will be created within a special "Unknown" group and project, which is only visible to system administrators. ### Signed URL upload with ticket > Upload a single file directly to the storage backend. The workflow is the following: - Send a request with an empty ?ticket= query parameter to get an upload ticket and URL - Upload the file using a PUT request to the upload URL - Once done, send a POST request to this endpoint with the upload ticket to finalize the upload. The file will be placed into the DB via this POST request.
This method makes a synchronous HTTP request by default.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
preserve_metadata | (bool, optional) | , defaults to false | required |
ticket | (str, optional) | Use empty value to get a ticket, and provide the ticket id to finalize the upload | required |
uid_placement | (bool, optional) | , defaults to true | required |
id | (str, optional) | | required |
level | (ContainerType, optional) | | required |
job | (str, optional) | | required |
files | (str, optional) | | required |
metadata | (object, optional) | Metadata object | required |
content_type | (str, optional) | | required |
async_ | (bool, optional) | Perform the request asynchronously | required |
upload_by_reaper_with_http_info(**kwargs)
Bottom-up UID matching of Multipart form upload with N file fields, each with their desired filename.
Default behavior: > Upload data, allowing users to move sessions during scans without causing new data to be created in referenced project/group. ### Evaluation Order: * If a matching acquisition UID is found anywhere on the system, the related files will be placed under that acquisition. * OR If a matching session UID is found, a new acquistion is created with the specified UID under that Session UID. * OR If a matching group ID and project label are found, a new session and acquisition will be created within that project * OR If a matching group ID is found, a new project and session and acquisition will be created within that group. * OR A new session and acquisition will be created within a special "Unknown" group and project, which is only visible to system administrators. ### Signed URL upload with ticket > Upload a single file directly to the storage backend. The workflow is the following: - Send a request with an empty ?ticket= query parameter to get an upload ticket and URL - Upload the file using a PUT request to the upload URL - Once done, send a POST request to this endpoint with the upload ticket to finalize the upload. The file will be placed into the DB via this POST request.
This method makes a synchronous HTTP request by default.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
preserve_metadata | (bool, optional) | , defaults to false | required |
ticket | (str, optional) | Use empty value to get a ticket, and provide the ticket id to finalize the upload | required |
uid_placement | (bool, optional) | , defaults to true | required |
id | (str, optional) | | required |
level | (ContainerType, optional) | | required |
job | (str, optional) | | required |
files | (str, optional) | | required |
metadata | (object, optional) | Metadata object | required |
content_type | (str, optional) | | required |
async_ | (bool, optional) | Perform the request asynchronously | required |
upload_by_uid(**kwargs)
Multipart form upload with N file fields, each with their desired filename.
Default behavior: > Same behavior as /api/upload/label, except the metadata field must be uid format See api/schemas/input/uidupload.json for the format of this metadata. ### Signed URL upload with ticket > Upload a single file directly to the storage backend. The workflow is the following: - Send a request with an empty ?ticket= query parameter to get an upload ticket and URL - Upload the file using a PUT request to the upload URL - Once done, send a POST request to this endpoint with the upload ticket to finalize the upload. The file will be placed into the DB via this POST request.
This method makes a synchronous HTTP request by default.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
preserve_metadata | (bool, optional) | , defaults to false | required |
ticket | (str, optional) | Use empty value to get a ticket, and provide the ticket id to finalize the upload | required |
id | (str, optional) | | required |
level | (ContainerType, optional) | | required |
job | (str, optional) | | required |
files | (str, optional) | | required |
metadata | (object, optional) | Metadata object | required |
content_type | (str, optional) | | required |
async_ | (bool, optional) | Perform the request asynchronously | required |
upload_by_uid_with_http_info(**kwargs)
Multipart form upload with N file fields, each with their desired filename.
Default behavior: > Same behavior as /api/upload/label, except the metadata field must be uid format See api/schemas/input/uidupload.json for the format of this metadata. ### Signed URL upload with ticket > Upload a single file directly to the storage backend. The workflow is the following: - Send a request with an empty ?ticket= query parameter to get an upload ticket and URL - Upload the file using a PUT request to the upload URL - Once done, send a POST request to this endpoint with the upload ticket to finalize the upload. The file will be placed into the DB via this POST request.
This method makes a synchronous HTTP request by default.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
preserve_metadata | (bool, optional) | , defaults to false | required |
ticket | (str, optional) | Use empty value to get a ticket, and provide the ticket id to finalize the upload | required |
id | (str, optional) | | required |
level | (ContainerType, optional) | | required |
job | (str, optional) | | required |
files | (str, optional) | | required |
metadata | (object, optional) | Metadata object | required |
content_type | (str, optional) | | required |
async_ | (bool, optional) | Perform the request asynchronously | required |
upload_signed_fs_file(token, body, **kwargs)
Upload file to local filesystem storage provider
The POST /api/upload/signed-url endpoint returns a url with a jwt token pointing to this endpoint if the storage provider is a local filesystem then the file can be uploaded simply by sending the file content in the body of the payload. The destination storage provider and the file path are encoded in the jwt token. This method makes a synchronous HTTP request by default.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
token | str | Upload token | required |
body | str | Signed filesystem file upload payload | required |
async_ | (bool, optional) | Perform the request asynchronously | required |
upload_signed_fs_file_with_http_info(token, body, **kwargs)
Upload file to local filesystem storage provider
The POST /api/upload/signed-url endpoint returns a url with a jwt token pointing to this endpoint if the storage provider is a local filesystem then the file can be uploaded simply by sending the file content in the body of the payload. The destination storage provider and the file path are encoded in the jwt token. This method makes a synchronous HTTP request by default.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
token | str | Upload token | required |
body | str | Signed filesystem file upload payload | required |
async_ | (bool, optional) | Perform the request asynchronously | required |