I am creating an API.
I am unsure what the API should look like.
Several BLOB files (PDF, JPG, ZIP, ...) should get uploaded and some JSON which contains meta data.
What is the most up-to-date way to design the API?
There are two cases:
- the upload was successful. Then I think 201 (created) would be feasible
- the upload was not successful (for example invalid meta data). Then 422 (Unprocessable Entity) should get returned.
Example:
- Three pdf-files should get uploaded (at once) associated with some json meta data.