
On 19-08-2014 00:30, Royce Lv wrote:
Cristian,
Thanks for this comprehensive and detailed RFC which we can take as a good example! Some suggestion according to me below: 1. As for me, if download/upload is a time consuming task, we may want to use AsyncTask to track it. So for POST /storagepools/ISO/storagevolumes/download we may want to return 202 and a 'task_id' in the response data.
2.To query status, pause and cancel the download, the target will be the task: POST /tasks/download-task-id/cancel This may require enhancement of tasks API.
Thanks for the suggestions! I proposed returning the "name" when a download starts exactly so it could be tracked later (paused, canceled, status), but an ID sounds better for that. Especially because there's already a Tasks API we can use here.