CS FundamentalsHardProduct-company API design interview

An API accepts a video for transcoding, which takes several minutes. What is the most appropriate immediate response?

  1. A. 200 OK after waiting until transcoding finishes
  2. B. 201 Created with the finished video
  3. C. 202 Accepted, with a URL the client can poll (or a callback) for the job's status
  4. D. 204 No Content

Correct answer: C. 202 Accepted, with a URL the client can poll (or a callback) for the job's status

202 says the request was accepted but processing is not complete. Holding the connection open for minutes risks timeouts; 201 would claim the resource already exists.

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic