liveBook · Manning

Long-running operations pattern

The long-running operations pattern is an API interaction pattern in which work continues asynchronously after the initial request and is completed through later status checks or notifications.

How 2 Manning books explain it

API Design Patterns

The long-running operations pattern is an API structure for representing work that continues after the initial request and exposing its status or result asynchronously.

How it is used
Structures asynchronous import and export work so consumers can track progress and receive a later result or error.
How deep it goes
Defines a generic operation interface and progress metadata, but stops short of detailing every operational mechanism.
Examples
Demonstrates exporting messages to hosted files or Amazon S3 with optional Gzip compression and encryption.
What you can do after
Apply it by modeling asynchronous API responses with operation identifiers, completion state, typed results, errors, and progress metadata.

Read how API Design Patterns explains long-running operations pattern →

The Design of Web APIs, Second Edition

A long operation is an API interaction pattern in which work that exceeds normal request latency is initiated asynchronously and completed through later status checking or notification.

How it is used
Handles API work that may last minutes or hours without tying up a request connection.
How deep it goes
Explains asynchronous initiation, status monitoring, polling optimization, callbacks, and Prefer-based execution choices.
Examples
Uses video analysis and on-demand stock market simulations to demonstrate job creation, status checks, and result retrieval.
What you can do after
Apply it by starting jobs, returning 202 Accepted and Location, monitoring status, and retrieving results without long-lived requests.

Read how The Design of Web APIs, Second Edition explains long-running operations pattern →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.