liveBook · Manning

Provider perspective

As explained in The Design of Web APIs, Second Edition

A provider perspective is an API view shaped by the provider's internal concerns, structures, or operational mechanisms rather than consumer goals.

A provider perspective shapes an API around internal structures, business logic, implementation details, or operational mechanisms instead of consumer goals. Avoiding it keeps capabilities and data reusable, versatile, and easier to consume. section 2.6.2 section 5.5.3

Product data that leaks implementation

A product price described as “add 10% on Fridays between 4 pm and 7 pm” exposes business logic consumers should not have to interpret. Likewise, grouping description and keywords under a summary object merely because a website uses that layout exposes presentation structure rather than useful product data. section 5.5.3

Apply these checks when identifying capabilities, modeling data, or securing an API:

  • Balance all consumers’ needs without specializing the API for one consumer. section 2.6.2
  • Model names, types, and organization around subject-matter needs, not implementation or user-interface structure. section 5.5.3
  • Expose only necessary data and operations; leaking business logic can let consumers corrupt underlying systems. section 12.2.2
  • Challenge apparent provider constraints before adapting the design, and consider alternatives such as REST when appropriate. section 14.1.3

How The Design of Web APIs, Second Edition covers it

How deep it goes
Explains recognition through capability, data, security, and constraint examples, but stops short of prescribing a complete design procedure.
Examples
Uses product pricing rules, website-shaped product fields, and implementation constraints such as Java, POST, and XML.
What it assumes
Assumes API design and consumer goals while teaching how subject-matter expertise can distort exposed capabilities and data.
What you can do after
Evaluate API capabilities and data models for implementation leakage, consumer over-specialization, and unnecessary security risk.
How it connects
Connects consumer needs, API capabilities, data modeling, business logic, API security, API surface, and REST.

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.