TECHNOLOGY

Azure long-running operations: distinguish status and result URLs

In this article
THE QUICK TAKE

A Location header, an Azure-AsyncOperation header and an Operation-Location monitor follow distinct documented contracts; a universal polling shortcut is unsafe.

Identify the API family before selecting a monitor

The Azure Resource Manager tracking guide describes management-plane operations. The Azure REST guidelines explicitly target data-plane services and direct ARM implementers to a different contract. An editorial client inventory should therefore label the API family and version before interpreting asynchronous headers. A shared Azure hostname pattern or the broad phrase long-running operation does not establish that every endpoint exposes the same monitor schema or terminal-response behavior.

Apply ARM’s documented header precedence

The ARM guide says to use Azure-AsyncOperation when present and use Location only when that header is absent. Preserve the returned monitoring URL rather than constructing one from the resource path. In its Location example, an in-progress poll and a completed result have different response behavior; the Azure-AsyncOperation example instead returns a status object. Treating both URLs as direct resource download links would discard the distinction the tracking guide documents.

Read the operation’s version-specific response reference

The virtual-machine Start reference for 2025-04-01 documents an accepted response with Location and Retry-After. This is more precise evidence for that operation than assuming an older illustrative example is its complete current schema. A proposed adapter stores the selected API version and observed headers together. It should accept the documented response variants rather than declaring that an asynchronous method must always produce one header name regardless of version or service.

Interpret data-plane monitor bodies independently

The data-plane guidelines define Operation-Location status monitors whose successful HTTP retrieval can still report NotStarted or Running. They distinguish terminal Succeeded, Failed and Canceled, with result availability depending on the operation pattern. Thus a successful monitor GET is not automatically a completed business operation. A proposed parser selects its state machine from the chosen contract and retains the error structure instead of treating every successfully decoded JSON body as the desired resource.

Preserve polling permissions and timing as separate evidence

The ARM guide explains that permission to initiate an operation may be insufficient to read its broader status URL. A denied poll therefore does not prove that initiation failed. It also uses Retry-After to schedule observation. Contract fixtures can cover distinct monitor schemas and denied polling; request tracing connects the initiating request with later observations without treating either a retry delay or a readable monitor as proof of completion. This article performs no Azure operations.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles