Hi,
I'm currently designing a RESTful API and are not sure which HTTP code is the right choice for a distinct scenario:
Clients can upload entities by using PUT to a pre-known URI. Then, the entity is processed on the server which could take some time (i.e. transcoding/processing). If this is done, the resource is available under the URI it had been uploaded to.
Now I'm unsure which is the right HTTP Response code to return, if clients query the resource before processing is done. I'm searching something like the opposite of 410 Gone
. Due to the applications architecture, different clients will know the URI before processing has finished (at least the client that did the upload).
Additionally, I don't want to use WebDAV extension codes, although there would be some valid ones.
I had some initial ideas, but I don't know which fits best:
- `307 Temporary Redirect` Redirect to placeholder resource.
- `405 Method Not Allowed` GET is allowed only later => Clients must not cache this answer.
- `503 Service Unavailable` Emphasizes on server-side error => Perhaps somewhat unclear for the client what actually got wrong.
- Any other idea?
What should I pick?
Thanks in advance!