liveBook · Manning

Consumer constraint

As explained in The Design of Web APIs, Second Edition

A consumer constraint is a limitation imposed by the capabilities, requirements, habits, or operating conditions of an API consumer.

A consumer constraint is a limitation imposed by an API consumer’s capabilities, requirements, habits, or operating conditions. Identifying these constraints keeps an API usable for its intended consumers and implementable by its providers. section 14.1.1 section 14.1.2

Legacy banking consumer

A banking system that supports only POST and XML cannot use a REST API requiring multiple HTTP methods and JSON. Supporting that consumer may require design trade-offs rather than an idealized interface. section 14.1.1

Check for consumer constraints throughout API design:

  • Ask whether consumers differ from the capabilities assumed by usual API practices. section 14.1.2
  • Examine whether data, operations, communication patterns, infrastructure, or business conditions require another design. section 14.1.2
  • Prefer a practical trade-off when consumer limitations make an otherwise elegant design unusable. section 14.1.1

How The Design of Web APIs, Second Edition covers it

How deep it goes
Explains identification questions and practical consequences, but stops short of prescribing a universal solution.
Examples
Uses legacy banking systems limited to POST and XML as a concrete consumer-compatibility example.
What it assumes
Assumes familiarity with API design and HTTP while examining consumer limitations alongside broader contextual constraints.
What you can do after
Evaluate API designs by asking whether consumer capabilities and operating conditions impose specific constraints.
How it connects
Connects API design with REST, HTTP methods, XML, JSON, domain constraints, data formats, and implementation limitations.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of The Design of Web APIs, Second Edition. The section links point to the parts of the book it draws on.