Skip to content

Resource · Guide or article

REST API Design Guidance

Mainly compares two ways of producing an OpenAPI contract: writing the contract first and generating code from it, or writing code first and generating the contract. Backend engineers preparing for API design questions can use it to argue for one approach based on how stable the requirements are.

Reviewed

Open the original: REST API Design Guidance (opens the original site in a new tab)

Practice this topicOpens the practice interviewer in System design mode; choose a question there.

Add to a roadmap

Keep this resource with a roadmap you follow. It appears as your own extra resource; the roadmap's steps don't change and it doesn't count toward your tracked steps.

Source content: English

The Microsoft REST API guidelines provide design guidance covering a multitude of use-cases. The following sections are a good place to start as they are likely required considerations by any REST API design:

PrepKit overview

PrepKit editors wrote and reviewed this overview from the source repository. It is not text from the resource itself.

Suited to
The source does not state a level
Format
Article

What it covers

  • A starting list of REST decisions (URL structure, methods, status codes, collections, versioning, naming) that link into Microsoft's REST API guidelines
  • Design-first benefits such as parallel producer and consumer work and early tests, plus a six-step plan and the cost when requirements change often
  • Code-first benefits such as speed and flexibility, and the risk of a generated OpenAPI file drifting out of date
  • Agreeing with stakeholders on what counts as a breaking change before applying guidelines to an existing API

How to use it

PrepKit study advice, not a claim made by the source.

For an API you have built or designed in practice, write two sentences on whether you would go design-first or code-first and why, then name one change that would count as breaking for its clients. The aim is to answer how would you version this API with a reason, not a slogan.

Scope and limitations

Team guidance, not interview material. Status codes, pagination, versioning and naming are not explained on the page; it links out to Microsoft's guidelines for those. Tool suggestions center on Microsoft TypeSpec.

Access and format

Web page on microsoft.github.io from Microsoft's Code-With Engineering Playbook. English, free, CC BY 4.0.

Reviewed by PrepKit on Oct 2, 2026. Listing source commit: 016770e43d8a

Evidence behind this overview
  • docs/design/design-patterns/rest-api-design-guidance.md

Pages that include this

Get the PrepKit newsletter

Optional. You don't need it to use PrepKit.

How we handle your email