microsoft / microsoft/api-guidelines

[Azure REST API guidelines] Conflicting guidance on `status` values for resource-based LROs

Open
#310 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
23.3k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

The section Resource-based long-running operations states

✅ DO define the "status" field of the resource as an enum with all the values it may contain including the "terminal" values "Succeeded", "Failed", and "Canceled". See Enums & SDKs.

However, this doesn't seem to make much sense as succeeded|failed|canceled describe the status of the action on a resource but not the status of the resource itself.

The same section gives an example of setting status values as provisioning and active. These values describe the effect of the action on the state of resource, which is more logical.

A "create" operation (PUT, PATCH, or POST) for a resource where the basic structure of the resource is created immediately and includes a status field that indicates when the create has completed, e.g. "provisioning" -> "active".

A hypothetical other example can be POST /myThings/123:disable where a "status": "succeeded" on the myThing resource wouldn't communicate that myThing is now disabled.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read azure/Guidelines.md at the Resource-based long-running operations section, including the linked Enums & SDKs guidance. Compare the terminal status examples with the resource-state examples and determine how the guidance should be reconciled. Done means the section consistently explains status semantics and its examples no longer conflict.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
api, documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.