API Design · Senior · Question 10 of 75
How should a multi-step operation spanning several services be exposed in an API?
- 1As several endpoints the client must call in the right order
- 2As one synchronous call that waits for every service
- ✓Correct answer: As an asynchronous operation resource with clear states (pending, succeeded, failed, compensated) driven by a saga, not as one long blocking request
Explanation
Clients poll the operation or receive events; the backend handles retries and compensation.