REST API Design for Long-Running Tasks

A long-running task is an operation that requires a considerable amount of server resources and/or time.

Although Roy Fielding has not mentioned anything about the long-running tasks in his dissertation, we can combine the REST principles with other HTTP RFCs to design a viable solution.


Statelessness in REST API

In REST, statelessness refers to when the client is responsible for storing and handling the session-related information on its own side.


Idempotent REST API

A REST API is called idempotent when making multiple identical requests to an API has the same effect as making a single request.