Update upload spec and API spec
Following discussions with @wvffle, we need to expand on the description of the front <-> backend interaction in the upload process. We've workshopped a process that fits the flow of the new designs and come up with the following:
- Create an upload group (e.g. POST
/api/v2/upload-groups
) and receive a201
with a GUID - Upload your content to the upload group (e.g. POST
/api/v2/upload-groups/{guid}
). This should return a202
to indicate the server still needs to process the content - If there is a failure in the frontend, post partial data to the endpoint with a status that tells the API that the web app couldn't validate the payload, maybe with an optional note explaining why the upload failed. The server should return a
201
as the entry has been created but there is nothing to process.
Then when you want to request the data:
- GET
/api/v2/upload-groups
: returns a list of upload groups - GET
/api/v2/upload-groups/{guid}
: returns a list of all uploads in a group - GET
/api/v2/uploads
: returns a list of all uploads made by the user
As for the retry action, if the server responds with a guid
when returning the failed upload's metadata, we could send:
- PATCH
/api/v2/uploads/{guid}
Or something similar.