...
To support adding all of the files in a folder (non-recursive) (use case 1a) we will need to return the total number of files in a folder and the total size of all files in the folder from POST/entity/children. The proposal is to add a 'partMask' (similar to QueryBundleRequest) with 0x01=count and 0x02=totalFileSizeMB..
REST APIs
...
DownloadOrder |
---|
String orderId |
List<FileHandleAssociation> files |
Date createdOn |
String createdBy |
String zipFileName |
Long totalSizeMB |
DownloadOrderSummary |
---|
String orderId |
Date createdOn |
String zipFileName |
Long numberOfFiles |
Long totalSizeMB |
AddFolderRequest implements AddRequest |
---|
String parentId |
AddQueryRequest implements AddRequest |
---|
Query query |
DownloadOrderRequest |
---|
LIst<FileHandleAssociation> subSet |
String zipFileName |
Phase | Description | Response | Path | Request |
---|
File Selection | Start an asynchronous job to add all of the files from either a folder or a view query to the user's DownloadList | AsyncJobId | POST /download/list/<userid>/add/async/start | AddRequest |
File Selection | Get the results of an asynchronous job to add files to a user's download list. | DownloadList | GET /download/list/<userid>/add/async/get/<jobid> |
|
File Selection | Add a single file to a user's download list. | DownloadList | POST /download/list/<userid>/add | FileHandleAssociation |
Selection Review | Get a user's download list. | DownloadList | GET /download/list/<userid> |
|
Selection Review | Remove a list of file from a user's download list |
| POST /download/list/<userid>/remove | List<FileHandleAssociation> |
Selection Review | Clear a user's download list |
| DELETE /download/list/<userid> |
|
Download | Create a DownloadOrder from the user's current download list. | DownloadOrder | PUT /download/list/<userid>/order | DownloadOrderRequest |
Download Order Review | Get a DownloadOrder given its ID. | DownloadOrder | GET /download/order/<orderId> |
|
Download Order Review | Start an asynchronous job to download a download order. | AsyncJobId | POST /download/order/<orderId>/async/start |
|
Download Review | Get the results of an asynchronous job to download a download order. | BulkFileDownloadResponse | POST /download/order/<orderId>/async/get/<jobId> |
|
Download History | Get a user's previous download order history in reverse chronological order. | Paginated<DownloadOrderSummary> | GET /download/order/<userId>/history |
|
Review Notes
- Do not use file size to restrict the addition of a file to the list. Allow the user's download list to be larger than the size limit. Instead block the download of a list if over the size limit.
- Download order should include a sub-list so use can choose to download a sub-set of the their list. This is part of allowing user's download list to be over the max file size.