Overview

2 Identifying API capabilities

This chapter explains how to identify the right capabilities for an API by starting from user needs and working in natural language before touching any programming interface. Capabilities are defined as the combination of use cases users must accomplish and the generic operations that make those use cases possible. The author stresses “form follows function,” collaborative iteration with stakeholders from the Define and Design stages, and the risk of misaligned capabilities that make APIs hard or impossible to consume. To structure the work, the chapter introduces a practical methodology—the API Capabilities Canvas—that turns rough business input into a precise, versatile set of capabilities.

The process begins by walking nominal (happy) paths: list users, the use cases they perform, and decompose each use case into concrete steps, capturing for every step its inputs and successful outcomes. By tracing where inputs come from and how outcomes are used, missing steps, users, and use cases surface early. A second pass explores alternative paths and failures: describe what can go wrong, why it happens, and how to fix it, and add non-nominal branches and secondary users/use cases. With flows mapped, steps are then refined into unique, context-agnostic operations that can be reused across scenarios, avoiding near-duplicates and over-specific actions. Programming interface design decisions are intentionally deferred to keep attention on capability accuracy and to accommodate later constraints.

Throughout, the chapter sets guardrails to keep the API focused and resilient: stay within the scope established in the Define stage, ask “Why?” to uncover root needs and eliminate noise, and avoid two common pitfalls—overfitting to a specific consumer (e.g., mirroring a UI flow or absorbing consumer-side business logic) and leaking the provider’s internals (e.g., data organization, internal business rules, or service boundaries). Using a shared, natural-language vocabulary and lightweight tools (such as a spreadsheet canvas or diagrams), designers iteratively validate with stakeholders until there is consensus. The result is a balanced, reusable, and secure set of operations that align with real needs while remaining adaptable to new contexts.

We analyze the needs from the Define stage of the API lifecycle to identify the versatile API capabilities that meet them and other unknown needs. We’ll iterate with the Design and Design stages stakeholders.
CH02 F01 lauret3
API capabilities are use cases and the operations needed to achieve them. We describe them in plain English and keep programming interface concerns for the next stage because form follows function.
CH02 F02 lauret3
We walk through all use cases' nominal, alternative, and failure paths. Then, we refine steps to identify unique operations. Finally, we ensure capabilities fulfill expected users' needs without being too consumer-specific or exposing inner workings.
CH02 F03 lauret3
Different steps may share the same unique operation.
CH02 F04 lauret3
A pivoted API Capabilities Canvas where data is reorganized around operations.
CH02 F05 lauret3
When walking the nominal path, we focus on the ideal and successful paths of the most common use cases. We wonder who (users) does what (use cases) and how (steps). We also identify steps' inputs and successful outcomes to spot missing elements.
CH02 F06 lauret3
Identifying users ensures exhaustively listing use cases. Breaking down use cases into steps will help us identify all operations.
CH02 F07 lauret3
Inputs and success outcomes are essential for understanding the needs, identifying and designing operations, and spotting missing elements.
CH02 F08 lauret3
Investigating the "Buy products" steps' input sources and success outcome usages allows us to spot a missed step and use case.
CH02 F09 lauret3
Investigating the "Search for products to buy" steps' input source and success outcome helps us spot new elements.
CH02 F10 lauret3
To complete the analysis, we investigate the alternative users, use cases, and branches set aside during the first pass and analyze what happens when the steps' fail.
CH02 F11 lauret3
Investigating the failures of the "Buy products" steps, their causes, and how to fix them helps identify a new step.
CH02 F12 lauret3
Asking "What if …​" helps to identify a non-nominal branch on the "Buy products" use case.
CH02 F13 lauret3
Checking if there are similar steps or digging to find each step’s true intent allows us to identify unique and context-agnostic operations.
CH02 F14 lauret3
We identified unique and versatile operations for each step of the "Buy products" and "Fill catalog" use cases. Three operations appear on more than one step.
CH02 F15 lauret3
UI-specific flows are less reusable and flexible than context-agnostic flows.
CH02 F16 lauret3
Exposing database structure through an API makes it complicated to understand and use.
CH02 F17 lauret3
Delegating business logic to the consumers can lead to system and data corruption.
CH02 F18 lauret3
Exposing underlying system architecture can make APIs complicated to understand and use.
CH02 F19 lauret3

FAQ

What are API capabilities and why do they matter?API capabilities are the use cases an API must cover and the operations needed to achieve them. Getting capabilities wrong makes consuming applications complex or impossible, wasting time and resources and jeopardizing the provider—even for private APIs.
When in the API lifecycle do we identify capabilities, and who is involved?We identify capabilities at the start of Design, using the output of the Define stage. Designers iterate with stakeholders from Define and Design to clarify needs, validate findings, and ensure alignment.
Why describe capabilities in natural language instead of API syntax?Form follows function. Describing capabilities in plain language keeps the focus on what users need, streamlines discussions with all stakeholders, avoids premature debates about endpoints, and accommodates later constraints that may change the interface style.
What is the API Capabilities Canvas and how does it work?The Canvas is a methodology to decompose needs into: USER, USE CASE, STEP, INPUT, SUCCESS, FAILURE, and OPERATION. You analyze in two passes—first nominal (happy) paths, then alternative and failure paths—then map steps to unique, context-agnostic operations, and finally check scope and pitfalls.
How do I start with the nominal paths?Identify key users (profiles), list their most important use cases (use 80/20 to prioritize), and break each use case into high-level steps. For each step, capture inputs and success outcomes to understand what’s needed and what happens when it succeeds.
How do I spot missing elements during analysis?Trace each step’s input sources (user-provided, API-managed, or from prior steps) and how success outcomes are used by later steps. This reveals missing steps, use cases, or users that should be added to the Canvas.
What do I add in the second pass (alternative and failure paths)?For every step, list failures, why they occur, and how to fix them. Add alternative branches (e.g., “What if…?” scenarios) and analyze alternative users/use cases set aside in the first pass, validating scope with stakeholders.
How do I identify unique and versatile operations from steps?Differentiate steps (contextual) from operations (context-agnostic). Look for similar steps, extract their shared intent from descriptions, inputs, and outcomes, and define a single reusable operation (e.g., “Remove product from cart” covers multiple remove variants).
How do I stay focused on proper needs and avoid overfitting to one consumer?Confirm scope with Define stakeholders, verify that outcomes are actually used, and repeatedly ask “Why?” to find the true need. Avoid mapping API flows to specific UIs and avoid embedding consumer-specific business logic; keep flows subject-matter focused.
How do I avoid exposing the provider’s inner workings?Do not mirror database tables or internal data organization, do not delegate sensitive business logic to consumers, and do not reflect internal software architecture. Instead, expose cohesive operations (e.g., “Read customer info”), and let the implementation handle aggregation and orchestration.

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • The Design of Web APIs, Second Edition ebook for free
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • The Design of Web APIs, Second Edition ebook for free
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • The Design of Web APIs, Second Edition ebook for free