Background
In portal file browsers around the portal, to perform many actions, such as delete, move, and others, delete or otherwise update an entity bundle, you must first select the target entity,. From inside a project or folder, there is no quick and convenient way to delete/move/etc update multiple files and subfolders, so the aim is to provide a way to bulk select files from within the files browser then select a bulk action to perform on those selected. We introduce a new set of services to provide the mechanism for performing and tracking these jobs. We intend to interface with the already present job tracking widget, which may then be extended for other uses on the portal such as table query tracking.
...
The new classes are:
Request
Requests will have a max bulk operation limit.
Response
Web Services
Action | URI | Method | Request Body | Response Body | Authorization | |||
---|---|---|---|---|---|---|---|---|
Bulk | DeleteGet | /entity/bulk/ | entityDeleteget/async/start | POST | EntityIdListBulkGetRequest | BulkEntityResponseAsyncJobId | ACCESSACCESS_TYPE. | DELETEREAD on each entity in the passed entityList |
Bulk Get Results | /entity/bulk/get/async/get/{asyncToken} | GET | BulkActionEntityResult | |||||
Bulk | MoveUpdate | / | entityMoveentity/bulk/update/async/start | POST | EntityIdList, StringBulkUpdateRequest | BulkEntityResponseAsyncJobId | ACCESS_TYPE.UPDATE on each entity in the passed entityList | , as well as the destination entity|
Get Update Results | /entity/bulk/update/async/get/{asyncToken} | GET | BulkUpdateResponse | Asynchronously get the results of an updateEntities request started with POST /entity/bulk/update/async/start Note: When the result is not ready yet, this method will return a status code of 202 (ACCEPTED) and the response body will be a AsynchronousJobStatus object. | ||||
Bulk Delete | /entity/bulk/delete/async/start | POST | BulkDeleteRequest | AsyncJobId | ACCESS_TYPE.DELETE on each entity in the passed entityList | |||
Get Delete Results | /entity/bulk/delete/async/get/{asyncToken} | GET | BulkDeleteResponse | Asynchronously get the results of a deleteEntities request started with POST /entity/bulk/delete/async/start Note: When the result is not ready yet, this method will return a status code of 202 (ACCEPTED) and the response body will be a AsynchronousJobStatus object. |
Discussion
- The web services follow the pattern established by many async table functions in their http method and their URI.
- It is currently under investigation whether whoever requests the move operation also requires ACCESS_TYPE.UPDATE or other on the parentId in question.
- Bundle to update annotations, etc
- Max bulk operation limit